mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
Fix small entropy analysis bug.
Change-Id: I70554b5a898b38930dfd03ca1ed78a075261e84b
This commit is contained in:
parent
6e7caf06ee
commit
7d985bd1d0
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user