From feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 4 Jan 2008 23:42:38 +0000 Subject: All-new greyscale library, replacing the old one. Features: (1) Drawing/updating is faster than the old grayscale lib at full depth. (2) Always 129 shades instead of 2..33 shades. (3) No graininess caused by frequent updates (mpegplayer, doom, ...). (4) Needs less memory than the old grayscale lib at full depth. * The tradeoff is slightly higher CPU load in the ISR (frames are calculated 'live') and an extra function in the core. * Ported all plugins which used the graylib to use the new one. * Some slight optimisations for archos and H1x0 LCD update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15998 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/lcd.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'firmware/export') diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index de03222441..60d9efaf92 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -95,15 +95,24 @@ extern void lcd_puts_scroll(int x, int y, const unsigned char* string); extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, int style); +#ifdef HAVE_LCD_BITMAP + #if defined(HAVE_LCD_COLOR) #define LCD_YUV_DITHER 0x1 extern void lcd_yuv_set_options(unsigned options); extern void lcd_yuv_blit(unsigned char * const src[3], int src_x, int src_y, int stride, int x, int y, int width, int height); +#else +struct grey_data { + unsigned char phase; /* SH1 uses it signed (doesn't matter for high level) */ + unsigned char value; /* 0..128 are allowed */ +} __attribute__((packed)); +extern void lcd_grey_data(const struct grey_data *data, int count); /* private */ +extern void lcd_grey_phase_blit(const struct grey_data *data, int bx, int by, + int bwidth, int bheight, int stride); #endif -#ifdef HAVE_LCD_BITMAP /* performance function */ extern void lcd_blit(const fb_data* data, int x, int by, int width, int bheight, int stride); -- cgit v1.2.3