diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-color-common.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/drivers/lcd-color-common.c b/firmware/drivers/lcd-color-common.c index 44f62e4481..5f83160dab 100644 --- a/firmware/drivers/lcd-color-common.c +++ b/firmware/drivers/lcd-color-common.c | |||
@@ -239,10 +239,9 @@ __attribute__((weak)) | |||
239 | #endif | 239 | #endif |
240 | void lcd_blit_yuv(unsigned char * const src[3], | 240 | void lcd_blit_yuv(unsigned char * const src[3], |
241 | int src_x, int src_y, int stride, | 241 | int src_x, int src_y, int stride, |
242 | int x, int y, int width, int height) | 242 | int dst_x, int dst_y, int width, int height) |
243 | { | 243 | { |
244 | const unsigned char *ysrc, *usrc, *vsrc; | 244 | const unsigned char *ysrc, *usrc, *vsrc; |
245 | int cb, cr, rv, guv, bu, r, g, b; | ||
246 | 245 | ||
247 | int linecounter; | 246 | int linecounter; |
248 | fb_data *dst, *row_end; | 247 | fb_data *dst, *row_end; |
@@ -253,10 +252,10 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
253 | linecounter = height >> 1; | 252 | linecounter = height >> 1; |
254 | 253 | ||
255 | #if LCD_WIDTH >= LCD_HEIGHT | 254 | #if LCD_WIDTH >= LCD_HEIGHT |
256 | dst = FBADDR(x, y); | 255 | dst = FBADDR(dst_x, dst_y); |
257 | row_end = dst + width; | 256 | row_end = dst + width; |
258 | #else | 257 | #else |
259 | dst = FBADDR(LCD_WIDTH - y - 1, x); | 258 | dst = FBADDR(LCD_WIDTH - dst_y - 1, dst_x); |
260 | row_end = dst + LCD_WIDTH * width; | 259 | row_end = dst + LCD_WIDTH * width; |
261 | #endif | 260 | #endif |
262 | 261 | ||
@@ -272,6 +271,8 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
272 | 271 | ||
273 | do | 272 | do |
274 | { | 273 | { |
274 | int y, cb, cr, rv, guv, bu, r, g, b; | ||
275 | |||
275 | do | 276 | do |
276 | { | 277 | { |
277 | y = YFAC*(*ysrc++ - 16); | 278 | y = YFAC*(*ysrc++ - 16); |
@@ -401,9 +402,9 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
401 | while (--linecounter > 0); | 402 | while (--linecounter > 0); |
402 | 403 | ||
403 | #if LCD_WIDTH >= LCD_HEIGHT | 404 | #if LCD_WIDTH >= LCD_HEIGHT |
404 | lcd_update_rect(x, y, width, height); | 405 | lcd_update_rect(dst_x, dst_y, width, height); |
405 | #else | 406 | #else |
406 | lcd_update_rect(LCD_WIDTH - y - height, x, height, width); | 407 | lcd_update_rect(LCD_WIDTH - dst_y - height, dst_x, height, width); |
407 | #endif | 408 | #endif |
408 | } | 409 | } |
409 | 410 | ||