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

John P Poet jppoet at gmail.com
Wed Nov 25 17:00:42 UTC 2009

On Wed, Nov 25, 2009 at 8:48 AM, David Engel <david at istwok.net> wrote:
> 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.

The (1x) deinterlacers don't drop half the fields, do they?  Obviously
the "One field" deinterlacer does, but not the rest, right?  I thought
the yadif 2x actually worked at a double frame rate, and yadif 1x
worked at a "normal" frame rate.

With a playback of 1.2x. Myth would end up "extending" a lot of frames.

I don't know what the best solution is.  I will probably tinker with
this tomorrow and see.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

More information about the mythtv-dev mailing list