[mythtv] Interesting video jitter effect

Doug Larrick doug at ties.org
Sun Nov 28 13:58:25 UTC 2004

Ed Wildgoose wrote:
> Hi all,  I am getting some intermittent video jitter which I *think* is 
> arising when the frame display point is extremely close to the video 
> card frame display point.  What happens is that the video plays find for 
> a long period of time, and then perhaps after 15-30 mins it will start 
> to jitter a little.  Pausing briefly fixes it.  (I haven't watched for 
> long enough but I think it would then stop jittering after another 10+ 
> mins)
> I have done a little work to make the audio position pointer as smooth 
> as possible.  Switching to using video for timing helps a tiny bit, but 
> the basic effect still happens, hence my guess as to the cause.  
> Curiously mplayer doesn't seem to exhibit this issue on this machine.
> I think that there is probably some tiny amount of jitter in the sleep 
> code that waits for the frame display point, and perhaps when this is 
> very close to the hardware display refresh moment then the tiny sleep 
> jitter is directly turning into a whole frame jitter.  I'm using bob 
> deinterlacer which might make this effect more visible.
> I'm using RTC for the timer and whilst I could figure out why the nvidia 
> frame timer isn't kicking in (does driver version 6111 work for that?) I 
> think the issue is probably something that other people must be seeing?
> I need to dig into the frame sync code a little more, but does anyone 
> have any other thoughts on how to tackle this (anyone else seeing it..?)

I think you're probably seeing an effect that's taken care of in the 
video sync methods that can actually track the retrace time (phase) of 
the video refresh, rather than just its period.  Those methods are 
nVidia, DRI (I think), and OpenGL.  nVidia works for driver versions 
43xx and older, and OpenGL works (properly) for 6111 and newer.

What happens is that if the display point drifts too near the vertical 
retrace, there's some uncertainty about whether we will show a frame 
before or after the retrace, mostly based on scheduler randomness.  If 
we know where we are in relation to the retrace, we can adjust out of 
the danger zone.

Once it gets into this jittering state, does it eventually clear up if 
you let it keep playing?  If so, we've drifted out of the danger zone 
and are solidly on one side or the other of the retrace.

You could probably improve RTC by verifying that your refresh rate is 
*exactly* the same as the video's frame rate.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041128/8b4a1f8c/signature.pgp

More information about the mythtv-dev mailing list