mirror of
https://github.com/webmproject/libwebp.git
synced 2025-12-23 21:46:26 +01:00
io_dec,CustomSetup: rm unnecessary 'is_alpha' check
`WebPIoInitFromOptions()` doesn't distinguish between `MODE_YUV` and `MODE_YUVA`, only RGB vs YUV. Removing this check also removes a confusing mix up between `MODE_YUV` and `MODE_YUVA` in the conditional. Change-Id: Id46b21785433aded733ad914941398b0bd5d6b8f
This commit is contained in:
@@ -574,7 +574,9 @@ static int CustomSetup(VP8Io* io) {
|
||||
p->emit = NULL;
|
||||
p->emit_alpha = NULL;
|
||||
p->emit_alpha_row = NULL;
|
||||
if (!WebPIoInitFromOptions(p->options, io, is_alpha ? MODE_YUV : MODE_YUVA)) {
|
||||
// Note: WebPIoInitFromOptions() does not distinguish between MODE_YUV and
|
||||
// MODE_YUVA, only RGB vs YUV.
|
||||
if (!WebPIoInitFromOptions(p->options, io, /*src_colorspace=*/MODE_YUV)) {
|
||||
return 0;
|
||||
}
|
||||
if (is_alpha && WebPIsPremultipliedMode(colorspace)) {
|
||||
|
||||
Reference in New Issue
Block a user