[mythtv] timestretch: predictive frame skipping (was Re: DVD playback issues, patch)

David Engel david at istwok.net
Wed Nov 25 15:48:58 UTC 2009


Since you opened up a new thread, I'll respond here.

> On Tue, Nov 24, 2009 at 9:35 PM, John P Poet <jppoet at gmail.com> wrote:
> > On Tue, Nov 24, 2009 at 7:57 PM, David Engel <david at istwok.net> wrote:
> >> I have an idea that might remedy this. ?We detect when we have more
> >> video frames than refresh intervals similarly to how we detect when to
> >> use the fallback deinterlacers. ?When we detect this condition, what
> >> if we discard every other video frame? ?In a sense, we fallback to a
> >> "0.5x deinterlacer." ?Since we discard frames at a regular rate
> >> instead of somewhat randomly as currently done, the result might be as
> >> smooth current the stretching of interlaced content.
> >
> > This is getting off topic for the original purpose of this thread, but...
> >
> > That seems reasonable to me. ?Although, you would only want to discard
> > every other frame if playback is at 2.0x. ?For 1.5x, it would be every
> > 3rd frame, for 1.25x it would be every 5th frame, and for 1.3x it
> > would be every 4.333333 frames, right? ?Those fractions would still
> > cause issues, but would make the avsync easier.

Actually, I was suggesting to always drop every other frame.  The
result should be similar to what happens when the fallback 1x
deinterlacer kicks in on interlaced content.  That is you wind up with
30 evenly spaced frames and the A/V sync code extends some frames by
an extra refresh interval as needed.  No, it's not absolutely silky
smooth, nor determinsitic, but is more than acceptable to me.  If you
start dropping every nth frame, where n > 2, then you've got to deal
with unevenly spaced frames.  I suspect the A/V sync code would then
have to get much more complicated to handle that or the results would
be noticably jerkier.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list