From 05934f93b97742bfc08cb8758510ba2dc2ad14a4 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 11 Nov 2025 16:18:13 -0800 Subject: [PATCH] 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 --- src/dec/io_dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dec/io_dec.c b/src/dec/io_dec.c index 10ead29a..d96d11aa 100644 --- a/src/dec/io_dec.c +++ b/src/dec/io_dec.c @@ -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)) {