From 92785b8f2f20b0fc16de7e771e5eb55fd8497ff8 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Tue, 26 May 2009 20:00:47 +0000 Subject: 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 --- apps/plugins/bench_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/plugins/bench_scaler.c') diff --git a/apps/plugins/bench_scaler.c b/apps/plugins/bench_scaler.c index c24807dad6..246271dcc8 100644 --- a/apps/plugins/bench_scaler.c +++ b/apps/plugins/bench_scaler.c @@ -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; } -- cgit v1.2.3