diff --git a/src/dsp/cpu.c b/src/dsp/cpu.c index 34565040..086da836 100644 --- a/src/dsp/cpu.c +++ b/src/dsp/cpu.c @@ -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; diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index 596febb3..73a82536 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -60,7 +60,7 @@ extern "C" { #define WEBP_USE_NEON #endif -#if defined(__mips__) +#if defined(__mips__) && !defined(__mips64) #define WEBP_USE_MIPS32 #endif diff --git a/src/utils/bit_reader_inl.h b/src/utils/bit_reader_inl.h index b8d2c041..81427c62 100644 --- a/src/utils/bit_reader_inl.h +++ b/src/utils/bit_reader_inl.h @@ -24,6 +24,7 @@ #include // memcpy #endif +#include "../dsp/dsp.h" #include "./bit_reader.h" #include "./endian_inl.h" @@ -63,7 +64,7 @@ static WEBP_INLINE void VP8LoadNewBytes(VP8BitReader* const br) { #if defined(WEBP_FORCE_ALIGNED) lbit_t in_bits; memcpy(&in_bits, br->buf_, sizeof(in_bits)); -#elif defined(__mips__) // MIPS +#elif defined(WEBP_USE_MIPS32) // This is needed because of un-aligned read. lbit_t in_bits; lbit_t* p_buf_ = (lbit_t*)br->buf_;