mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
rescaler: move the 1x1 or 2x1 handling one level up
=> no need to handle it in the sub-functions. Change-Id: I4b0211ecfafbc9c80a73bf2206809a13c94e7911
This commit is contained in:
committed by
James Zern
parent
cced974bb2
commit
306ce4fde1
@ -49,7 +49,7 @@ void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
|
||||
wrk->y_accum = wrk->y_expand ? wrk->y_sub : wrk->y_add;
|
||||
if (!wrk->y_expand) {
|
||||
// note the very special case where x_add = y_add = 1 cannot be represented.
|
||||
// We special-case fxy_scale = 0 in this case, in ExportRowShrink
|
||||
// We special-case fxy_scale = 0 in this case, in WebPRescalerExportRow().
|
||||
wrk->fxy_scale = WEBP_RESCALER_FRAC(dst_height, wrk->x_add * wrk->y_add);
|
||||
wrk->fy_scale = WEBP_RESCALER_FRAC(1, wrk->y_sub);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user