summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2014-10-15 19:08:29 +0200
committerJames Zern <jzern@google.com>2014-10-15 19:58:03 +0200
commite2ecae62f0c451512bfb7b3b43bcda8335b1b39d (patch)
treec1f011ff96cdf900e15d70f9000f8c71f1421252
parent243e68df6028a9f1a099d5c2161ab4c221535803 (diff)
downloadlibwebp-e2ecae62f0c451512bfb7b3b43bcda8335b1b39d.tar.gz
enc_mips32: workaround gcc-4.9 bug
avoids an ICE with NDK r10b + NDK_TOOLCHAIN_VERSION=4.9 In function 'SSE16x16': enc_mips32.c (684) internal compiler error: Segmentation fault Change-Id: I1a3d33c0a9534c97633ab93bcdf9bf59d3a7e473 (cherry picked from commit 0ce27e715ec8d0bc6f3a9bf66b2b0d761ab433f9)
-rw-r--r--src/dsp/enc_mips32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dsp/enc_mips32.c b/src/dsp/enc_mips32.c
index 6acde8a5..def9a169 100644
--- a/src/dsp/enc_mips32.c
+++ b/src/dsp/enc_mips32.c
@@ -20,6 +20,10 @@
#include "../enc/vp8enci.h"
#include "../enc/cost.h"
+#if defined(__GNUC__) && defined(__ANDROID__) && LOCAL_GCC_VERSION == 0x409
+#define WORK_AROUND_GCC
+#endif
+
static const int kC1 = 20091 + (1 << 16);
static const int kC2 = 35468;
@@ -641,6 +645,7 @@ int VP8GetResidualCostMIPS32(int ctx0, const VP8Residual* const res) {
GET_SSE_INNER(C, C + 1, C + 2, C + 3) \
GET_SSE_INNER(D, D + 1, D + 2, D + 3)
+#if !defined(WORK_AROUND_GCC)
static int SSE16x16(const uint8_t* a, const uint8_t* b) {
int count;
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
@@ -742,6 +747,8 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) {
return count;
}
+#endif // WORK_AROUND_GCC
+
#undef GET_SSE_MIPS32
#undef GET_SSE_MIPS32_INNER
@@ -759,9 +766,11 @@ void VP8EncDspInitMIPS32(void) {
VP8TDisto4x4 = Disto4x4;
VP8TDisto16x16 = Disto16x16;
VP8FTransform = FTransform;
+#if !defined(WORK_AROUND_GCC)
VP8SSE16x16 = SSE16x16;
VP8SSE8x8 = SSE8x8;
VP8SSE16x8 = SSE16x8;
VP8SSE4x4 = SSE4x4;
+#endif
#endif // WEBP_USE_MIPS32
}