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/lib/grey_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index 6315ad9..c1e6376 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, uint32_t *qp = (uint32_t*)row_in; uint8_t *dest = (uint8_t*)ctx->bm->data + ctx->bm->width * row; for (col = 0; col < ctx->bm->width; col++) - *dest++ = SC_MUL((*qp++) + ctx->round,ctx->divisor); + *dest++ = SC_OUT(*qp++, ctx); } static unsigned int get_size_grey(struct bitmap *bm) -- cgit v1.1