summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c9
-rw-r--r--apps/plugin.h11
-rw-r--r--apps/plugins/test_fps.c91
3 files changed, 0 insertions, 111 deletions
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 = {
222#if LCD_DEPTH >= 16 222#if LCD_DEPTH >= 16
223 lcd_bitmap_transparent_part, 223 lcd_bitmap_transparent_part,
224 lcd_bitmap_transparent, 224 lcd_bitmap_transparent,
225#if MEMORYSIZE > 2
226 lcd_blit_yuv,
227#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
228 || defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) \
229 || defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_FUZEV2) \
230 || defined(TOSHIBA_GIGABEAT_S) || defined(PHILIPS_SA9200)
231 lcd_yuv_set_options,
232#endif
233#endif /* MEMORYSIZE > 2 */
234#elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) 225#elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
235 lcd_blit_mono, 226 lcd_blit_mono,
236 lcd_blit_grey_phase, 227 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 {
242 int x, int y, int width, int height); 242 int x, int y, int width, int height);
243 void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y, 243 void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y,
244 int width, int height); 244 int width, int height);
245#if MEMORYSIZE > 2
246 void (*lcd_blit_yuv)(unsigned char * const src[3],
247 int src_x, int src_y, int stride,
248 int x, int y, int width, int height);
249#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
250 || defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) \
251 || defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(SANSA_FUZEV2) \
252 || defined(TOSHIBA_GIGABEAT_S) || defined(PHILIPS_SA9200)
253 void (*lcd_yuv_set_options)(unsigned options);
254#endif
255#endif /* MEMORYSIZE > 2 */
256#elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) 245#elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
257 void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, 246 void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width,
258 int bheight, int stride); 247 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)
123 log_text(str); 123 log_text(str);
124} 124}
125 125
126#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
127
128#if LCD_WIDTH >= LCD_HEIGHT
129#define YUV_WIDTH LCD_WIDTH
130#define YUV_HEIGHT LCD_HEIGHT
131#else /* Assume the screen is rotated on portrait LCDs */
132#define YUV_WIDTH LCD_HEIGHT
133#define YUV_HEIGHT LCD_WIDTH
134#endif
135
136static unsigned char ydata[YUV_HEIGHT][YUV_WIDTH];
137static unsigned char udata[YUV_HEIGHT/2][YUV_WIDTH/2];
138static unsigned char vdata[YUV_HEIGHT/2][YUV_WIDTH/2];
139
140static unsigned char * const yuvbuf[3] = {
141 (void*)ydata,
142 (void*)udata,
143 (void*)vdata
144};
145
146static void make_gradient_rect(int width, int height)
147{
148 unsigned char vline[YUV_WIDTH/2];
149 int x, y;
150
151 width /= 2;
152 height /= 2;
153
154 for (x = 0; x < width; x++)
155 vline[x] = (x << 8) / width;
156 for (y = 0; y < height; y++)
157 {
158 rb->memset(udata[y], (y << 8) / height, width);
159 rb->memcpy(vdata[y], vline, width);
160 }
161}
162
163static void time_main_yuv(void)
164{
165 char str[32]; /* text buffer */
166 long time_start; /* start tickcount */
167 long time_end; /* end tickcount */
168 int frame_count;
169 int fps;
170
171 const int part14_x = YUV_WIDTH/4; /* x-offset for 1/4 update test */
172 const int part14_w = YUV_WIDTH/2; /* x-size for 1/4 update test */
173 const int part14_y = YUV_HEIGHT/4; /* y-offset for 1/4 update test */
174 const int part14_h = YUV_HEIGHT/2; /* y-size for 1/4 update test */
175
176 log_text("Main LCD YUV");
177
178 rb->memset(ydata, 128, sizeof(ydata)); /* medium grey */
179
180 /* Test 1: full LCD update */
181 make_gradient_rect(YUV_WIDTH, YUV_HEIGHT);
182
183 frame_count = 0;
184 rb->sleep(0); /* sync to tick */
185 time_start = *rb->current_tick;
186 while((time_end = *rb->current_tick) - time_start < DURATION)
187 {
188 rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH,
189 0, 0, YUV_WIDTH, YUV_HEIGHT);
190 frame_count++;
191 }
192 fps = calc_tenth_fps(frame_count, time_end - time_start);
193 rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10);
194 log_text(str);
195
196 /* Test 2: quarter LCD update */
197 make_gradient_rect(YUV_WIDTH/2, YUV_HEIGHT/2);
198
199 frame_count = 0;
200 rb->sleep(0); /* sync to tick */
201 time_start = *rb->current_tick;
202 while((time_end = *rb->current_tick) - time_start < DURATION)
203 {
204 rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH,
205 part14_x, part14_y, part14_w, part14_h);
206 frame_count++;
207 }
208 fps = calc_tenth_fps(frame_count, time_end - time_start);
209 rb->snprintf(str, sizeof(str), "1/4: %d.%d fps", fps / 10, fps % 10);
210 log_text(str);
211}
212#endif
213
214#ifdef HAVE_REMOTE_LCD 126#ifdef HAVE_REMOTE_LCD
215static void time_remote_update(void) 127static void time_remote_update(void)
216{ 128{
@@ -406,9 +318,6 @@ enum plugin_status plugin_start(const void* parameter)
406#endif 318#endif
407 time_main_update(); 319 time_main_update();
408 rb->sleep(HZ); 320 rb->sleep(HZ);
409#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
410 time_main_yuv();
411#endif
412#if LCD_DEPTH < 4 321#if LCD_DEPTH < 4
413 time_greyscale(); 322 time_greyscale();
414#endif 323#endif