Add in BMP loader for vertical stride and include lcd-16bit-vert.c in SOURCES

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22580 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2009-09-01 00:57:47 +00:00
parent 8cb5df6a46
commit e4345365f1
2 changed files with 23 additions and 0 deletions

View File

@ -423,6 +423,24 @@ void output_row_8_native(uint32_t row, void * row_in,
}
#endif /* LCD_PIXELFORMAT */
#elif LCD_DEPTH == 16
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
/* M:Robe 500 */
fb_data *dest = (fb_data *)ctx->bm->data + row;
int delta = 127;
unsigned r, g, b;
for (col = 0; col < ctx->bm->width; col++) {
if (ctx->dither)
delta = DITHERXDY(col,dy);
r = qp->red;
g = qp->green;
b = (qp++)->blue;
r = (31 * r + (r >> 3) + delta) >> 8;
g = (63 * g + (g >> 2) + delta) >> 8;
b = (31 * b + (b >> 3) + delta) >> 8;
*dest = LCD_RGBPACK_LCD(r, g, b);
dest += ctx->bm->height;
}
#else
/* iriver h300, colour iPods, X5 */
fb_data *dest = (fb_data *)ctx->bm->data + fb_width * row;
int delta = 127;
@ -438,6 +456,7 @@ void output_row_8_native(uint32_t row, void * row_in,
b = (31 * b + (b >> 3) + delta) >> 8;
*dest++ = LCD_RGBPACK_LCD(r, g, b);
}
#endif
#endif /* LCD_DEPTH */
}
#endif

View File

@ -89,7 +89,11 @@ drivers/lcd-2bit-vert.c
drivers/lcd-2bit-vi.c
#endif /* LCD_PIXELFORMAT */
#elif LCD_DEPTH == 16
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
drivers/lcd-16bit-vert.c
#else
drivers/lcd-16bit.c
#endif
#endif /* LCD_DEPTH */
#endif /* HAVE_LCD_BITMAP */