summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/grey_coldfire.S
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_coldfire.S
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_coldfire.S')
-rw-r--r--apps/plugins/lib/grey_coldfire.S27
1 files changed, 17 insertions, 10 deletions
diff --git a/apps/plugins/lib/grey_coldfire.S b/apps/plugins/lib/grey_coldfire.S
index 39df087..a040193 100644
--- a/apps/plugins/lib/grey_coldfire.S
+++ b/apps/plugins/lib/grey_coldfire.S
@@ -31,7 +31,14 @@
.global _grey_line1
.type _grey_line1, @function
-#if (LCD_PIXELFORMAT == VERTICAL_PACKING) && (LCD_DEPTH == 2)
+#if (LCD_PIXELFORMAT == VERTICAL_PACKING) \
+ || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED)
+
+#if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED)
+#define GREY_BSIZE 8
+#elif LCD_DEPTH == 2
+#define GREY_BSIZE 4
+#endif
/****************************************************************************
* void _grey_line1(int width,
@@ -52,7 +59,7 @@ _grey_line1:
move.b (%a1)+, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
subq.l #1, %d2
.p1_h_end:
@@ -66,10 +73,10 @@ _grey_line1:
move.w %d1, %d0
lsr.l #8, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
move.b %d1, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
subq.l #2, %d2
.p2_h_end:
@@ -82,18 +89,18 @@ _grey_line1:
move.w %d1, %d0
lsr.l #8, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
move.b %d1, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
swap %d1
move.w %d1, %d0
lsr.l #8, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
move.b %d1, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
subq.l #4, %d2
bhs.s .p4_loop
@@ -107,10 +114,10 @@ _grey_line1:
move.w %d1, %d0
lsr.l #8, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
move.b %d1, %d0
move.b (%d0.l, %a2), (%a0)
- addq.l #4, %a0
+ addq.l #GREY_BSIZE, %a0
.p2_t_end:
btst.l #0, %d2