diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 23:21:36 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 23:21:36 +0000 |
| commit | 40919d7db29d036033f57fe6fbf9e3f562e61c0d (patch) | |
| tree | b04fa272f6cee51639b7307ee5fcd9b4f9737fde /apps/plugins/lib/grey_scroll.c | |
| parent | 6ceaf321f3aadc804b1daa8fb10607a7ae209351 (diff) | |
| download | rockbox-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_scroll.c')
| -rw-r--r-- | apps/plugins/lib/grey_scroll.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/plugins/lib/grey_scroll.c b/apps/plugins/lib/grey_scroll.c index 12a27da..56021d1 100644 --- a/apps/plugins/lib/grey_scroll.c +++ b/apps/plugins/lib/grey_scroll.c @@ -191,7 +191,8 @@ void grey_ub_scroll_up(int count) _grey_info.fg_brightness : _grey_info.bg_brightness]; -#if LCD_PIXELFORMAT == VERTICAL_PACKING +#if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ + || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) if (count & _GREY_BMASK) { /* Scrolling by fractional blocks - move pixel wise. */ @@ -262,7 +263,8 @@ void grey_ub_scroll_down(int count) _grey_info.fg_brightness : _grey_info.bg_brightness]; -#if LCD_PIXELFORMAT == VERTICAL_PACKING +#if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ + || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) if (count & _GREY_BMASK) { /* Scrolling by fractional blocks - move pixel wise. */ @@ -302,6 +304,9 @@ void grey_ub_scroll_down(int count) } while (dst < line_end); } + /* Top pixel in a block has the highest address, but dst must point + * to the lowest address in that block for the subsequent fill. */ + dst -= _GREY_BMASK; } else #endif @@ -311,7 +316,7 @@ void grey_ub_scroll_down(int count) dst -= blen; _grey_info.rb->memmove(dst, start, blen); } - _grey_info.rb->memset(start, blank, dst - start); + _grey_info.rb->memset(start, blank, dst - start); /* Fill remainder at once. */ #ifdef SIMULATOR _grey_info.rb->sim_lcd_ex_update_rect(_grey_info.x, _grey_info.y, |