diff options
-rw-r--r-- | firmware/target/arm/lcd-as-memframe.S | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/target/arm/lcd-as-memframe.S b/firmware/target/arm/lcd-as-memframe.S index 519a8a1615..84f549036f 100644 --- a/firmware/target/arm/lcd-as-memframe.S +++ b/firmware/target/arm/lcd-as-memframe.S | |||
@@ -302,8 +302,13 @@ lcd_write_yuv420_lines: | |||
302 | #if LCD_WIDTH >= LCD_HEIGHT | 302 | #if LCD_WIDTH >= LCD_HEIGHT |
303 | add r0, r0, #2*LCD_WIDTH | 303 | add r0, r0, #2*LCD_WIDTH |
304 | strh r12, [r0, #2] | 304 | strh r12, [r0, #2] |
305 | #if LCD_WIDTH <= 512 | ||
305 | sub r0, r0, #(2*LCD_WIDTH)-4 | 306 | sub r0, r0, #(2*LCD_WIDTH)-4 |
306 | #else | 307 | #else |
308 | sub r0, r0, #(2*LCD_WIDTH) | ||
309 | add r0, r0, #4 | ||
310 | #endif | ||
311 | #else | ||
307 | strh r12, [r0, #-2] @ store pixel | 312 | strh r12, [r0, #-2] @ store pixel |
308 | #if LCD_WIDTH < 256 | 313 | #if LCD_WIDTH < 256 |
309 | add r0, r0, #2*LCD_WIDTH @ | 314 | add r0, r0, #2*LCD_WIDTH @ |
@@ -603,7 +608,12 @@ lcd_write_yuv420_lines_odither: | |||
603 | #if LCD_WIDTH >= LCD_HEIGHT | 608 | #if LCD_WIDTH >= LCD_HEIGHT |
604 | add r0, r0, #2*LCD_WIDTH | 609 | add r0, r0, #2*LCD_WIDTH |
605 | strh r1, [r0, #2] @ store pixel | 610 | strh r1, [r0, #2] @ store pixel |
606 | sub r0, r0, #(2*LCD_WIDTH-4) | 611 | #if LCD_WIDTH <= 512 |
612 | sub r0, r0, #(2*LCD_WIDTH)-4 | ||
613 | #else | ||
614 | sub r0, r0, #(2*LCD_WIDTH) | ||
615 | add r0, r0, #4 | ||
616 | #endif | ||
607 | #else | 617 | #else |
608 | strh r1, [r0, #-2] @ store pixel | 618 | strh r1, [r0, #-2] @ store pixel |
609 | #if LCD_WIDTH < 256 | 619 | #if LCD_WIDTH < 256 |