summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-21 14:09:48 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-21 14:09:48 +0000
commita98c54f5f121f6323cb230e44b9f1b8d40b07283 (patch)
treeaa313998e0e59231b1bea4bb5cc790632a05dd46 /firmware/target
parent04451b436972de653804d0a178de648093453d53 (diff)
downloadrockbox-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/target')
-rw-r--r--firmware/target/arm/lcd-c200_c200v2.c18
1 files changed, 6 insertions, 12 deletions
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
33static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; 34static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
35#endif
34static bool is_lcd_enabled = true; 36static 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
331void lcd_yuv_set_options(unsigned options) 334void 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. */