Commit 5e2cd3a6 authored by jzern@chromium.org's avatar jzern@chromium.org

libwebp: mips build fixes

dsp: detect mips64 & disable mips32 code
enc_mips32: workaround gcc-4.9 bug
BUG=374343

Review URL: https://codereview.chromium.org/442853003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287728 0039d316-1c4b-4281-b951-d872f2087c98
parent a22cc40b
......@@ -20,5 +20,8 @@ Local changes:
* Removed examples/, documentation and build related files, keeping only
the contents of src/ less mux/ which is unused.
* Merged COPYING/PATENTS to LICENSE
* fcf7687 enc_mips32: workaround gcc-4.9 bug
(to be upstreamed if the problem persists in the final ndk r10 release)
Cherry-picks:
Revert patch f7fc4bc: dec/webp.c: don't wait for data before reporting w/h
0524d9e dsp: detect mips64 & disable mips32 code
......@@ -118,7 +118,7 @@ static int armCPUInfo(CPUFeature feature) {
return 1;
}
VP8CPUInfo VP8GetCPUInfo = armCPUInfo;
#elif defined(__mips__)
#elif defined(WEBP_USE_MIPS32)
static int mipsCPUInfo(CPUFeature feature) {
(void)feature;
return 1;
......
......@@ -60,7 +60,7 @@ extern "C" {
#define WEBP_USE_NEON
#endif
#if defined(__mips__)
#if defined(__mips__) && !defined(__mips64)
#define WEBP_USE_MIPS32
#endif
......
......@@ -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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment