[mythtv] DVD playback AV sync issues: all solved (?)

Taylor Ralph taylor.ralph at gmail.com
Fri Feb 5 15:16:15 UTC 2010


On Fri, Feb 5, 2010 at 10:12 AM, Taylor Ralph <taylor.ralph at gmail.com> wrote:
> On Fri, Feb 5, 2010 at 2:35 AM, Davin McCall <davmac at davmac.org> wrote:
>> On 05/02/10 16:52, Taylor Ralph wrote:
>>>
>>> I just found one issue so far. You've got the m_can_double comparison
>>> backwards which causes 2x deinterlacing to be disabled.
>>>
>>>
>>
>> Hmm
>>
>>            m_can_double = (frame_interval / 2 >
>> videosync->getRefreshInterval() * 1.005);
>>
>> My head might not be screwed on right today, but: I don't think this is
>> backwards ... it's checking the frame interval when halved is greater than
>> the refresh interval. Or in other words, the frame rate when doubled is
>> lower than the refresh rate.
>>
>> Davin
>
> Err, it was the tolerance put on the wrong side. That's what caused my
> 29.97i recordings to not be deinterlaced on my 60 fps display.
>
> Since (1/29.97)/2 < 1/60 * 1.005 which calculates to 16.68 < 16.75
> which causes m_can_double to be false.
>
> So you actually have the tolerance on the wrong side.
>
> So it should be
>
>    int tolerance = getRefreshInterval() * 1.005;
>    m_can_double = ((frame_interval / 2) + tolerance) >
> videosync->getRefreshInterval();
>
> which should make it equivalent to the prior code. The tolerance
> should ease the requirement not make it more demanding.
>

Err, typo. The tolerance calculation should be:

tolerance = getRefreshInterval() * 0.005;

Or, I guess you could go back to your original line and change 1.005 to 0.995;

--
Taylor


More information about the mythtv-dev mailing list