From 4aa3e4122bd9cf9cb05e019258d5c0049cc7e0bb Mon Sep 17 00:00:00 2001 From: Djordje Pesut Date: Tue, 25 Feb 2014 13:29:45 +0100 Subject: [PATCH] MIPS: MIPS32r1: rescaler bugfix Change-Id: I6de6e2488bd5bd58c1f705739e4467feb211f8b4 --- src/utils/rescaler.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/utils/rescaler.c b/src/utils/rescaler.c index 1c1392dd..eea13fb8 100644 --- a/src/utils/rescaler.c +++ b/src/utils/rescaler.c @@ -14,6 +14,7 @@ #include #include #include "./rescaler.h" +#include "../dsp/dsp.h" //------------------------------------------------------------------------------ // Implementations of critical functions ImportRow / ExportRow @@ -243,6 +244,8 @@ static void ExportRowMIPS(WebPRescaler* const wrk, int x_out) { : [temp2]"r"(temp2), [yscale]"r"(yscale), [temp8]"r"(temp8) : "memory", "hi", "lo" ); + wrk->y_accum += wrk->y_add; + wrk->dst += wrk->dst_stride; } else { ExportRowC(wrk, x_out); } @@ -281,12 +284,14 @@ void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height, if (WebPRescalerImportRow == NULL) { WebPRescalerImportRow = ImportRowC; WebPRescalerExportRow = ExportRowC; + if (VP8GetCPUInfo) { #if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - WebPRescalerImportRow = ImportRowMIPS; - WebPRescalerExportRow = ExportRowMIPS; - } + if (VP8GetCPUInfo(kMIPS32)) { + WebPRescalerImportRow = ImportRowMIPS; + WebPRescalerExportRow = ExportRowMIPS; + } #endif + } } }