From 7d985bd1d006e591b288208bb9dbe9d74fba3371 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Fri, 24 Feb 2017 13:38:41 +0100 Subject: [PATCH] Fix small entropy analysis bug. Change-Id: I70554b5a898b38930dfd03ca1ed78a075261e84b --- src/enc/vp8l_enc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/enc/vp8l_enc.c b/src/enc/vp8l_enc.c index 30d54aa8..2dd97dcb 100644 --- a/src/enc/vp8l_enc.c +++ b/src/enc/vp8l_enc.c @@ -198,12 +198,10 @@ static int AnalyzeEntropy(const uint32_t* argb, const uint32_t* prev_row = argb; const uint32_t* curr_row = argb + argb_stride; for (y = 1; y < height; ++y) { - uint32_t prev_pix = curr_row[0]; for (x = 1; x < width; ++x) { const uint32_t pix = curr_row[x]; - const uint32_t pix_diff = VP8LSubPixels(pix, prev_pix); + const uint32_t pix_diff = VP8LSubPixels(pix, curr_row[x - 1]); if ((pix_diff == 0) || (pix == prev_row[x])) continue; - prev_pix = pix; AddSingle(pix, &histo[kHistoAlpha * 256], &histo[kHistoRed * 256],