Fix red for target with insanely wide LCDs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18060 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2008-07-15 18:59:05 +00:00
parent e78cb65a50
commit 7776c7a6f4

View file

@ -302,7 +302,12 @@ lcd_write_yuv420_lines:
#if LCD_WIDTH >= LCD_HEIGHT
add r0, r0, #2*LCD_WIDTH
strh r12, [r0, #2]
#if LCD_WIDTH <= 512
sub r0, r0, #(2*LCD_WIDTH)-4
#else
sub r0, r0, #(2*LCD_WIDTH)
add r0, r0, #4
#endif
#else
strh r12, [r0, #-2] @ store pixel
#if LCD_WIDTH < 256
@ -603,7 +608,12 @@ lcd_write_yuv420_lines_odither:
#if LCD_WIDTH >= LCD_HEIGHT
add r0, r0, #2*LCD_WIDTH
strh r1, [r0, #2] @ store pixel
sub r0, r0, #(2*LCD_WIDTH-4)
#if LCD_WIDTH <= 512
sub r0, r0, #(2*LCD_WIDTH)-4
#else
sub r0, r0, #(2*LCD_WIDTH)
add r0, r0, #4
#endif
#else
strh r1, [r0, #-2] @ store pixel
#if LCD_WIDTH < 256