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
This commit is contained in:
James Zern 2021-04-19 19:02:13 -07:00
parent 7d416ff085
commit 8933bac212

View File

@ -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;