[vlc-commits] Do not allow direct rendering when the pictures provided by the display are slow to access .

Laurent Aimar git at videolan.org
Sat Mar 5 13:34:42 CET 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Mar  5 12:56:22 2011 +0100| [fc6f10793d165f2ec6cd0902520d308dd57238f8] | committer: Laurent Aimar

Do not allow direct rendering when the pictures provided by the display are slow to access.

The decoder pictures needs to be read back for rendering subtiles/OSD so
it's better to always use fast pictures for the decoders.

But as we don't have any module that provides slow pictures and are still
usable for DR...

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc6f10793d165f2ec6cd0902520d308dd57238f8
---

 src/video_output/video_output.c  |    7 +------
 src/video_output/vout_internal.h |    1 -
 src/video_output/vout_wrapper.c  |    4 +---
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 0d689b2..cbbd566 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -959,12 +959,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
     bool is_direct = vout->p->decoder_pool == vout->p->display_pool;
     picture_t *todisplay = filtered;
     if (do_early_spu && subpic) {
-        if (vout->p->is_decoder_pool_slow) {
-            is_direct = false;
-            todisplay = picture_NewFromFormat(&vd->source); /* FIXME a pool ? */
-        } else {
-            todisplay = picture_pool_Get(vout->p->private_pool);
-        }
+        todisplay = picture_pool_Get(vout->p->private_pool);
         if (todisplay) {
             VideoFormatCopyCropAr(&todisplay->format, &filtered->format);
             picture_Copy(todisplay, filtered);
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 5a404bc..4767cb5 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -136,7 +136,6 @@ struct vout_thread_sys_t
     picture_pool_t  *display_pool;
     picture_pool_t  *decoder_pool;
     picture_fifo_t  *decoder_fifo;
-    bool            is_decoder_pool_slow;
     vout_chrono_t   render;           /**< picture render time estimator */
 };
 
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 48905e1..27b4e73 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -133,7 +133,7 @@ int vout_InitWrapper(vout_thread_t *vout)
     video_format_t source = vd->source;
 
     sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-    const bool allow_dr = !vd->info.has_pictures_invalid && sys->display.use_dr;
+    const bool allow_dr = !vd->info.has_pictures_invalid && !vd->info.is_slow && sys->display.use_dr;
     const unsigned private_picture  = 4; /* XXX 3 for filter, 1 for SPU */
     const unsigned decoder_picture  = 1 + sys->dpb_size;
     const unsigned kept_picture     = 1; /* last displayed picture */
@@ -148,7 +148,6 @@ int vout_InitWrapper(vout_thread_t *vout)
         sys->dpb_size     = picture_pool_GetSize(display_pool) - reserved_picture;
         sys->decoder_pool = display_pool;
         sys->display_pool = display_pool;
-        sys->is_decoder_pool_slow = vd->info.is_slow;
     } else if (!sys->decoder_pool) {
         sys->decoder_pool =
             picture_pool_NewFromFormat(&source,
@@ -161,7 +160,6 @@ int vout_InitWrapper(vout_thread_t *vout)
             sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
         }
         NoDrInit(vout);
-        sys->is_decoder_pool_slow = false;
     }
     sys->private_pool = picture_pool_Reserve(sys->decoder_pool, private_picture);
     sys->display.filtered = NULL;



More information about the vlc-commits mailing list