summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
index 13e5c5c1d4..2d630886c9 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
@@ -406,36 +406,3 @@ void lcd_update_rect(int x, int y, int width, int height)
406 } while (--height > 0 ); 406 } while (--height > 0 );
407 } 407 }
408} 408}
409
410/* Line write helper function for lcd_yuv_blit. Writes two lines of yuv420. */
411extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
412 const unsigned int lcd_baseadress,
413 int width,
414 int stride);
415
416/* Blit a YUV bitmap directly to the LCD */
417void lcd_blit_yuv(unsigned char * const src[3],
418 int src_x, int src_y, int stride,
419 int x, int y, int width, int height)
420{
421 unsigned int z;
422 unsigned char const * yuv_src[3];
423
424 width = (width + 1) & ~1; /* ensure width is even */
425
426 lcd_setup_drawing_region(x, y, width, height);
427
428 z = stride * src_y;
429 yuv_src[0] = src[0] + z + src_x;
430 yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1);
431 yuv_src[2] = src[2] + (yuv_src[1] - src[1]);
432
433 height >>= 1;
434
435 do {
436 lcd_write_yuv420_lines(yuv_src, LCD_BASE, width, stride);
437 yuv_src[0] += stride << 1;
438 yuv_src[1] += stride >> 1; /* Skip down one chroma line */
439 yuv_src[2] += stride >> 1;
440 } while (--height > 0);
441}