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

@ -187,7 +187,7 @@ static void RescalerExportRowShrinkSSE2(WebPRescaler* const wrk) {
dst[x_out] = v;
irow[x_out] = frac; // new fractional start
}
} else if (wrk->fxy_scale) {
} else {
const uint32_t scale = wrk->fxy_scale;
const __m128i mult = _mm_set_epi32(0, scale, 0, scale);
const __m128i zero = _mm_setzero_si128();
@ -204,11 +204,6 @@ static void RescalerExportRowShrinkSSE2(WebPRescaler* const wrk) {
dst[x_out] = v;
irow[x_out] = 0;
}
} else { // very special case for src = 1x1
for (x_out = 0; x_out < x_out_max; ++x_out) {
dst[x_out] = irow[x_out];
irow[x_out] = 0;
}
}
}