Add JSIMD_NOHUFFENC environment variable for ARM
Useful in regression/performance testing
This commit is contained in:
@@ -69,7 +69,9 @@ setting the JSIMD_NOHUFFENC environment variable to 1.
|
|||||||
|
|
||||||
[13] Added SIMD acceleration for Huffman encoding on NEON-capable ARM 32-bit
|
[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
|
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
|
[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
|
now has SIMD coverage for all of the algorithms that are covered in the 32-bit
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
static unsigned int simd_support = ~0;
|
static unsigned int simd_support = ~0;
|
||||||
|
static unsigned int simd_huffman = 1;
|
||||||
|
|
||||||
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
||||||
|
|
||||||
@@ -128,6 +129,9 @@ init_simd (void)
|
|||||||
env = getenv("JSIMD_FORCENONE");
|
env = getenv("JSIMD_FORCENONE");
|
||||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
simd_support = 0;
|
simd_support = 0;
|
||||||
|
env = getenv("JSIMD_NOHUFFENC");
|
||||||
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
|
simd_huffman = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLOBAL(int)
|
GLOBAL(int)
|
||||||
@@ -707,7 +711,7 @@ jsimd_can_huff_encode_one_block (void)
|
|||||||
if (sizeof(JCOEF) != 2)
|
if (sizeof(JCOEF) != 2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (simd_support & JSIMD_ARM_NEON)
|
if (simd_support & JSIMD_ARM_NEON && simd_huffman)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user