Useful in regression/performance testing
[13] Added SIMD acceleration for Huffman encoding on NEON-capable ARM 32-bit
platforms. This speeds up the compression of full-color JPEGs by about 30% on
-average.
+average. For the purposes of benchmarking or regression testing,
+SIMD-accelerated Huffman encoding can be disabled by setting the
+JSIMD_NOHUFFENC environment variable to 1.
[14] Completed the ARM 64-bit (ARMv8) NEON SIMD implementation. 64-bit ARM
now has SIMD coverage for all of the algorithms that are covered in the 32-bit
#include <ctype.h>
static unsigned int simd_support = ~0;
+static unsigned int simd_huffman = 1;
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
+ env = getenv("JSIMD_NOHUFFENC");
+ if ((env != NULL) && (strcmp(env, "1") == 0))
+ simd_huffman = 0;
}
GLOBAL(int)
if (sizeof(JCOEF) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_ARM_NEON && simd_huffman)
return 1;
return 0;