[mythtv] vsync and frame timing adjustments
Doug Larrick
doug at ties.org
Fri Aug 27 08:46:01 EDT 2004
Doug Larrick wrote:
> Thanks, will do. I found enough time last night to get some
> instrumentation code in place, and will try to run some experiments over
> the next few days with all three variants of the code.
As promised... here is some data. They're pretty big, so I've not
attached them.
Gnumeric version: http://jekyl.ddts.net/doug/frame-logs.gnumeric
Excel version: http://jekyl.ddts.net/doug/frame-logs.xls
HTML version (big): http://jekyl.ddts.net/doug/frame-logs.html
I haven't tried the .xls file.
I have not spent a lot of time analyzing this data, but the interesting
part is in the "frame-front-only.log" tab (sheet), where I've
highlighted some sections in orange. This is the code that's in CVS,
without the adjustment I added a while back. You'll note that there
does appear to be a straddle problem that's fixed by this code; I bet
that's the weirdness I was seeing.
The "frame-new-code.log" tab is not exactly what you proposed... I had
to change the adjustment to 200 in order to keep up with my 60Hz refresh
(on my development system); I was able to bump the threshold to roughly
-8k as I thought I had remembered it, with no ill effect. I also added
a safety net: 500 usec from the negative threshhold, I do a +2000
correction.
if (m_delay > -500)
OffsetTimeval(m_nexttrigger, -2000);
else if (m_delay < -(m_refresh_interval-500))
OffsetTimeval(m_nexttrigger, 2000);
else if (m_delay < -(m_refresh_interval/2))
OffsetTimeval(m_nexttrigger, 200);
I'll be happy to explain what the columns are when I'm not late for work
:-), though I think they're self-explanatory if you look at the code.
Let me know what you think.
-Doug
-------------- 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/20040827/3f63eca6/signature.pgp
More information about the mythtv-dev
mailing list