Use pre-multiplication in scaler to save one multiply per color component on ARM and Coldfire, at the cost of an extra add/shift in the horizontal scaler to reduce values to a workable range. SH-1 retains the same basic math, as

the use of 16x16->32 hardware multiplication in the earlier scaler stages saves more than removing the 32x32->40 multiply to descale output.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21091 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andrew Mahone 2009-05-26 20:00:47 +00:00
parent c4ed88f593
commit 92785b8f2f
5 changed files with 356 additions and 212 deletions

View file

@ -49,8 +49,8 @@ static void output_row_null(uint32_t row, void * row_in,
#else
uint32_t *lim = in + ctx->bm->width;
#endif
for (; in < lim; in++)
output = SC_MUL(*in + ctx->round, ctx->divisor);
while (in < lim)
output = SC_OUT(*in++, ctx);
return;
}