dsp/neon.h: coalesce intrinsics-related defines

Change-Id: Ifadd41a5bbf7f99eeb6d75d2b67daa25e0544946
This commit is contained in:
James Zern 2014-05-03 11:34:07 -07:00
parent b5c7525897
commit b9d2bb67d6
4 changed files with 16 additions and 26 deletions

View File

@ -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)); \

View File

@ -15,8 +15,6 @@
#if defined(WEBP_USE_NEON)
// #define USE_INTRINSICS // use intrinsics when possible
#include <assert.h>
#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

View File

@ -18,10 +18,7 @@
#include <arm_neon.h>
#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

View File

@ -14,6 +14,17 @@
#include <arm_neon.h>
#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;