Use immintrin, tweak checks for SSE4, SSSE3
This commit is contained in:
parent
577c1f0305
commit
5bc58a0ebc
@ -14,11 +14,7 @@
|
|||||||
|
|
||||||
#if PNG_INTEL_SSE_OPT > 0
|
#if PNG_INTEL_SSE_OPT > 0
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(_WIN64)
|
#include <immintrin.h>
|
||||||
#include <intrin.h>
|
|
||||||
#else
|
|
||||||
#include <x86intrin.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Functions in this file look at most 3 pixels (a,b,c) to predict the 4th (d).
|
// Functions in this file look at most 3 pixels (a,b,c) to predict the 4th (d).
|
||||||
// They're positioned like this:
|
// They're positioned like this:
|
||||||
|
@ -183,9 +183,12 @@
|
|||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
|
||||||
#ifndef PNG_INTEL_SSE_OPT
|
#ifndef PNG_INTEL_SSE_OPT
|
||||||
# if defined(__SSE4_1__)
|
# if defined(__SSE4_1__) || defined(__AVX__)
|
||||||
|
/* We are not actually using AVX, but checking for AVX is the best
|
||||||
|
way we can detect SSE4.1 and SSSE3 on MSVC.
|
||||||
|
*/
|
||||||
# define PNG_INTEL_SSE_OPT 3
|
# define PNG_INTEL_SSE_OPT 3
|
||||||
# elif defined(__SSE3__) || defined(__SSSE3__)
|
# elif defined(__SSSE3__)
|
||||||
# define PNG_INTEL_SSE_OPT 2
|
# define PNG_INTEL_SSE_OPT 2
|
||||||
# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
|
# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
|
||||||
(defined(_M_IX86_FP) && _M_IX86_FP >= 2)
|
(defined(_M_IX86_FP) && _M_IX86_FP >= 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user