diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-21 14:09:48 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-21 14:09:48 +0000 |
commit | a98c54f5f121f6323cb230e44b9f1b8d40b07283 (patch) | |
tree | aa313998e0e59231b1bea4bb5cc790632a05dd46 /firmware | |
parent | 04451b436972de653804d0a178de648093453d53 (diff) | |
download | rockbox-a98c54f5f121f6323cb230e44b9f1b8d40b07283.tar.gz rockbox-a98c54f5f121f6323cb230e44b9f1b8d40b07283.zip |
Do not use lcd_blit_yuv() if MEMORYSIZE <= 2, since mpegplayer won't run anyway (and won't build)
Only affected target: Sansa c200v2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21453 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/lcd.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/lcd-c200_c200v2.c | 18 |
2 files changed, 8 insertions, 12 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 870a9d3f61..11fcc98a66 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -151,11 +151,13 @@ extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, | |||
151 | 151 | ||
152 | /* performance function */ | 152 | /* performance function */ |
153 | #if defined(HAVE_LCD_COLOR) | 153 | #if defined(HAVE_LCD_COLOR) |
154 | #if MEMORYSIZE > 2 | ||
154 | #define LCD_YUV_DITHER 0x1 | 155 | #define LCD_YUV_DITHER 0x1 |
155 | extern void lcd_yuv_set_options(unsigned options); | 156 | extern void lcd_yuv_set_options(unsigned options); |
156 | extern void lcd_blit_yuv(unsigned char * const src[3], | 157 | extern void lcd_blit_yuv(unsigned char * const src[3], |
157 | int src_x, int src_y, int stride, | 158 | int src_x, int src_y, int stride, |
158 | int x, int y, int width, int height); | 159 | int x, int y, int width, int height); |
160 | #endif /* MEMORYSIZE > 2 */ | ||
159 | #else | 161 | #else |
160 | extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width, | 162 | extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
161 | int bheight, int stride); | 163 | int bheight, int stride); |
diff --git a/firmware/target/arm/lcd-c200_c200v2.c b/firmware/target/arm/lcd-c200_c200v2.c index 619a03b61e..6665d6ab33 100644 --- a/firmware/target/arm/lcd-c200_c200v2.c +++ b/firmware/target/arm/lcd-c200_c200v2.c | |||
@@ -30,7 +30,9 @@ static bool lcd_busy = false; | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* Display status */ | 32 | /* Display status */ |
33 | #if MEMORYSIZE > 2 | ||
33 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; | 34 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; |
35 | #endif | ||
34 | static bool is_lcd_enabled = true; | 36 | static bool is_lcd_enabled = true; |
35 | 37 | ||
36 | /* LCD command set for Samsung S6B33B2 */ | 38 | /* LCD command set for Samsung S6B33B2 */ |
@@ -328,6 +330,7 @@ void lcd_set_flip(bool yesno) | |||
328 | 330 | ||
329 | /*** update functions ***/ | 331 | /*** update functions ***/ |
330 | 332 | ||
333 | #if MEMORYSIZE > 2 | ||
331 | void lcd_yuv_set_options(unsigned options) | 334 | void lcd_yuv_set_options(unsigned options) |
332 | { | 335 | { |
333 | lcd_yuv_options = options; | 336 | lcd_yuv_options = options; |
@@ -350,10 +353,6 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
350 | unsigned char const * yuv_src[3]; | 353 | unsigned char const * yuv_src[3]; |
351 | off_t z; | 354 | off_t z; |
352 | 355 | ||
353 | #ifdef SANSA_C200V2 | ||
354 | lcd_busy = true; | ||
355 | #endif | ||
356 | |||
357 | /* Sorry, but width and height must be >= 2 or else */ | 356 | /* Sorry, but width and height must be >= 2 or else */ |
358 | width &= ~1; | 357 | width &= ~1; |
359 | height >>= 1; | 358 | height >>= 1; |
@@ -377,9 +376,8 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
377 | lcd_send_command(R_Y_ADDR_AREA, y); | 376 | lcd_send_command(R_Y_ADDR_AREA, y); |
378 | lcd_send_command(y + 1, 0); | 377 | lcd_send_command(y + 1, 0); |
379 | 378 | ||
380 | #ifndef SANSA_C200V2 // TODO | ||
381 | lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); | 379 | lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); |
382 | #endif | 380 | |
383 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | 381 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ |
384 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | 382 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ |
385 | yuv_src[2] += stride >> 1; | 383 | yuv_src[2] += stride >> 1; |
@@ -394,9 +392,8 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
394 | lcd_send_command(R_Y_ADDR_AREA, y); | 392 | lcd_send_command(R_Y_ADDR_AREA, y); |
395 | lcd_send_command(y + 1, 0); | 393 | lcd_send_command(y + 1, 0); |
396 | 394 | ||
397 | #ifndef SANSA_C200V2 // TODO | ||
398 | lcd_write_yuv420_lines(yuv_src, width, stride); | 395 | lcd_write_yuv420_lines(yuv_src, width, stride); |
399 | #endif | 396 | |
400 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | 397 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ |
401 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | 398 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ |
402 | yuv_src[2] += stride >> 1; | 399 | yuv_src[2] += stride >> 1; |
@@ -404,11 +401,8 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
404 | } | 401 | } |
405 | while (--height > 0); | 402 | while (--height > 0); |
406 | } | 403 | } |
407 | |||
408 | #ifdef SANSA_C200V2 | ||
409 | lcd_busy = false; | ||
410 | #endif | ||
411 | } | 404 | } |
405 | #endif /* MEMORYSIZE > 2 */ | ||
412 | 406 | ||
413 | /* Update the display. | 407 | /* Update the display. |
414 | This must be called after all other LCD functions that change the display. */ | 408 | This must be called after all other LCD functions that change the display. */ |