diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2008-03-24 00:35:53 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-24 00:35:53 +0000 |
| commit | 68a21689aef3a81335456476d4d10860ef5bc6b3 (patch) | |
| tree | a57b6c31e4edd13e178da276344d33b172796456 /apps | |
| parent | 99c0978faa94b0e2fabe5d06000a10c8d48e7a0c (diff) | |
| download | rockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.zip rockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.tar.gz rockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.tar.bz2 rockbox-68a21689aef3a81335456476d4d10860ef5bc6b3.tar.xz | |
Consistent naming scheme the various blit functions. * Removed lcd_blit_mono() for colour targets. Plugin API became incompatible, so sort, clean up & bump. * Implemented lcd_blit_mono() for M3.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16775 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/plugin.c | 130 | ||||
| -rw-r--r-- | apps/plugin.h | 170 | ||||
| -rw-r--r-- | apps/plugins/chip8.c | 7 | ||||
| -rw-r--r-- | apps/plugins/lib/grey_core.c | 6 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/video_out_rockbox.c | 2 | ||||
| -rw-r--r-- | apps/plugins/test_fps.c | 8 | ||||
| -rw-r--r-- | apps/plugins/video.c | 4 |
7 files changed, 151 insertions, 176 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 6862ddb..15a7e91 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -74,6 +74,7 @@ static const struct plugin_api rockbox_api = { /* lcd */ lcd_set_contrast, lcd_update, + lcd_update_rect, lcd_clear_display, lcd_setmargins, lcd_getstringsize, @@ -91,6 +92,7 @@ static const struct plugin_api rockbox_api = { lcd_icon, lcd_double_height, #else + &lcd_framebuffer[0][0], lcd_set_drawmode, lcd_get_drawmode, lcd_setfont, @@ -115,21 +117,27 @@ static const struct plugin_api rockbox_api = { #if LCD_DEPTH == 16 lcd_bitmap_transparent_part, lcd_bitmap_transparent, + lcd_blit_yuv, +#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ + || defined (IRIVER_H10) + lcd_yuv_set_options, #endif +#elif (LCD_DEPTH < 4) || !defined(SIMULATOR) + lcd_blit_mono, + lcd_blit_grey_phase, +#endif /* LCD_DEPTH */ + lcd_puts_style, + lcd_puts_scroll_style, bidi_l2v, font_get_bits, font_load, - lcd_puts_style, - lcd_puts_scroll_style, - &lcd_framebuffer[0][0], - lcd_blit, - lcd_update_rect, - gui_scrollbar_draw, font_get, font_getstringsize, font_get_width, screen_clear_area, + gui_scrollbar_draw, #endif + backlight_on, backlight_off, backlight_set_timeout, @@ -137,6 +145,7 @@ static const struct plugin_api rockbox_api = { backlight_set_timeout_plugged, #endif gui_syncsplash, + #ifdef HAVE_REMOTE_LCD /* remote lcd */ lcd_remote_set_contrast, @@ -166,7 +175,11 @@ static const struct plugin_api rockbox_api = { remote_backlight_on, remote_backlight_off, + remote_backlight_set_timeout, +#if CONFIG_CHARGING + remote_backlight_set_timeout_plugged, #endif +#endif /* HAVE_REMOTE_LCD */ #if NB_SCREENS == 2 {&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]}, #else @@ -181,16 +194,6 @@ static const struct plugin_api rockbox_api = { lcd_remote_bitmap, #endif -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR) - lcd_grey_phase_blit, -#endif -#if defined(HAVE_LCD_COLOR) - lcd_yuv_blit, -#endif -#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ - || defined (IRIVER_H10) - lcd_yuv_set_options, -#endif /* list */ gui_synclist_init, gui_synclist_set_nb_items, @@ -233,9 +236,11 @@ static const struct plugin_api rockbox_api = { ata_sleep, ata_disk_is_active, #endif + ata_spin, ata_spindown, reload_directory, create_numbered_filename, + file_exists, /* dir */ opendir, @@ -243,6 +248,7 @@ static const struct plugin_api rockbox_api = { readdir, mkdir, rmdir, + dir_exists, /* kernel/ system */ PREFIX(sleep), @@ -256,6 +262,14 @@ static const struct plugin_api rockbox_api = { threads, create_thread, remove_thread, + thread_wait, +#if (CONFIG_CODEC == SWCODEC) + mutex_init, + mutex_lock, + mutex_unlock, + align_buffer, +#endif + reset_poweroff_timer, #ifndef SIMULATOR system_memory_guard, @@ -267,7 +281,15 @@ static const struct plugin_api rockbox_api = { #else cpu_boost, #endif +#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ +#endif /* !SIMULATOR */ +#ifdef HAVE_SCHEDULER_BOOSTCTRL + trigger_cpu_boost, + cancel_cpu_boost, #endif +#ifdef CACHE_FUNCTIONS_AS_CALL + flush_icache, + invalidate_icache, #endif timer_register, timer_unregister, @@ -277,6 +299,13 @@ static const struct plugin_api rockbox_api = { queue_delete, queue_post, queue_wait_w_tmo, +#if CONFIG_CODEC == SWCODEC + queue_enable_queue_send, + queue_empty, + queue_wait, + queue_send, + queue_reply, +#endif usb_acknowledge, #ifdef RB_PROFILE profile_thread, @@ -325,13 +354,12 @@ static const struct plugin_api rockbox_api = { utf8seek, /* sound */ -#if CONFIG_CODEC == SWCODEC - sound_default, -#endif sound_set, - + sound_default, sound_min, sound_max, + sound_unit, + sound_val2phys, #ifndef SIMULATOR mp3_play_data, mp3_play_pause, @@ -353,6 +381,8 @@ static const struct plugin_api rockbox_api = { pcm_play_pause, pcm_get_bytes_waiting, pcm_calculate_peaks, + pcm_play_lock, + pcm_play_unlock, #ifdef HAVE_RECORDING &rec_freq_sampr[0], pcm_init_recording, @@ -367,6 +397,11 @@ static const struct plugin_api rockbox_api = { audio_set_output_source, audio_set_input_source, #endif + dsp_set_crossfeed, + dsp_set_eq, + dsp_dither_enable, + dsp_configure, + dsp_process, #endif /* CONFIG_CODEC == SWCODEC */ /* playback control */ @@ -508,35 +543,6 @@ static const struct plugin_api rockbox_api = { detect_flashed_romimage, #endif led, -#ifdef CACHE_FUNCTIONS_AS_CALL - flush_icache, - invalidate_icache, -#endif - /* new stuff at the end, sort into place next time - the API gets incompatible */ - -#if (CONFIG_CODEC == SWCODEC) - mutex_init, - mutex_lock, - mutex_unlock, -#endif - - thread_wait, - -#if (CONFIG_CODEC == SWCODEC) - align_buffer, -#endif - - file_exists, - dir_exists, - -#ifdef HAVE_REMOTE_LCD - remote_backlight_set_timeout, -#if CONFIG_CHARGING - remote_backlight_set_timeout_plugged, -#endif -#endif /* HAVE_REMOTE_LCD */ - #if (CONFIG_CODEC == SWCODEC) bufopen, bufalloc, @@ -569,29 +575,9 @@ static const struct plugin_api rockbox_api = { search_albumart_files, #endif -#if CONFIG_CODEC == SWCODEC - pcm_play_lock, - pcm_play_unlock, - queue_enable_queue_send, - queue_empty, - queue_wait, - queue_send, - queue_reply, -#ifndef HAVE_FLASH_STORAGE - ata_spin, -#endif -#ifdef HAVE_SCHEDULER_BOOSTCTRL - trigger_cpu_boost, - cancel_cpu_boost, -#endif - sound_unit, - sound_val2phys, - dsp_set_crossfeed, - dsp_set_eq, - dsp_dither_enable, - dsp_configure, - dsp_process, -#endif /* CONFIG_CODEC == SWCODEC */ + /* new stuff at the end, sort into place next time + the API gets incompatible */ + }; int plugin_load(const char* plugin, void* parameter) diff --git a/apps/plugin.h b/apps/plugin.h index 164a2c9..30c04ce 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -119,12 +119,12 @@ #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 99 +#define PLUGIN_API_VERSION 100 /* 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 98 +#define PLUGIN_MIN_API_VERSION 100 /* plugin return codes */ enum plugin_status { @@ -144,6 +144,7 @@ struct plugin_api { /* lcd */ void (*lcd_set_contrast)(int x); void (*lcd_update)(void); + void (*lcd_update_rect)(int x, int y, int width, int height); void (*lcd_clear_display)(void); void (*lcd_setmargins)(int x, int y); int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h); @@ -160,7 +161,8 @@ struct plugin_api { void (*lcd_remove_cursor)(void); void (*lcd_icon)(int icon, bool enable); void (*lcd_double_height)(bool on); -#else +#else /* HAVE_LCD_BITMAP */ + fb_data* lcd_framebuffer; void (*lcd_set_drawmode)(int mode); int (*lcd_get_drawmode)(void); void (*lcd_setfont)(int font); @@ -192,28 +194,40 @@ 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); + 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); +#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ + || defined (IRIVER_H10) + void (*lcd_yuv_set_options)(unsigned options); #endif - unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); - const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); - struct font* (*font_load)(const char *path); +#elif (LCD_DEPTH < 4) || !defined(SIMULATOR) + void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, + int bheight, int stride); + void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases, + int bx, int by, int bwidth, int bheight, + int stride); +#endif /* LCD_DEPTH */ void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, int style); - fb_data* lcd_framebuffer; - void (*lcd_blit) (const fb_data* data, int x, int by, int width, - int bheight, int stride); - void (*lcd_update_rect)(int x, int y, int width, int height); - void (*gui_scrollbar_draw)(struct screen * screen, int x, int y, - int width, int height, int items, - int min_shown, int max_shown, - unsigned flags); + + unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); + const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); + struct font* (*font_load)(const char *path); struct font* (*font_get)(int font); int (*font_getstringsize)(const unsigned char *str, int *w, int *h, int fontnumber); int (*font_get_width)(struct font* pf, unsigned short char_code); void (*screen_clear_area)(struct screen * display, int xstart, int ystart, int width, int height); -#endif + void (*gui_scrollbar_draw)(struct screen * screen, int x, int y, + int width, int height, int items, + int min_shown, int max_shown, + unsigned flags); +#endif /* HAVE_LCD_BITMAP */ + + /* backlight */ void (*backlight_on)(void); void (*backlight_off)(void); void (*backlight_set_timeout)(int index); @@ -255,7 +269,11 @@ struct plugin_api { void (*remote_backlight_on)(void); void (*remote_backlight_off)(void); + void (*remote_backlight_set_timeout)(int index); +#if CONFIG_CHARGING + void (*remote_backlight_set_timeout_plugged)(int index); #endif +#endif /* HAVE_REMOTE_LCD */ struct screen* screens[NB_SCREENS]; #if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) void (*lcd_remote_set_foreground)(unsigned foreground); @@ -267,22 +285,6 @@ struct plugin_api { void (*lcd_remote_bitmap)(const fb_remote_data *src, int x, int y, int width, int height); #endif -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR) - void (*lcd_grey_phase_blit)(unsigned char *values, unsigned char *phases, - int bx, int by, int bwidth, int bheight, - int stride); -#endif -#if defined(HAVE_LCD_COLOR) - void (*lcd_yuv_blit)(unsigned char * const src[3], - int src_x, int src_y, int stride, - int x, int y, int width, int height); -#endif - -#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ - || defined (IRIVER_H10) - void (*lcd_yuv_set_options)(unsigned options); -#endif - /* list */ void (*gui_synclist_init)(struct gui_synclist * lists, list_get_name callback_get_item_name,void * data, @@ -329,11 +331,14 @@ struct plugin_api { void (*ata_sleep)(void); bool (*ata_disk_is_active)(void); #endif + void (*ata_spin)(void); void (*ata_spindown)(int seconds); void (*reload_directory)(void); char *(*create_numbered_filename)(char *buffer, const char *path, const char *prefix, const char *suffix, int numberlen IF_CNFN_NUM_(, int *num)); + bool (*file_exists)(const char *file); + /* dir */ DIR* (*opendir)(const char* name); @@ -341,6 +346,7 @@ struct plugin_api { struct dirent* (*readdir)(DIR* dir); int (*mkdir)(const char *name); int (*rmdir)(const char *name); + bool (*dir_exists)(const char *path); /* kernel/ system */ void (*PREFIX(sleep))(int ticks); @@ -358,6 +364,14 @@ struct plugin_api { IF_PRIO(, int priority) IF_COP(, unsigned int core)); void (*remove_thread)(struct thread_entry *thread); + void (*thread_wait)(struct thread_entry *thread); +#if CONFIG_CODEC == SWCODEC + void (*mutex_init)(struct mutex *m); + void (*mutex_lock)(struct mutex *m); + void (*mutex_unlock)(struct mutex *m); + size_t (*align_buffer)(void **start, size_t size, size_t align); +#endif + void (*reset_poweroff_timer)(void); #ifndef SIMULATOR int (*system_memory_guard)(int newmode); @@ -368,7 +382,15 @@ struct plugin_api { #else void (*cpu_boost)(bool on_off); #endif +#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ +#endif /* !SIMULATOR */ +#ifdef HAVE_SCHEDULER_BOOSTCTRL + void (*trigger_cpu_boost)(void); + void (*cancel_cpu_boost)(void); #endif +#ifdef CACHE_FUNCTIONS_AS_CALL + void (*flush_icache)(void); + void (*invalidate_icache)(void); #endif bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), long cycles, int int_prio, @@ -381,6 +403,16 @@ struct plugin_api { void (*queue_post)(struct event_queue *q, long id, intptr_t data); void (*queue_wait_w_tmo)(struct event_queue *q, struct queue_event *ev, int ticks); +#if CONFIG_CODEC == SWCODEC + void (*queue_enable_queue_send)(struct event_queue *q, + struct queue_sender_list *send); + bool (*queue_empty)(const struct event_queue *q); + void (*queue_wait)(struct event_queue *q, struct queue_event *ev); + intptr_t (*queue_send)(struct event_queue *q, long id, + intptr_t data); + void (*queue_reply)(struct event_queue *q, intptr_t retval); +#endif /* CONFIG_CODEC == SWCODEC */ + void (*usb_acknowledge)(long id); #ifdef RB_PROFILE void (*profile_thread)(void); @@ -430,12 +462,12 @@ struct plugin_api { int (*utf8seek)(const unsigned char* utf8, int offset); /* sound */ -#if CONFIG_CODEC == SWCODEC - int (*sound_default)(int setting); -#endif void (*sound_set)(int setting, int value); + int (*sound_default)(int setting); int (*sound_min)(int setting); int (*sound_max)(int setting); + const char * (*sound_unit)(int setting); + int (*sound_val2phys)(int setting, int value); #ifndef SIMULATOR void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size)); void (*mp3_play_pause)(bool play); @@ -458,6 +490,8 @@ struct plugin_api { void (*pcm_play_pause)(bool play); size_t (*pcm_get_bytes_waiting)(void); void (*pcm_calculate_peaks)(int *left, int *right); + void (*pcm_play_lock)(void); + void (*pcm_play_unlock)(void); #ifdef HAVE_RECORDING const unsigned long *rec_freq_sampr; void (*pcm_init_recording)(void); @@ -473,6 +507,13 @@ struct plugin_api { void (*audio_set_output_source)(int monitor); void (*audio_set_input_source)(int source, unsigned flags); #endif + void (*dsp_set_crossfeed)(bool enable); + void (*dsp_set_eq)(bool enable); + void (*dsp_dither_enable)(bool enable); + intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting, + intptr_t value); + int (*dsp_process)(struct dsp_config *dsp, char *dest, + const char *src[], int count); #endif /* CONFIG_CODEC == SWCODC */ /* playback control */ @@ -638,37 +679,8 @@ struct plugin_api { void (*led)(bool on); -#ifdef CACHE_FUNCTIONS_AS_CALL - void (*flush_icache)(void); - void (*invalidate_icache)(void); -#endif - - /* new stuff at the end, sort into place next time - the API gets incompatible */ - -#if (CONFIG_CODEC == SWCODEC) - void (*mutex_init)(struct mutex *m); - void (*mutex_lock)(struct mutex *m); - void (*mutex_unlock)(struct mutex *m); -#endif - - void (*thread_wait)(struct thread_entry *thread); - -#if (CONFIG_CODEC == SWCODEC) - size_t (*align_buffer)(void **start, size_t size, size_t align); -#endif - - bool (*file_exists)(const char *file); - bool (*dir_exists)(const char *path); - -#ifdef HAVE_REMOTE_LCD - void (*remote_backlight_set_timeout)(int index); -#if CONFIG_CHARGING - void (*remote_backlight_set_timeout_plugged)(int index); -#endif -#endif /* HAVE_REMOTE_LCD */ - #if (CONFIG_CODEC == SWCODEC) + /* buffering API */ int (*bufopen)(const char *file, size_t offset, enum data_type type); int (*bufalloc)(const void *src, size_t size, enum data_type type); bool (*bufclose)(int handle_id); @@ -704,33 +716,9 @@ struct plugin_api { char *buf, int buflen); #endif -#if CONFIG_CODEC == SWCODEC - void (*pcm_play_lock)(void); - void (*pcm_play_unlock)(void); - void (*queue_enable_queue_send)(struct event_queue *q, - struct queue_sender_list *send); - bool (*queue_empty)(const struct event_queue *q); - void (*queue_wait)(struct event_queue *q, struct queue_event *ev); - intptr_t (*queue_send)(struct event_queue *q, long id, - intptr_t data); - void (*queue_reply)(struct event_queue *q, intptr_t retval); -#ifndef HAVE_FLASH_STORAGE - void (*ata_spin)(void); -#endif -#ifdef HAVE_SCHEDULER_BOOSTCTRL - void (*trigger_cpu_boost)(void); - void (*cancel_cpu_boost)(void); -#endif - const char * (*sound_unit)(int setting); - int (*sound_val2phys)(int setting, int value); - void (*dsp_set_crossfeed)(bool enable); - void (*dsp_set_eq)(bool enable); - void (*dsp_dither_enable)(bool enable); - intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting, - intptr_t value); - int (*dsp_process)(struct dsp_config *dsp, char *dest, - const char *src[], int count); -#endif /* CONFIG_CODEC == SWCODEC */ + /* new stuff at the end, sort into place next time + the API gets incompatible */ + }; /* plugin header */ diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 7e6fda0..0f7e24b 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -1178,11 +1178,12 @@ static void chip8_update_display(void) } #if defined(SIMULATOR) || (LCD_DEPTH > 1) rb->lcd_set_drawmode(DRMODE_SOLID); - rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT); + rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, + CHIP8_HEIGHT); rb->lcd_update(); #else - rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3 - , CHIP8_LCDWIDTH); + rb->lcd_blit_mono(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, + CHIP8_HEIGHT>>3, CHIP8_LCDWIDTH); #endif } diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index 80daf49..caa7af2 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c @@ -239,12 +239,12 @@ static unsigned long _grey_get_pixel(int x, int y) static void _timer_isr(void) { #if LCD_PIXELFORMAT == HORIZONTAL_PACKING - _grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases, + _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, _grey_info.bx, _grey_info.y, _grey_info.bwidth, _grey_info.height, _grey_info.width); #else - _grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases, + _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, _grey_info.x, _grey_info.by, _grey_info.width, _grey_info.bheight, _grey_info.width); @@ -457,7 +457,7 @@ void grey_release(void) grey_deferred_update() instead. Other functions to avoid are: - lcd_blit() (obviously), lcd_update_rect(), lcd_set_contrast(), + lcd_blit_mono(), lcd_update_rect(), lcd_set_contrast(), lcd_set_invert_display(), lcd_set_flip() */ void grey_show(bool enable) { diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c index 86a18cd..c8245cc 100644 --- a/apps/plugins/mpegplayer/video_out_rockbox.c +++ b/apps/plugins/mpegplayer/video_out_rockbox.c @@ -104,7 +104,7 @@ static inline void yuv_blit(uint8_t * const * buf, int src_x, int src_y, video_lock(); #ifdef HAVE_LCD_COLOR - rb->lcd_yuv_blit(buf, src_x, src_y, stride, x, y , width, height); + rb->lcd_blit_yuv(buf, src_x, src_y, stride, x, y , width, height); #else grey_ub_gray_bitmap_part(buf[0], src_x, src_y, stride, x, y, width, height); #endif diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index e8ceaed..7c86fab 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c @@ -192,7 +192,7 @@ static void time_main_yuv(void) time_start = *rb->current_tick; while((time_end = *rb->current_tick) - time_start < DURATION) { - rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH, + rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, 0, 0, YUV_WIDTH, YUV_HEIGHT); frame_count++; } @@ -208,7 +208,7 @@ static void time_main_yuv(void) time_start = *rb->current_tick; while((time_end = *rb->current_tick) - time_start < DURATION) { - rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH, + rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, part14_x, part14_y, part14_w, part14_h); frame_count++; } @@ -260,7 +260,7 @@ static void time_remote_update(void) } #endif -#if LCD_DEPTH < 4 +#if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) GREY_INFO_STRUCT_IRAM static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; @@ -357,7 +357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) log_text("Main LCD YUV"); time_main_yuv(); #endif -#if LCD_DEPTH < 4 +#if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) log_text("Greyscale library"); time_greyscale(); #endif diff --git a/apps/plugins/video.c b/apps/plugins/video.c index 2799e3d..fa1646d 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c @@ -361,13 +361,13 @@ void timer4_isr(void) height = MIN(LCD_HEIGHT/8-1, height); /* reserve bottom line */ if (gPlay.bDirtyOSD) { /* OSD to bottom line */ - rb->lcd_blit(gBuf.pOSD, 0, LCD_HEIGHT/8-1, + rb->lcd_blit_mono(gBuf.pOSD, 0, LCD_HEIGHT/8-1, LCD_WIDTH, 1, LCD_WIDTH); gPlay.bDirtyOSD = false; } } - rb->lcd_blit(gBuf.pReadVideo, 0, 0, + rb->lcd_blit_mono(gBuf.pReadVideo, 0, 0, gFileHdr.video_width, height, gFileHdr.video_width); available = Available(gBuf.pReadVideo); |