From 753b65737f65296914bcf5055f82272af3ef2e65 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 11 Jan 2008 00:46:09 +0000 Subject: Greyscale mpegplayer: * Use uncached greyscale buffers on dual core targets, removing the need for special cache handling. * Make the OSD properly disappear when viewing a widescreen or small video. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16052 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/stream_mgr.c | 44 ++++++------------------------------ 1 file changed, 7 insertions(+), 37 deletions(-) (limited to 'apps/plugins/mpegplayer/stream_mgr.c') diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 2d4cfb2..14457a7 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c @@ -661,12 +661,7 @@ bool stream_show_vo(bool show) vis = parser_send_video_msg(VIDEO_DISPLAY_SHOW, show); #ifndef HAVE_LCD_COLOR - GRAY_VIDEO_INVALIDATE_ICACHE(); - GRAY_INVALIDATE_ICACHE(); - grey_show(show); - - GRAY_FLUSH_ICACHE(); #endif stream_mgr_unlock(); @@ -722,42 +717,11 @@ void stream_gray_show(bool show) { stream_mgr_lock(); - GRAY_VIDEO_INVALIDATE_ICACHE(); - GRAY_INVALIDATE_ICACHE(); - grey_show(show); - GRAY_FLUSH_ICACHE(); - stream_mgr_unlock(); } -#ifdef GRAY_CACHE_MAINT -void stream_gray_pause(bool pause) -{ - static bool gray_paused = false; - - if (pause && !gray_paused) - { - if (_grey_info.flags & _GREY_RUNNING) - { - rb->timer_unregister(); -#if defined(CPU_PP) && defined(HAVE_ADJUSTABLE_CPU_FREQ) - rb->cpu_boost(false); -#endif - _grey_info.flags &= ~_GREY_RUNNING; - rb->screen_dump_set_hook(NULL); - gray_paused = true; - } - } - else if (!pause && gray_paused) - { - gray_paused = false; - grey_show(true); - } -} -#endif - #endif /* !HAVE_LCD_COLOR */ /* Display a thumbnail at the last seek point */ @@ -1013,11 +977,17 @@ int stream_init(void) #ifndef HAVE_LCD_COLOR bool success; long graysize; + void *graymem; +#ifdef PROC_NEEDS_CACHEALIGN /* This can run on another processor - align data */ memsize = CACHEALIGN_BUFFER(&mem, memsize); + graymem = UNCACHED_ADDR(mem); +#else + graymem = mem; +#endif - success = grey_init(rb, mem, memsize, true, LCD_WIDTH, + success = grey_init(rb, graymem, memsize, true, LCD_WIDTH, LCD_HEIGHT, &graysize); /* This can run on another processor - align size */ -- cgit v1.1