diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-03 10:17:41 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-03 13:30:01 +0100 |
commit | fe6aa21e9eb88f49005863efd2003d0982920048 (patch) | |
tree | 11ffde0fdde131f39145542506cf9020dcf384d3 /firmware/target/arm/lcd-c200_c200v2.c | |
parent | b371ff1f4758f6781e2b89f86bd8e65b8585f56e (diff) | |
download | rockbox-fe6aa21e9eb88f49005863efd2003d0982920048.tar.gz rockbox-fe6aa21e9eb88f49005863efd2003d0982920048.zip |
Remove YUV blitting functions and LCD modes
None of this is needed now that mpegplayer is gone.
Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
Diffstat (limited to 'firmware/target/arm/lcd-c200_c200v2.c')
-rw-r--r-- | firmware/target/arm/lcd-c200_c200v2.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/firmware/target/arm/lcd-c200_c200v2.c b/firmware/target/arm/lcd-c200_c200v2.c index 38877ccac9..665c82f292 100644 --- a/firmware/target/arm/lcd-c200_c200v2.c +++ b/firmware/target/arm/lcd-c200_c200v2.c | |||
@@ -30,9 +30,6 @@ | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* Display status */ | 32 | /* Display status */ |
33 | #if MEMORYSIZE > 2 | ||
34 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; | ||
35 | #endif | ||
36 | static bool is_lcd_enabled = true; | 33 | static bool is_lcd_enabled = true; |
37 | 34 | ||
38 | /* LCD command set for Samsung S6B33B2 */ | 35 | /* LCD command set for Samsung S6B33B2 */ |
@@ -301,80 +298,6 @@ void lcd_set_flip(bool yesno) | |||
301 | 298 | ||
302 | /*** update functions ***/ | 299 | /*** update functions ***/ |
303 | 300 | ||
304 | #if MEMORYSIZE > 2 /* not for C200V2 */ | ||
305 | void lcd_yuv_set_options(unsigned options) | ||
306 | { | ||
307 | lcd_yuv_options = options; | ||
308 | } | ||
309 | |||
310 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. */ | ||
311 | extern void lcd_write_yuv420_lines(unsigned char const * const src[3], | ||
312 | int width, | ||
313 | int stride); | ||
314 | extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3], | ||
315 | int width, | ||
316 | int stride, | ||
317 | int x_screen, /* To align dither pattern */ | ||
318 | int y_screen); | ||
319 | /* Performance function to blit a YUV bitmap directly to the LCD */ | ||
320 | void lcd_blit_yuv(unsigned char * const src[3], | ||
321 | int src_x, int src_y, int stride, | ||
322 | int x, int y, int width, int height) | ||
323 | { | ||
324 | unsigned char const * yuv_src[3]; | ||
325 | off_t z; | ||
326 | |||
327 | /* Sorry, but width and height must be >= 2 or else */ | ||
328 | width &= ~1; | ||
329 | height >>= 1; | ||
330 | |||
331 | y += 0x1a; | ||
332 | |||
333 | z = stride*src_y; | ||
334 | yuv_src[0] = src[0] + z + src_x; | ||
335 | yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1); | ||
336 | yuv_src[2] = src[2] + (yuv_src[1] - src[1]); | ||
337 | |||
338 | lcd_send_command(R_ENTRY_MODE, 0x80); | ||
339 | |||
340 | lcd_send_command(R_X_ADDR_AREA, x); | ||
341 | lcd_send_command(x + width - 1, 0); | ||
342 | |||
343 | if (lcd_yuv_options & LCD_YUV_DITHER) | ||
344 | { | ||
345 | do | ||
346 | { | ||
347 | lcd_send_command(R_Y_ADDR_AREA, y); | ||
348 | lcd_send_command(y + 1, 0); | ||
349 | |||
350 | lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); | ||
351 | |||
352 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | ||
353 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | ||
354 | yuv_src[2] += stride >> 1; | ||
355 | y += 2; | ||
356 | } | ||
357 | while (--height > 0); | ||
358 | } | ||
359 | else | ||
360 | { | ||
361 | do | ||
362 | { | ||
363 | lcd_send_command(R_Y_ADDR_AREA, y); | ||
364 | lcd_send_command(y + 1, 0); | ||
365 | |||
366 | lcd_write_yuv420_lines(yuv_src, width, stride); | ||
367 | |||
368 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | ||
369 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | ||
370 | yuv_src[2] += stride >> 1; | ||
371 | y += 2; | ||
372 | } | ||
373 | while (--height > 0); | ||
374 | } | ||
375 | } | ||
376 | #endif /* MEMORYSIZE > 2 */ | ||
377 | |||
378 | /* Update the display. | 301 | /* Update the display. |
379 | This must be called after all other LCD functions that change the display. */ | 302 | This must be called after all other LCD functions that change the display. */ |
380 | void lcd_update(void) | 303 | void lcd_update(void) |