diff --git a/src/dsp/dec_mips32.c b/src/dsp/dec_mips32.c index 80afeb29..d00b8f34 100644 --- a/src/dsp/dec_mips32.c +++ b/src/dsp/dec_mips32.c @@ -20,8 +20,8 @@ static const int kC1 = 20091 + (1 << 16); static const int kC2 = 35468; static WEBP_INLINE int abs_mips32(int x) { - const int sign = x >> 31; - return (x ^ sign) - sign; + const int sign = x >> 31; + return (x ^ sign) - sign; } // clips [-1020, 1020] to [-128, 127] @@ -440,7 +440,6 @@ static void HFilter16iMIPS32(uint8_t* p, int stride, } } - //------------------------------------------------------------------------------ // Simple In-loop filtering (Paragraph 15.2) diff --git a/src/dsp/upsampling_mips32.c b/src/dsp/upsampling_mips32.c index 8ea35a3f..a07fdfca 100644 --- a/src/dsp/upsampling_mips32.c +++ b/src/dsp/upsampling_mips32.c @@ -16,8 +16,6 @@ #if defined(WEBP_USE_MIPS32) -#include -#include #include "./yuv.h" //------------------------------------------------------------------------------ @@ -116,9 +114,9 @@ SAMPLE_FUNC_MIPS(SampleBgraLinePairMIPS, 4, 2, 1, 0, 3) void WebPInitSamplersMIPS32(void) { #if defined(WEBP_USE_MIPS32) - WebPSamplers[MODE_RGB] = SampleRgbLinePairMIPS; - WebPSamplers[MODE_RGBA] = SampleRgbaLinePairMIPS; - WebPSamplers[MODE_BGR] = SampleBgrLinePairMIPS; - WebPSamplers[MODE_BGRA] = SampleBgraLinePairMIPS; + WebPSamplers[MODE_RGB] = SampleRgbLinePairMIPS; + WebPSamplers[MODE_RGBA] = SampleRgbaLinePairMIPS; + WebPSamplers[MODE_BGR] = SampleBgrLinePairMIPS; + WebPSamplers[MODE_BGRA] = SampleBgraLinePairMIPS; #endif // WEBP_USE_MIPS32 } diff --git a/src/utils/rescaler.c b/src/utils/rescaler.c index 1da2f0ff..f5b52881 100644 --- a/src/utils/rescaler.c +++ b/src/utils/rescaler.c @@ -51,7 +51,7 @@ void WebPRescalerImportRow(WebPRescaler* const wrk, const uint8_t* const src, int channel) { const int x_stride = wrk->num_channels; const int x_out_max = wrk->dst_width * wrk->num_channels; -#if !defined (__mips__) +#if !defined(__mips__) int x_in = channel; int x_out; int accum = 0; @@ -89,7 +89,7 @@ void WebPRescalerImportRow(WebPRescaler* const wrk, for (x_out = channel; x_out < x_out_max; x_out += x_stride) { wrk->irow[x_out] += wrk->frow[x_out]; } -#else +#else // __mips__ const int fx_scale = wrk->fx_scale; const int x_add = wrk->x_add; const int x_sub = wrk->x_sub; @@ -181,7 +181,7 @@ void WebPRescalerImportRow(WebPRescaler* const wrk, : "memory", "hi", "lo" ); } -#endif // (__mips__) +#endif // !__mips__ } uint8_t* WebPRescalerExportRow(WebPRescaler* const wrk) {