Commit a92494b7 authored by jzern's avatar jzern Committed by Commit bot

libwebp: cherry-pick lossless decoding fix

783a8cd Regression fix for lossless decoding

Regression fix for lossless decoding

Reported here: https://code.google.com/p/webp/issues/detail?id=239

At the beginning of method 'DecodeImageData', pixels up to
'dec->last_pixel_' are assumed to be already cached. So, at the end of
previous call to that method also, that assumption should hold true.

Hence, we should cache all pixels up to 'src' regardless of 'src_last'.

This affects lossless incremental decoding only, as that is when
src_last and src_end differ.
Note: alpha decoding is implicitly incremental, as alpha decoding of
only the rows 'y_end - y_start' happens during FinishRow() call. So, this bug
affects alpha decoding in non-incremental decoding flow as well.

This bug was introduced in: https://gerrit.chromium.org/gerrit/#/c/59716.

BUG=

Review URL: https://codereview.chromium.org/872923002

Cr-Commit-Position: refs/heads/master@{#312966}
parent 45d5f894
......@@ -24,3 +24,4 @@ Cherry-picks:
Revert patch f7fc4bc: dec/webp.c: don't wait for data before reporting w/h
6638710 webp/types.h: use inline for clang++/-std=c++11
a3946b8 enc_neon: fix building with non-Xcode clang (iOS)
783a8cd Regression fix for lossless decoding
......@@ -900,7 +900,7 @@ static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data,
process_func(dec, row);
}
}
if (src < src_last) {
if (src < src_end) {
if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row);
if (color_cache != NULL) {
while (last_cached < src) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment