From f358450feb592106a37e935bf7e5361298eab6e8 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 16 Aug 2013 20:42:50 -0700 Subject: [PATCH] dsp: msvc compatibility intrin.h is available after VS2003 patch from the FreeImage project Change-Id: I58a18a0db00e247f871d05e3ba99772704f0e079 --- src/dsp/dsp.h | 3 ++- src/dsp/lossless.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index 01a95891..05873b2a 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -23,7 +23,8 @@ extern "C" { //------------------------------------------------------------------------------ // CPU detection -#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) +#if defined(_MSC_VER) && _MSC_VER > 1310 && \ + (defined(_M_X64) || defined(_M_IX86)) #define WEBP_MSC_SSE2 // Visual C++ SSE2 targets #endif diff --git a/src/dsp/lossless.h b/src/dsp/lossless.h index f1b1f733..5ff779c1 100644 --- a/src/dsp/lossless.h +++ b/src/dsp/lossless.h @@ -108,7 +108,8 @@ static WEBP_INLINE float VP8LFastSLog2(int v) { static WEBP_INLINE int BitsLog2Floor(uint32_t n) { return 31 ^ __builtin_clz(n); } -#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) +#elif defined(_MSC_VER) && _MSC_VER > 1310 && \ + (defined(_M_X64) || defined(_M_IX86)) #include #pragma intrinsic(_BitScanReverse)