From fe6aa21e9eb88f49005863efd2003d0982920048 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Mon, 3 Oct 2022 10:17:41 +0100 Subject: Remove YUV blitting functions and LCD modes None of this is needed now that mpegplayer is gone. Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8 --- apps/plugin.c | 9 ----- apps/plugin.h | 11 ------ apps/plugins/test_fps.c | 91 ------------------------------------------------- 3 files changed, 111 deletions(-) (limited to 'apps') diff --git a/apps/plugin.c b/apps/plugin.c index 42965bc581..0c780dff6a 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -222,15 +222,6 @@ static const struct plugin_api rockbox_api = { #if LCD_DEPTH >= 16 lcd_bitmap_transparent_part, lcd_bitmap_transparent, -#if MEMORYSIZE > 2 - lcd_blit_yuv, -#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ - || defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) \ - || defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_FUZEV2) \ - || defined(TOSHIBA_GIGABEAT_S) || defined(PHILIPS_SA9200) - lcd_yuv_set_options, -#endif -#endif /* MEMORYSIZE > 2 */ #elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) lcd_blit_mono, lcd_blit_grey_phase, diff --git a/apps/plugin.h b/apps/plugin.h index 984555fdf2..686dd48674 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -242,17 +242,6 @@ struct plugin_api { int x, int y, int width, int height); void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y, int width, int height); -#if MEMORYSIZE > 2 - void (*lcd_blit_yuv)(unsigned char * const src[3], - int src_x, int src_y, int stride, - int x, int y, int width, int height); -#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ - || defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) \ - || defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_FUZEV2) \ - || defined(TOSHIBA_GIGABEAT_S) || defined(PHILIPS_SA9200) - void (*lcd_yuv_set_options)(unsigned options); -#endif -#endif /* MEMORYSIZE > 2 */ #elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, int bheight, int stride); diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index ddf938ac25..b2fc957dc1 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c @@ -123,94 +123,6 @@ static void time_main_update(void) log_text(str); } -#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2) - -#if LCD_WIDTH >= LCD_HEIGHT -#define YUV_WIDTH LCD_WIDTH -#define YUV_HEIGHT LCD_HEIGHT -#else /* Assume the screen is rotated on portrait LCDs */ -#define YUV_WIDTH LCD_HEIGHT -#define YUV_HEIGHT LCD_WIDTH -#endif - -static unsigned char ydata[YUV_HEIGHT][YUV_WIDTH]; -static unsigned char udata[YUV_HEIGHT/2][YUV_WIDTH/2]; -static unsigned char vdata[YUV_HEIGHT/2][YUV_WIDTH/2]; - -static unsigned char * const yuvbuf[3] = { - (void*)ydata, - (void*)udata, - (void*)vdata -}; - -static void make_gradient_rect(int width, int height) -{ - unsigned char vline[YUV_WIDTH/2]; - int x, y; - - width /= 2; - height /= 2; - - for (x = 0; x < width; x++) - vline[x] = (x << 8) / width; - for (y = 0; y < height; y++) - { - rb->memset(udata[y], (y << 8) / height, width); - rb->memcpy(vdata[y], vline, width); - } -} - -static void time_main_yuv(void) -{ - char str[32]; /* text buffer */ - long time_start; /* start tickcount */ - long time_end; /* end tickcount */ - int frame_count; - int fps; - - const int part14_x = YUV_WIDTH/4; /* x-offset for 1/4 update test */ - const int part14_w = YUV_WIDTH/2; /* x-size for 1/4 update test */ - const int part14_y = YUV_HEIGHT/4; /* y-offset for 1/4 update test */ - const int part14_h = YUV_HEIGHT/2; /* y-size for 1/4 update test */ - - log_text("Main LCD YUV"); - - rb->memset(ydata, 128, sizeof(ydata)); /* medium grey */ - - /* Test 1: full LCD update */ - make_gradient_rect(YUV_WIDTH, YUV_HEIGHT); - - frame_count = 0; - rb->sleep(0); /* sync to tick */ - time_start = *rb->current_tick; - while((time_end = *rb->current_tick) - time_start < DURATION) - { - rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, - 0, 0, YUV_WIDTH, YUV_HEIGHT); - frame_count++; - } - fps = calc_tenth_fps(frame_count, time_end - time_start); - rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10); - log_text(str); - - /* Test 2: quarter LCD update */ - make_gradient_rect(YUV_WIDTH/2, YUV_HEIGHT/2); - - frame_count = 0; - rb->sleep(0); /* sync to tick */ - time_start = *rb->current_tick; - while((time_end = *rb->current_tick) - time_start < DURATION) - { - rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, - part14_x, part14_y, part14_w, part14_h); - frame_count++; - } - fps = calc_tenth_fps(frame_count, time_end - time_start); - rb->snprintf(str, sizeof(str), "1/4: %d.%d fps", fps / 10, fps % 10); - log_text(str); -} -#endif - #ifdef HAVE_REMOTE_LCD static void time_remote_update(void) { @@ -406,9 +318,6 @@ enum plugin_status plugin_start(const void* parameter) #endif time_main_update(); rb->sleep(HZ); -#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2) - time_main_yuv(); -#endif #if LCD_DEPTH < 4 time_greyscale(); #endif -- cgit v1.2.3