summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/bmp_smooth_scale.c
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-09-29 20:38:08 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-09-29 20:38:08 +0000
commit289e862695a6194ade9f7782cab63a7cbc19c066 (patch)
tree70f02b68d2f1fea7b1ccb72aaf9469e353776ae9 /apps/plugins/lib/bmp_smooth_scale.c
parent717f0bd982004a3df0445d7747f04ab46ea3f6d5 (diff)
downloadrockbox-289e862695a6194ade9f7782cab63a7cbc19c066.zip
rockbox-289e862695a6194ade9f7782cab63a7cbc19c066.tar.gz
rockbox-289e862695a6194ade9f7782cab63a7cbc19c066.tar.bz2
rockbox-289e862695a6194ade9f7782cab63a7cbc19c066.tar.xz
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
Diffstat (limited to 'apps/plugins/lib/bmp_smooth_scale.c')
-rw-r--r--apps/plugins/lib/bmp_smooth_scale.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/lib/bmp_smooth_scale.c b/apps/plugins/lib/bmp_smooth_scale.c
index 4d5eab0..e99ff33 100644
--- a/apps/plugins/lib/bmp_smooth_scale.c
+++ b/apps/plugins/lib/bmp_smooth_scale.c
@@ -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;