summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/grey_draw.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-25 23:21:36 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-25 23:21:36 +0000
commit40919d7db29d036033f57fe6fbf9e3f562e61c0d (patch)
treeb04fa272f6cee51639b7307ee5fcd9b4f9737fde /apps/plugins/lib/grey_draw.c
parent6ceaf321f3aadc804b1daa8fb10607a7ae209351 (diff)
downloadrockbox-40919d7db29d036033f57fe6fbf9e3f562e61c0d.zip
rockbox-40919d7db29d036033f57fe6fbf9e3f562e61c0d.tar.gz
rockbox-40919d7db29d036033f57fe6fbf9e3f562e61c0d.tar.bz2
rockbox-40919d7db29d036033f57fe6fbf9e3f562e61c0d.tar.xz
iAudio M3: Optimised LCD driver, with more/better assembly code. Speedup is ~80% when boosted, ~15% when unboosted. Also implemented grey phase blitting. * Adapted the greyscale library, and the plugins using it. * Fixed a bug in greyscale scroll down for vertically packed pixels.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16809 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/grey_draw.c')
-rw-r--r--apps/plugins/lib/grey_draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c
index 7b24ba4..6c25083 100644
--- a/apps/plugins/lib/grey_draw.c
+++ b/apps/plugins/lib/grey_draw.c
@@ -630,14 +630,14 @@ void grey_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
{
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
int idx = _GREY_MULUQ(_grey_info.width, yc);
-#else
+#else /* vertical packing or vertical interleaved */
int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK)
+ (~yc & _GREY_BMASK);
#endif /* LCD_PIXELFORMAT */
-#if (LCD_PIXELFORMAT == VERTICAL_PACKING) && \
- ((LCD_DEPTH == 2) && defined(CPU_COLDFIRE) \
- || (LCD_DEPTH == 1) && (CONFIG_CPU == SH7034))
+#if ((LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 1) && (CONFIG_CPU == SH7034)) \
+ || ((LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 2) && defined(CPU_COLDFIRE)) \
+ || ((LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) && defined(CPU_COLDFIRE))
_grey_line1(width, dst + idx, src, _grey_info.gvalue);
#else
unsigned char *dst_row = dst + idx;