Commit 0a4b7817 authored by James Zern's avatar James Zern Committed by Commit Bot

libwebp: cherry-pick fix lossless decoding w/WEBP_REDUCE_SIZE

commit 296c7dc4ac54becebec0b8f32b072becf0b94c33
Author: James Zern <jzern@google.com>
Date:   Wed Nov 29 16:54:23 2017 -0800

    fix lossless decoding w/WEBP_REDUCE_SIZE

    alpha processing is still required when requesting premultiplied output

    since:
    1b27bf8b WEBP_REDUCE_SIZE: disable all rescaler code

Bug: 789665
Change-Id: I4920127e71519a1534ae84ea04b92a8e2ac271d3
Reviewed-on: https://chromium-review.googlesource.com/802399Reviewed-by: default avatarUrvang Joshi <urvang@chromium.org>
Commit-Queue: James Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#521131}
parent f4793783
......@@ -23,3 +23,4 @@ Local changes:
(crbug.com/654974)
Cherry-picks:
Revert patch f7fc4bc: dec/webp.c: don't wait for data before reporting w/h
296c7dc4 fix lossless decoding w/WEBP_REDUCE_SIZE
......@@ -1643,17 +1643,17 @@ int VP8LDecodeImage(VP8LDecoder* const dec) {
#if !defined(WEBP_REDUCE_SIZE)
if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err;
if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) {
// need the alpha-multiply functions for premultiplied output or rescaling
WebPInitAlphaProcessing();
}
#else
if (io->use_scaling) {
dec->status_ = VP8_STATUS_INVALID_PARAM;
goto Err;
}
#endif
if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) {
// need the alpha-multiply functions for premultiplied output or rescaling
WebPInitAlphaProcessing();
}
if (!WebPIsRGBMode(dec->output_->colorspace)) {
WebPInitConvertARGBToYUV();
if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing();
......
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