Remove YUV blitting functions and LCD modes

None of this is needed now that mpegplayer is gone.

Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
This commit is contained in:
Aidan MacDonald 2022-10-03 10:17:41 +01:00
parent b371ff1f47
commit fe6aa21e9e
54 changed files with 3 additions and 9638 deletions

View file

@ -35,8 +35,6 @@ static unsigned short disp_control_rev;
/* Contrast setting << 8 */
static int lcd_contrast;
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
/* Forward declarations */
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
static void lcd_display_off(void);
@ -377,79 +375,6 @@ bool lcd_active(void)
/*** update functions ***/
void lcd_yuv_set_options(unsigned options)
{
lcd_yuv_options = options;
}
/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. */
extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
int width,
int stride);
extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
int width,
int stride,
int x_screen, /* To align dither pattern */
int y_screen);
/* Performance function to blit a YUV bitmap directly to the LCD */
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)
{
const unsigned char *yuv_src[3];
const unsigned char *ysrc_max;
int y0;
int options;
if (!display_on)
return;
width &= ~1;
height &= ~1;
lcd_write_reg(R_VERT_RAM_ADDR_POS, ((LCD_WIDTH - 1 - x) << 8) |
((LCD_WIDTH-1) - (x + width - 1)));
y0 = LCD_HEIGHT - 1 - y;
lcd_write_reg(R_ENTRY_MODE,0x1000);
yuv_src[0] = src[0] + src_y * stride + src_x;
yuv_src[1] = src[1] + (src_y * stride >> 2) + (src_x >> 1);
yuv_src[2] = src[2] + (yuv_src[1] - src[1]);
ysrc_max = yuv_src[0] + height * stride;
options = lcd_yuv_options;
do
{
lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (y0 << 8) | (y0 - 1));
lcd_write_reg(R_RAM_ADDR_SET, ((LCD_WIDTH - 1 - x) << 8) | y0);
/* start drawing */
lcd_send_cmd(R_WRITE_DATA_2_GRAM);
if (options & LCD_YUV_DITHER)
{
lcd_write_yuv420_lines_odither(yuv_src, width, stride,x, y);
y -= 2;
}
else
{
lcd_write_yuv420_lines(yuv_src, width, stride);
}
y0 -= 2;
yuv_src[0] += stride << 1;
yuv_src[1] += stride >> 1;
yuv_src[2] += stride >> 1;
}
while (yuv_src[0] < ysrc_max);
lcd_write_reg(R_ENTRY_MODE,0x1008);
}
/* Update a fraction of the display. */
void lcd_update_rect(int x0, int y0, int width, int height)
{