summaryrefslogtreecommitdiffstats
path: root/apps/plugins/bench_scaler.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-26 20:00:47 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-26 20:00:47 +0000
commit92785b8f2f20b0fc16de7e771e5eb55fd8497ff8 (patch)
tree3af2399c1e1be8e56cb1b5e6787efd738dad6d52 /apps/plugins/bench_scaler.c
parentc4ed88f59302882749023268ac456c415a4b1243 (diff)
downloadrockbox-92785b8f2f20b0fc16de7e771e5eb55fd8497ff8.tar.gz
rockbox-92785b8f2f20b0fc16de7e771e5eb55fd8497ff8.zip
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
Diffstat (limited to 'apps/plugins/bench_scaler.c')
-rw-r--r--apps/plugins/bench_scaler.c4
1 files changed, 2 insertions, 2 deletions
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;
}