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/as3525/lcd-fuze.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/as3525/lcd-fuze.c')
-rw-r--r-- | firmware/target/arm/as3525/lcd-fuze.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/firmware/target/arm/as3525/lcd-fuze.c b/firmware/target/arm/as3525/lcd-fuze.c index a1ccea348d..b1f62a1c95 100644 --- a/firmware/target/arm/as3525/lcd-fuze.c +++ b/firmware/target/arm/as3525/lcd-fuze.c | |||
@@ -197,86 +197,6 @@ static void lcd_window_y(int ymin, int ymax) | |||
197 | lcd_write_reg(R_RAM_ADDR_SET, ymin); | 197 | lcd_write_reg(R_RAM_ADDR_SET, ymin); |
198 | } | 198 | } |
199 | 199 | ||
200 | static unsigned lcd_yuv_options = 0; | ||
201 | |||
202 | void lcd_yuv_set_options(unsigned options) | ||
203 | { | ||
204 | lcd_yuv_options = options; | ||
205 | } | ||
206 | |||
207 | |||
208 | #ifndef BOOTLOADER | ||
209 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. */ | ||
210 | extern void lcd_write_yuv420_lines(unsigned char const * const src[3], | ||
211 | int width, | ||
212 | int stride); | ||
213 | extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3], | ||
214 | int width, | ||
215 | int stride, | ||
216 | int x_screen, /* To align dither pattern */ | ||
217 | int y_screen); | ||
218 | |||
219 | /* Performance function to blit a YUV bitmap directly to the LCD | ||
220 | * src_x, src_y, width and height should be even | ||
221 | * x, y, width and height have to be within LCD bounds | ||
222 | */ | ||
223 | void lcd_blit_yuv(unsigned char * const src[3], | ||
224 | int src_x, int src_y, int stride, | ||
225 | int x, int y, int width, int height) | ||
226 | { | ||
227 | unsigned char const * yuv_src[3]; | ||
228 | off_t z; | ||
229 | |||
230 | /* Sorry, but width and height must be >= 2 or else */ | ||
231 | width &= ~1; | ||
232 | height >>= 1; | ||
233 | |||
234 | z = stride*src_y; | ||
235 | yuv_src[0] = src[0] + z + src_x; | ||
236 | yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1); | ||
237 | yuv_src[2] = src[2] + (yuv_src[1] - src[1]); | ||
238 | |||
239 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_VIDEO); | ||
240 | |||
241 | lcd_window_x(x, x + width - 1); | ||
242 | |||
243 | if (lcd_yuv_options & LCD_YUV_DITHER) | ||
244 | { | ||
245 | do | ||
246 | { | ||
247 | lcd_window_y(y, y + 1); | ||
248 | |||
249 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | ||
250 | |||
251 | lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); | ||
252 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | ||
253 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | ||
254 | yuv_src[2] += stride >> 1; | ||
255 | y += 2; | ||
256 | } | ||
257 | while (--height > 0); | ||
258 | } | ||
259 | else | ||
260 | { | ||
261 | do | ||
262 | { | ||
263 | lcd_window_y(y, y + 1); | ||
264 | |||
265 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | ||
266 | |||
267 | lcd_write_yuv420_lines(yuv_src, width, stride); | ||
268 | yuv_src[0] += stride << 1; /* Skip down two luma lines */ | ||
269 | yuv_src[1] += stride >> 1; /* Skip down one chroma line */ | ||
270 | yuv_src[2] += stride >> 1; | ||
271 | y += 2; | ||
272 | } | ||
273 | while (--height > 0); | ||
274 | } | ||
275 | } | ||
276 | |||
277 | #endif | ||
278 | |||
279 | |||
280 | /* Update the display. | 200 | /* Update the display. |
281 | This must be called after all other LCD functions that change the display. */ | 201 | This must be called after all other LCD functions that change the display. */ |
282 | void lcd_update(void) | 202 | void lcd_update(void) |