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:
Pascal Massimino
2015-09-25 18:49:28 +00:00
committed by James Zern
parent cced974bb2
commit 306ce4fde1
5 changed files with 127 additions and 143 deletions

View File

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