vlc-cvs video output jerky

Gildas Bazin gbazin at netcourrier.com
Thu Jan 10 21:33:05 CET 2002


On Thursday 10 January 2002 07:48, Gildas Bazin wrote:
> 
> By the way these are the results of my tests:
> With XFlush() in vout_Display: corruption in some pictures and the video 
> stutters.
> With XSync() in vout_Display: corruption seems to be gone but the video
> still  stutters.
> With DIRECTBUFFERS=1: the video is definitly smoother.
> 

Ok, I found the problem with the stutter. I noticed that with DIRECTBUFFERS 
<=3 the video is really smooth, but DIRECTBUFFERS=4 is _horrible_, 5 is a 
little bit better and video is smooth again starting from 7 or 8.

The following hack fixes the problem:

Index: src/video_output/vout_pictures.c
===================================================================
RCS file: /var/cvs/videolan/vlc/src/video_output/vout_pictures.c,v
retrieving revision 1.9
diff -u -r1.9 vout_pictures.c
--- src/video_output/vout_pictures.c    2002/01/05 02:22:03     1.9
+++ src/video_output/vout_pictures.c    2002/01/10 20:08:19
@@ -137,12 +137,13 @@
         /* If the picture we found is a memory buffer, and we might have
          * enough room later for a direct buffer, skip it. If no other
          * pictures are found, the video decoder will try again later. */
+#if 0
         if( p_vout->b_direct && ( p_vout->output.i_pictures > 3 )
              && ( p_pic->i_type != DIRECT_PICTURE ) )
         {
             break;
         }
-
+#endif
         switch( p_pic->i_status )
         {
             case DESTROYED_PICTURE:


I understand that this check is actually good if you already have several 
decoded pictures waiting to be displayed, because it's cheaper to decode to 
directbuffers. But with this check and DIRECTBUFFERS=4 I basically never have 
more than 3 decoded pictures waiting to be displayed.
So shall we relax a little the requirements and put:
if( p_vout->b_direct && ( p_vout->output.i_pictures > 5 )

Regards,

--
Gildas




More information about the vlc mailing list