1
0
Fork 0
forked from len0rd/rockbox

fix bitmap scallers smooth_resize_bitmap() and simple_resize_bitmap() to properly handle LCD_STRIDEFORMAT == VERTICAL_STRIDE case

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28185 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcin Bukat 2010-09-29 20:38:08 +00:00
parent 717f0bd982
commit 289e862695
2 changed files with 28 additions and 8 deletions

View file

@ -78,10 +78,17 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
fb_data *sptr, *dptr;
int x, y, end;
int val_y = 0, val_x;
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
const int sw = src_bmp->height;
const int sh = src_bmp->width;
const int dw = dest_bmp->height;
const int dh = dest_bmp->width;
#else
const int sw = src_bmp->width;
const int sh = src_bmp->height;
const int dw = dest_bmp->width;
const int dh = dest_bmp->height;
#endif
const int inc_x = (sw << 16) / dw;
const int inc_y = (sh << 16) / dh;
const int Cp_x = ((dw << 14) / sw) + 1;