[mythtv] AVSync2 Refinements
pletchtd at gmail.com
Fri Dec 13 16:40:08 UTC 2019
> Out of curiosity - could that zero offset be estimated?
> I ask because at some point I would like to test adding a couple of
> additional a/v sync adjustments - and clearly the greater the accuracy
> the better.
> The first adjustment is to account for FFmpeg hardware deinterlacers
> (currently only VAAPI VVP - but may add NVDEC soon) that do a little
> buffering. As they are processed after a/v sync, we will need to pass
> back an offset - probably on the next pass.
> The second is to handle a/v sync adjustments that are
> required/reported by displays via the EDID. I recently added some EDID
> parsing to our code and it only requires a few extra lines to parse
> out the sync adjustments required when displaying with interlaced and
> progressive modelines.
I was able to do a little more testing today and figured out how to nicely
parse the log playback,timestamp data into a comma-delimited file to enable
me to look more closely at some real data.
First, I found that a 0.4 gain and 0.9 filter as I initially proposed does
work well. I think you were actually right to leave it there. I didn't
notice increased frame drops or other issues under these settings.
Initially, I was more inclined to highly dampen the control output to
minimize responding to noise but the filtering takes care of that well
enough even with a higher gain. As an example, here (
https://imgur.com/EcKuA8J) is a plot showing some data I collected when
viewing a progressive channel and an interlaced channel successively at the
gain=0.4 & filter=0.9 settings. It is the deinterlacing that adds much
jitter to the measured sync.
The jitter and measurement are also more centered around zero than in my
initial simulation (I incorrectly assumed jitter would manifest mostly as
lag). As a result, there is no corresponding zero offset in the control
under the real conditions that needs to be compensated.
I would be interested to see some of the raw data reported by the EDID as
well as whatever ffmpeg returns with the processed frames. Is the
buffering you speak of the reason that the sync measurement becomes is so
much noisier when deinterlacing is in use?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-dev