mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
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
Change-Id: Id1b03256c4c04b8db31527e60cd31dd20ce6f3ad
This commit is contained in:
parent
796b5a8a8a
commit
296c7dc4ac
@ -1643,17 +1643,17 @@ int VP8LDecodeImage(VP8LDecoder* const dec) {
|
|||||||
|
|
||||||
#if !defined(WEBP_REDUCE_SIZE)
|
#if !defined(WEBP_REDUCE_SIZE)
|
||||||
if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err;
|
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
|
#else
|
||||||
if (io->use_scaling) {
|
if (io->use_scaling) {
|
||||||
dec->status_ = VP8_STATUS_INVALID_PARAM;
|
dec->status_ = VP8_STATUS_INVALID_PARAM;
|
||||||
goto Err;
|
goto Err;
|
||||||
}
|
}
|
||||||
#endif
|
#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)) {
|
if (!WebPIsRGBMode(dec->output_->colorspace)) {
|
||||||
WebPInitConvertARGBToYUV();
|
WebPInitConvertARGBToYUV();
|
||||||
if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing();
|
if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing();
|
||||||
|
Loading…
Reference in New Issue
Block a user