Do not use lcd_blit_yuv() if MEMORYSIZE <= 2, since mpegplayer won't run anyway (and won't build)
Only affected target: Sansa c200v2 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21453 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
04451b4369
commit
a98c54f5f1
5 changed files with 16 additions and 16 deletions
|
@ -126,11 +126,13 @@ 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)
|
||||
lcd_yuv_set_options,
|
||||
#endif
|
||||
#endif /* MEMORYSIZE > 2 */
|
||||
#elif (LCD_DEPTH < 4) && !defined(SIMULATOR)
|
||||
lcd_blit_mono,
|
||||
lcd_blit_grey_phase,
|
||||
|
|
|
@ -128,12 +128,12 @@ void* plugin_get_buffer(size_t *buffer_size);
|
|||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define PLUGIN_API_VERSION 155
|
||||
#define PLUGIN_API_VERSION 156
|
||||
|
||||
/* update this to latest version if a change to the api struct breaks
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
new function which are "waiting" at the end of the function table) */
|
||||
#define PLUGIN_MIN_API_VERSION 151
|
||||
#define PLUGIN_MIN_API_VERSION 156
|
||||
|
||||
/* plugin return codes */
|
||||
enum plugin_status {
|
||||
|
@ -205,6 +205,7 @@ 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);
|
||||
|
@ -212,6 +213,7 @@ struct plugin_api {
|
|||
|| defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) || defined(SANSA_FUZE) || defined(SANSA_E200V2)
|
||||
void (*lcd_yuv_set_options)(unsigned options);
|
||||
#endif
|
||||
#endif /* MEMORYSIZE > 2 */
|
||||
#elif (LCD_DEPTH < 4) && !defined(SIMULATOR)
|
||||
void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
|
|
|
@ -132,7 +132,7 @@ static void time_main_update(void)
|
|||
log_text(str);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
|
||||
|
||||
#if LCD_WIDTH >= LCD_HEIGHT
|
||||
#define YUV_WIDTH LCD_WIDTH
|
||||
|
@ -353,7 +353,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
|
||||
log_text("Main LCD Update");
|
||||
time_main_update();
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
|
||||
log_text("Main LCD YUV");
|
||||
time_main_yuv();
|
||||
#endif
|
||||
|
|
|
@ -151,11 +151,13 @@ extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
|
|||
|
||||
/* performance function */
|
||||
#if defined(HAVE_LCD_COLOR)
|
||||
#if MEMORYSIZE > 2
|
||||
#define LCD_YUV_DITHER 0x1
|
||||
extern void lcd_yuv_set_options(unsigned options);
|
||||
extern 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);
|
||||
#endif /* MEMORYSIZE > 2 */
|
||||
#else
|
||||
extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
|
|
|
@ -30,7 +30,9 @@ static bool lcd_busy = false;
|
|||
#endif
|
||||
|
||||
/* Display status */
|
||||
#if MEMORYSIZE > 2
|
||||
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
||||
#endif
|
||||
static bool is_lcd_enabled = true;
|
||||
|
||||
/* LCD command set for Samsung S6B33B2 */
|
||||
|
@ -328,6 +330,7 @@ void lcd_set_flip(bool yesno)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
#if MEMORYSIZE > 2
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
|
@ -350,10 +353,6 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
unsigned char const * yuv_src[3];
|
||||
off_t z;
|
||||
|
||||
#ifdef SANSA_C200V2
|
||||
lcd_busy = true;
|
||||
#endif
|
||||
|
||||
/* Sorry, but width and height must be >= 2 or else */
|
||||
width &= ~1;
|
||||
height >>= 1;
|
||||
|
@ -377,9 +376,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
lcd_send_command(R_Y_ADDR_AREA, y);
|
||||
lcd_send_command(y + 1, 0);
|
||||
|
||||
#ifndef SANSA_C200V2 // TODO
|
||||
lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y);
|
||||
#endif
|
||||
|
||||
yuv_src[0] += stride << 1; /* Skip down two luma lines */
|
||||
yuv_src[1] += stride >> 1; /* Skip down one chroma line */
|
||||
yuv_src[2] += stride >> 1;
|
||||
|
@ -394,9 +392,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
lcd_send_command(R_Y_ADDR_AREA, y);
|
||||
lcd_send_command(y + 1, 0);
|
||||
|
||||
#ifndef SANSA_C200V2 // TODO
|
||||
lcd_write_yuv420_lines(yuv_src, width, stride);
|
||||
#endif
|
||||
|
||||
yuv_src[0] += stride << 1; /* Skip down two luma lines */
|
||||
yuv_src[1] += stride >> 1; /* Skip down one chroma line */
|
||||
yuv_src[2] += stride >> 1;
|
||||
|
@ -404,11 +401,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
}
|
||||
while (--height > 0);
|
||||
}
|
||||
|
||||
#ifdef SANSA_C200V2
|
||||
lcd_busy = false;
|
||||
#endif
|
||||
}
|
||||
#endif /* MEMORYSIZE > 2 */
|
||||
|
||||
/* Update the display.
|
||||
This must be called after all other LCD functions that change the display. */
|
||||
|
|
Loading…
Reference in a new issue