[MPlayer-dev-eng] VFCTRL_PERIODIC_UPDATE and juddering

Jason Tackaberry tack at urandom.ca
Sun Apr 23 23:24:58 CEST 2006


Hi list,

Way back in October (or thereabouts) I had submitted a patch for
vf_overlay, which we use for the Freevo project.  As a result of a
review, Reimar suggested an alternative to my code allowed the overlay
to be updated independently of the video framerate that took a more
general approach, and implemented a VFCTRL_PERIODIC_UPDATE vf control.
See attached.

Somewhere along the line (I'm not sure where as I've sadly not been
following mplayer development too carefully, but I'm guessing somewhere
around November or early December), something changed that caused the
video to judder if my vf_overlay filter caused an update during the
sleep loop.

I'm completely at a loss as to why this is.  My filter's put_image
function completes in about 3ms.  video_out->flip_page() takes about
1-2ms.  That's .005 seconds, and the periodic update function will not
update if there's less than .01 seconds on the timer.  It's not an A/V
sync issue, as it judders even with -nosound (although even with sound,
A/V desync is at most 0.001 seconds).  Even if I pass -fps 4, there is
still juddering (which is to say that the duration between frames is not
consistent).

If I comment out the call to vo->flip_page() in periodic_update() the
juddering goes away.  At first I thought it may be related to a vsync
issue, but I'd have figured -fps 4 would have ruled that out.  And I'm
using xv anyway, which doesn't support vsync (to my understanding).  (I
also tried other VOs to no avail.)  Also note that I'm running with
-nodouble, as the approach of saving the last mpi and using that for the
periodic update doesn't work well otherwise.

I'm not really sure what the cause of the juddering is (fundamentally),
so I'm not sure how to fix it.  I do know that it didn't used to behave
this way (prior to say October).  So I'm asking here in the hopes that
someone more familiar with mplayer guts will have an idea to point me in
the right direction.

See attached Reimar's VFCTRL_PERIODIC_UPDATE patch, as well as my
vf_overlay filter (in case I'm doing something wrong in there).  I
certainly appreciate any tips.

Cheers,
Jason.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vfctrl_periodic_update-2006-04-23.patch
Type: text/x-patch
Size: 3278 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060423/4d465f89/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_overlay.c
Type: text/x-csrc
Size: 47865 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060423/4d465f89/attachment.c>


More information about the MPlayer-dev-eng mailing list