diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 19:57:23 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 19:57:23 +0000 |
| commit | 1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323 (patch) | |
| tree | a3862957ba38ea22bfd01504c0389d23cb4b09a9 /apps/plugins/lib | |
| parent | 386f77b0521433f55811f5735aa7a7df5c422760 (diff) | |
| download | rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.zip rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.tar.gz rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.tar.bz2 rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.tar.xz | |
Revert accidental tree commit. /me needs a smaller enter key...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16805 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib')
| -rw-r--r-- | apps/plugins/lib/SOURCES | 3 | ||||
| -rw-r--r-- | apps/plugins/lib/grey.h | 6 | ||||
| -rw-r--r-- | apps/plugins/lib/grey_core.c | 87 | ||||
| -rw-r--r-- | apps/plugins/lib/grey_draw.c | 2 | ||||
| -rw-r--r-- | apps/plugins/lib/grey_parm.c | 4 | ||||
| -rw-r--r-- | apps/plugins/lib/grey_scroll.c | 6 |
6 files changed, 19 insertions, 89 deletions
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 6a44c80..f1aded6 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES @@ -3,7 +3,8 @@ configfile.c fixedpoint.c playback_control.c rgb_hsv.c -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) +#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) \ + && !defined(IAUDIO_M3) /* TODO: Test whether it can be implemented */ grey_core.c grey_draw.c grey_parm.c diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index 4298ae3..ce37e17 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h @@ -134,8 +134,8 @@ void grey_ub_scroll_down(int count); #if LCD_PIXELFORMAT == HORIZONTAL_PACKING #define _GREY_BSHIFT 0 -#else /* vertical packing or vertical interleaved */ -#if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) +#else +#if LCD_DEPTH == 1 #define _GREY_BSHIFT 3 #elif LCD_DEPTH == 2 #define _GREY_BSHIFT 2 @@ -155,7 +155,7 @@ struct _grey_info #if LCD_PIXELFORMAT == HORIZONTAL_PACKING int bx; /* 8-pixel units */ int bwidth; /* 8-pixel units */ -#else /* vertical packing or vertical interleaved */ +#else /* vertical packing */ int by; /* 4-pixel or 8-pixel units */ int bheight; /* 4-pixel or 8-pixel units */ #endif diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index ad8f306..caa7af2 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c @@ -26,8 +26,7 @@ #include "plugin.h" #include "grey.h" -#if defined(HAVE_ADJUSTABLE_CPU_FREQ) && \ - (defined(CPU_PP) || (CONFIG_LCD == LCD_TL0350A)) +#if defined(CPU_PP) && defined(HAVE_ADJUSTABLE_CPU_FREQ) #define NEED_BOOST #endif @@ -144,42 +143,6 @@ static const unsigned char lcdlinear[256] = { 203, 206, 209, 212, 215, 219, 222, 226, 229, 233, 236, 240, 244, 248, 251, 255 }; -#elif CONFIG_LCD == LCD_TL0350A -/* generic linear curve - not yet measured */ -static const unsigned char lcdlinear[256] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255 -}; #endif #else /* SIMULATOR */ /* undo a (generic) PC display gamma of 2.0 to simulate target behaviour */ @@ -262,7 +225,7 @@ static unsigned long _grey_get_pixel(int x, int y) int yg = y - _grey_info.y; #if LCD_PIXELFORMAT == HORIZONTAL_PACKING int idx = _grey_info.width * yg + xg; -#else /* vertical packing or vertical interleaved */ +#else int idx = _grey_info.width * (yg & ~_GREY_BMASK) + (xg << _GREY_BSHIFT) + (~yg & _GREY_BMASK); #endif @@ -280,7 +243,7 @@ static void _timer_isr(void) _grey_info.bx, _grey_info.y, _grey_info.bwidth, _grey_info.height, _grey_info.width); -#else /* vertical packing or vertical interleaved */ +#else _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, _grey_info.x, _grey_info.by, _grey_info.width, _grey_info.bheight, @@ -392,8 +355,8 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, #if LCD_PIXELFORMAT == HORIZONTAL_PACKING bdim = (width + 7) >> 3; width = bdim << 3; -#else /* vertical packing or vertical interleaved */ -#if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) +#else /* vertical packing */ +#if LCD_DEPTH == 1 bdim = (height + 7) >> 3; height = bdim << 3; #elif LCD_DEPTH == 2 @@ -445,7 +408,7 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, #if LCD_PIXELFORMAT == HORIZONTAL_PACKING _grey_info.bx = 0; _grey_info.bwidth = bdim; -#else /* vertical packing or vertical interleaved */ +#else _grey_info.by = 0; _grey_info.bheight = bdim; #endif @@ -528,9 +491,6 @@ void grey_show(bool enable) _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); #elif CONFIG_LCD == LCD_MROBE100 _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); /* not calibrated/tested */ -#elif CONFIG_LCD == LCD_TL0350A - _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 75, 1, _timer_isr); /* verified */ - /* This is half of the actual frame frequency, but 150Hz is too much */ #endif /* CONFIG_LCD */ #endif /* !SIMULATOR */ _grey_info.rb->screen_dump_set_hook(grey_screendump_hook); @@ -647,11 +607,8 @@ static void grey_screendump_hook(int fd) #elif LCD_DEPTH == 2 int shift; #endif -#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED - unsigned data; - int shift; -#endif /* LCD_PIXELFORMAT */ - fb_data *lcdptr; +#endif /* LCD_PIXELFORMAT == VERTICAL_PACKING */ + unsigned char *lcdptr; unsigned char *clut_entry; unsigned char linebuf[MAX(4*BMP_VARCOLORS,BMP_LINESIZE)]; @@ -703,7 +660,7 @@ static void grey_screendump_hook(int fd) lcdptr++; } #endif /* LCD_DEPTH */ -#elif LCD_PIXELFORMAT == VERTICAL_PACKING +#else /* LCD_PIXELFORMAT == VERTICAL_PACKING */ #if LCD_DEPTH == 1 mask = 1 << (y & 7); lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); @@ -751,32 +708,6 @@ static void grey_screendump_hook(int fd) lcdptr++; } #endif /* LCD_DEPTH */ -#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED -#if LCD_DEPTH == 2 - shift = y & 7; - lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); - - for (x = 0; x < LCD_WIDTH; x++) - { - gx = x - _grey_info.x; - - if (((unsigned)gy < (unsigned)_grey_info.height) - && ((unsigned)gx < (unsigned)_grey_info.width)) - { - linebuf[x] = BMP_FIXEDCOLORS - + _grey_info.values[_GREY_MULUQ(_grey_info.width, - gy & ~_GREY_BMASK) - + (gx << _GREY_BSHIFT) - + (~gy & _GREY_BMASK)]; - } - else - { - data = (*lcdptr >> shift) & 0x0101; - linebuf[x] = ((data >> 7) | data) & 3; - } - lcdptr++; - } -#endif /* LCD_DEPTH */ #endif /* LCD_PIXELFORMAT */ _grey_info.rb->write(fd, linebuf, BMP_LINESIZE); diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index a1b99fc..7b24ba4 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c @@ -630,7 +630,7 @@ 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 /* vertical packing or vertical interleaved */ +#else int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK) + (~yc & _GREY_BMASK); #endif /* LCD_PIXELFORMAT */ diff --git a/apps/plugins/lib/grey_parm.c b/apps/plugins/lib/grey_parm.c index e4aaec3..63d09df 100644 --- a/apps/plugins/lib/grey_parm.c +++ b/apps/plugins/lib/grey_parm.c @@ -34,8 +34,8 @@ void grey_set_position(int x, int y) #if LCD_PIXELFORMAT == HORIZONTAL_PACKING _grey_info.bx = (x + 4) >> 3; x = 8 * _grey_info.bx; -#else /* vertical packing or vertical interleaved */ -#if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) +#else +#if LCD_DEPTH == 1 _grey_info.by = (y + 4) >> 3; y = 8 * _grey_info.by; #elif LCD_DEPTH == 2 diff --git a/apps/plugins/lib/grey_scroll.c b/apps/plugins/lib/grey_scroll.c index ba790b0..12a27da 100644 --- a/apps/plugins/lib/grey_scroll.c +++ b/apps/plugins/lib/grey_scroll.c @@ -191,8 +191,7 @@ void grey_ub_scroll_up(int count) _grey_info.fg_brightness : _grey_info.bg_brightness]; -#if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ - || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) +#if LCD_PIXELFORMAT == VERTICAL_PACKING if (count & _GREY_BMASK) { /* Scrolling by fractional blocks - move pixel wise. */ @@ -263,8 +262,7 @@ void grey_ub_scroll_down(int count) _grey_info.fg_brightness : _grey_info.bg_brightness]; -#if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ - || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) +#if LCD_PIXELFORMAT == VERTICAL_PACKING if (count & _GREY_BMASK) { /* Scrolling by fractional blocks - move pixel wise. */ |