summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-color-common.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-06-18 07:15:00 +0200
committerThomas Martitz <kugel@rockbox.org>2014-06-21 00:15:53 +0200
commita1842c04f9cb73210d4cacde61a9e4b115050765 (patch)
treea37af61ef9285b763a42cd33797e2f3d634fbf9f /firmware/drivers/lcd-color-common.c
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip
lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
Diffstat (limited to 'firmware/drivers/lcd-color-common.c')
-rw-r--r--firmware/drivers/lcd-color-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-color-common.c b/firmware/drivers/lcd-color-common.c
index e171f08465..b5b0f58eb3 100644
--- a/firmware/drivers/lcd-color-common.c
+++ b/firmware/drivers/lcd-color-common.c
@@ -422,7 +422,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
422 b = clamp(b, 0, 64*256-1); 422 b = clamp(b, 0, 64*256-1);
423 } 423 }
424 424
425 *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); 425 *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
426 426
427#if LCD_WIDTH >= LCD_HEIGHT 427#if LCD_WIDTH >= LCD_HEIGHT
428 dst++; 428 dst++;
@@ -442,7 +442,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
442 b = clamp(b, 0, 64*256-1); 442 b = clamp(b, 0, 64*256-1);
443 } 443 }
444 444
445 *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); 445 *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
446 446
447#if LCD_WIDTH >= LCD_HEIGHT 447#if LCD_WIDTH >= LCD_HEIGHT
448 dst++; 448 dst++;
@@ -487,7 +487,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
487 b = clamp(b, 0, 64*256-1); 487 b = clamp(b, 0, 64*256-1);
488 } 488 }
489 489
490 *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); 490 *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
491 491
492#if LCD_WIDTH >= LCD_HEIGHT 492#if LCD_WIDTH >= LCD_HEIGHT
493 dst++; 493 dst++;
@@ -507,7 +507,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
507 b = clamp(b, 0, 64*256-1); 507 b = clamp(b, 0, 64*256-1);
508 } 508 }
509 509
510 *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); 510 *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
511 511
512#if LCD_WIDTH >= LCD_HEIGHT 512#if LCD_WIDTH >= LCD_HEIGHT
513 dst++; 513 dst++;