diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index 7216ea12..7b189ed8 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -16,19 +16,9 @@ #if defined(WEBP_USE_NEON) -// #define USE_INTRINSICS // use intrinsics when possible - #include "./neon.h" - #include "../dec/vp8i.h" -// if using intrinsics, this flag avoids some functions that make gcc-4.6.3 -// crash ("internal compiler error: in immed_double_const, at emit-rtl."). -// (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183) -#if !LOCAL_GCC_PREREQ(4,8) -#define WORK_AROUND_GCC -#endif - //------------------------------------------------------------------------------ // NxM Loading functions @@ -84,7 +74,7 @@ static WEBP_INLINE void Load4x16(const uint8_t* const src, int stride, *q1 = vcombine_u8(row0.val[3], row8.val[3]); } -#else +#else // WORK_AROUND_GCC #define LOADQ_LANE_32b(VALUE, LANE) do { \ (VALUE) = vld1q_lane_u32((const uint32_t*)src, (VALUE), (LANE)); \ diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index 7e74e84e..210f10a8 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -15,8 +15,6 @@ #if defined(WEBP_USE_NEON) -// #define USE_INTRINSICS // use intrinsics when possible - #include #include "./neon.h" @@ -969,13 +967,7 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { //------------------------------------------------------------------------------ -// Compilation with gcc-4.6.x is problematic for now. Disable this function -// in this case. -#if !LOCAL_GCC_PREREQ(4,8) -#define SKIP_QUANTIZE -#endif - -#if !defined(SKIP_QUANTIZE) +#if !defined(WORK_AROUND_GCC) static int16x8_t Quantize(int16_t* const in, const VP8Matrix* const mtx, int offset) { @@ -1033,7 +1025,7 @@ static int QuantizeBlock(int16_t in[16], int16_t out[16], return 0; } -#endif // SKIP_QUANTIZE +#endif // !WORK_AROUND_GCC #endif // WEBP_USE_NEON @@ -1056,7 +1048,7 @@ void VP8EncDspInitNEON(void) { VP8SSE16x8 = SSE16x8; VP8SSE8x8 = SSE8x8; VP8SSE4x4 = SSE4x4; -#if !defined(SKIP_QUANTIZE) +#if !defined(WORK_AROUND_GCC) VP8EncQuantizeBlock = QuantizeBlock; #endif #endif // WEBP_USE_NEON diff --git a/src/dsp/lossless_neon.c b/src/dsp/lossless_neon.c index d0ae21c9..5597d9d2 100644 --- a/src/dsp/lossless_neon.c +++ b/src/dsp/lossless_neon.c @@ -18,10 +18,7 @@ #include #include "./lossless.h" - -// Right now, some intrinsics function seem slower, so we disable it. -// Uncomment the following for testing: -// #define USE_INTRINSICS +#include "./neon.h" //------------------------------------------------------------------------------ // Colorspace conversion functions diff --git a/src/dsp/neon.h b/src/dsp/neon.h index 96c089ec..2b42f9e5 100644 --- a/src/dsp/neon.h +++ b/src/dsp/neon.h @@ -14,6 +14,17 @@ #include +#include "./dsp.h" + +// #define USE_INTRINSICS // use intrinsics when possible + +// if using intrinsics, this flag avoids some functions that make gcc-4.6.3 +// crash ("internal compiler error: in immed_double_const, at emit-rtl."). +// (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183) +#if !LOCAL_GCC_PREREQ(4,8) +#define WORK_AROUND_GCC +#endif + static WEBP_INLINE int32x4x4_t Transpose4x4(const int32x4x4_t rows) { uint64x2x2_t row01, row23;