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/plugins/test_fps.c | 91 ------------------------------------------------- 1 file changed, 91 deletions(-) (limited to 'apps/plugins/test_fps.c') 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