From 8933bac21290a64c15a1a4f492e8152fb7fba48f Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 19 Apr 2021 19:02:13 -0700 Subject: [PATCH] WebPIoInitFromOptions: respect incoming bypass_filtering val if bypass_filtering was set to 1 in the user provided options it shouldn't be reset in the use_scaling pass even if the image satisfies the scaling requirements. Change-Id: I036029907886acb63748872d5f8763954a7c607b --- src/dec/webp_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dec/webp_dec.c b/src/dec/webp_dec.c index 42d09887..43a7af50 100644 --- a/src/dec/webp_dec.c +++ b/src/dec/webp_dec.c @@ -835,8 +835,8 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options, if (io->use_scaling) { // disable filter (only for large downscaling ratio). - io->bypass_filtering = (io->scaled_width < W * 3 / 4) && - (io->scaled_height < H * 3 / 4); + io->bypass_filtering |= (io->scaled_width < W * 3 / 4) && + (io->scaled_height < H * 3 / 4); io->fancy_upsampling = 0; } return 1;