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/lib/grey_draw.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/lib/grey_draw.c')
-rw-r--r-- | apps/plugins/lib/grey_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index 6315ad9b1a..c1e6376cfe 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c | |||
@@ -733,7 +733,7 @@ static void output_row_grey_32(uint32_t row, void * row_in, | |||
733 | uint32_t *qp = (uint32_t*)row_in; | 733 | uint32_t *qp = (uint32_t*)row_in; |
734 | uint8_t *dest = (uint8_t*)ctx->bm->data + ctx->bm->width * row; | 734 | uint8_t *dest = (uint8_t*)ctx->bm->data + ctx->bm->width * row; |
735 | for (col = 0; col < ctx->bm->width; col++) | 735 | for (col = 0; col < ctx->bm->width; col++) |
736 | *dest++ = SC_MUL((*qp++) + ctx->round,ctx->divisor); | 736 | *dest++ = SC_OUT(*qp++, ctx); |
737 | } | 737 | } |
738 | 738 | ||
739 | static unsigned int get_size_grey(struct bitmap *bm) | 739 | static unsigned int get_size_grey(struct bitmap *bm) |