diff --git a/vp8/common/arm/neon/sixtappredict_neon.c b/vp8/common/arm/neon/sixtappredict_neon.c index aad6133f5..4c2efc92b 100644 --- a/vp8/common/arm/neon/sixtappredict_neon.c +++ b/vp8/common/arm/neon/sixtappredict_neon.c @@ -9,10 +9,7 @@ */ #include - -#ifdef _MSC_VER -#define __builtin_prefetch(x) -#endif +#include "vpx_ports/mem.h" static const int8_t vp8_sub_pel_filters[8][8] = { {0, 0, 128, 0, 0, 0, 0, 0}, /* note that 1/8 pel positionyys are */ diff --git a/vp8/common/arm/neon/variance_neon.c b/vp8/common/arm/neon/variance_neon.c index afd2dc3d1..1b1979073 100644 --- a/vp8/common/arm/neon/variance_neon.c +++ b/vp8/common/arm/neon/variance_neon.c @@ -9,10 +9,7 @@ */ #include - -#ifdef _MSC_VER -#define __builtin_prefetch(x) -#endif +#include "vpx_ports/mem.h" unsigned int vp8_variance16x16_neon( const unsigned char *src_ptr, diff --git a/vp8/common/arm/neon/vp8_subpixelvariance_neon.c b/vp8/common/arm/neon/vp8_subpixelvariance_neon.c index 6405bf260..8308d555b 100644 --- a/vp8/common/arm/neon/vp8_subpixelvariance_neon.c +++ b/vp8/common/arm/neon/vp8_subpixelvariance_neon.c @@ -12,10 +12,6 @@ #include "vpx_ports/mem.h" #include "vpx/vpx_integer.h" -#ifdef _MSC_VER -#define __builtin_prefetch(x) -#endif - static const uint16_t bilinear_taps_coeff[8][2] = { {128, 0}, {112, 16}, diff --git a/vpx_ports/mem.h b/vpx_ports/mem.h index e91d77694..1cb8c8cd9 100644 --- a/vpx_ports/mem.h +++ b/vpx_ports/mem.h @@ -23,7 +23,6 @@ #warning No alignment directives known for this compiler. #define DECLARE_ALIGNED(n,typ,val) typ val #endif -#endif /* Declare an aligned array on the stack, for situations where the stack @@ -44,4 +43,10 @@ #define UNINITIALIZED_IS_SAFE(x) x=x #else #define UNINITIALIZED_IS_SAFE(x) x +#endif + +#if HAVE_NEON && defined(_MSC_VER) +#define __builtin_prefetch(x) +#endif + #endif // VPX_PORTS_MEM_H_