Use PNG_INTEL_SSE_OPT instead of PNG_INTEL_SSE2_OPT
This commit is contained in:
parent
9c946e22fc
commit
f84f957881
@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|
||||||
#if PNG_INTEL_SSE2_OPT > 0
|
#if PNG_INTEL_SSE_OPT > 0
|
||||||
|
|
||||||
#if PNG_INTEL_SSE2_OPT == 1
|
#if PNG_INTEL_SSE_OPT == 1
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#elif PNG_INTEL_SSE2_OPT == 2
|
#elif PNG_INTEL_SSE_OPT == 2
|
||||||
#include <tmmintrin.h>
|
#include <tmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
// Returns |x| for 16-bit lanes.
|
// Returns |x| for 16-bit lanes.
|
||||||
static __m128i abs_i16(__m128i x) {
|
static __m128i abs_i16(__m128i x) {
|
||||||
#if PNG_INTEL_SSE2_OPT >= 2
|
#if PNG_INTEL_SSE_OPT >= 2
|
||||||
return _mm_abs_epi16(x);
|
return _mm_abs_epi16(x);
|
||||||
#else
|
#else
|
||||||
// Read this all as, return x<0 ? -x : x.
|
// Read this all as, return x<0 ? -x : x.
|
||||||
@ -257,5 +257,5 @@ void png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* PNG_INTEL_SSE2_OPT > 0 */
|
#endif /* PNG_INTEL_SSE_OPT > 0 */
|
||||||
#endif /* READ */
|
#endif /* READ */
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#if PNG_INTEL_SSE2_OPT > 0
|
#if PNG_INTEL_SSE_OPT > 0
|
||||||
|
|
||||||
void
|
void
|
||||||
png_init_filter_functions_sse2(png_structp pp, unsigned int bpp)
|
png_init_filter_functions_sse2(png_structp pp, unsigned int bpp)
|
||||||
@ -34,5 +34,5 @@ png_init_filter_functions_sse2(png_structp pp, unsigned int bpp)
|
|||||||
// No need optimize PNG_FILTER_VALUE_UP. The compiler should autovectorize.
|
// No need optimize PNG_FILTER_VALUE_UP. The compiler should autovectorize.
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* PNG_INTEL_SSE2_OPT > 0 */
|
#endif /* PNG_INTEL_SSE_OPT > 0 */
|
||||||
#endif /* PNG_READ_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
@ -182,15 +182,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
|
||||||
#ifndef PNG_INTEL_SSE2_OPT
|
#ifndef PNG_INTEL_SSE_OPT
|
||||||
# if defined(__SSE3__) || defined(__SSSE3__)
|
# if defined(__SSE3__) || defined(__SSSE3__)
|
||||||
# define PNG_INTEL_SSE2_OPT 2
|
# define PNG_INTEL_SSE_OPT 2
|
||||||
# elif defined(__SSE2__)
|
# elif defined(__SSE2__)
|
||||||
# define PNG_INTEL_SSE2_OPT 1
|
# define PNG_INTEL_SSE_OPT 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PNG_INTEL_SSE2_OPT > 0
|
#if PNG_INTEL_SSE_OPT > 0
|
||||||
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2
|
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user