diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-26 20:00:47 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-26 20:00:47 +0000 |
commit | 92785b8f2f20b0fc16de7e771e5eb55fd8497ff8 (patch) | |
tree | 3af2399c1e1be8e56cb1b5e6787efd738dad6d52 /apps/plugins/bench_scaler.c | |
parent | c4ed88f59302882749023268ac456c415a4b1243 (diff) | |
download | rockbox-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.c | 4 |
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; } |