mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
c4ed88f593
commit
92785b8f2f
5 changed files with 356 additions and 212 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue