summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrvang Joshi <urvang@google.com>2015-01-23 12:12:27 -0800
committerJames Zern <jzern@google.com>2015-03-03 17:53:44 -0800
commit5a0c2207f4411a83213f22a05313afc14ca97955 (patch)
tree24a7e630ad88055ba20a13eff80cd33cb70416df
parent6e3a31d59561ff3659212c58411272ccc4b07024 (diff)
downloadlibwebp-5a0c2207f4411a83213f22a05313afc14ca97955.tar.gz
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. (cherry picked from commit 783a8cda2470f313f454538a149a82ea12171c74) Change-Id: Ide6edfeb2609b02aff701e1bd9fd776da0a16be0
-rw-r--r--src/dec/vp8l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dec/vp8l.c b/src/dec/vp8l.c
index a7e7e252..e2780e5b 100644
--- a/src/dec/vp8l.c
+++ b/src/dec/vp8l.c
@@ -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) {