From 40919d7db29d036033f57fe6fbf9e3f562e61c0d Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 25 Mar 2008 23:21:36 +0000 Subject: 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 --- apps/plugins/lib/grey_coldfire.S | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'apps/plugins/lib/grey_coldfire.S') 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 -- cgit v1.1