[mythtv-commits] [MythTV/mythtv] 660de7: Improve playback smoothness when timestretching wi...

David Engel noreply at github.com
Wed Mar 9 16:56:55 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 660de70a0273d5b1bbc30e53918b41ce6e450c19
      https://github.com/MythTV/mythtv/commit/660de70a0273d5b1bbc30e53918b41ce6e450c19
  Author: David Engel <dengel at mythtv.org>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M mythtv/libs/libmythtv/mythplayeravsync.cpp
    M mythtv/libs/libmythtv/mythplayeravsync.h
    M mythtv/libs/libmythtv/mythplayerui.cpp
    M mythtv/libs/libmythtv/mythplayerui.h

  Log Message:
  -----------
  Improve playback smoothness when timestretching with high frame rates.

When timestreching at greater than 1x speed with progressive content
or interlaced content and a 2x deinterlacer, there are more frames
than can be displayed and some frames need to be dropped.  At one
time, MythTV predictively dropped frames in these cases to produce
smooth playback.  When the A/V sync code was last overhauled, the
predictive dropping was removed.  The hope was that the new, A/V sync
would perform well enough that the predictive dropping was no longer
needed.  While the new, A/V sync code performs okay in some of these
cases, it still results in playback that is not as smooth as it can
be.

This commit reintroduces a form of deterministically dropping frames
when the there are too many frames to display.  Specifically, when the
frame interval is less than the display, refresh interval, keep track
of the difference between the too.  When the accumulated sum of
differences reaches or exceeds the refresh interval drop a frame and
reset the sum back to below the refresh interval.

Note that MythTV still uses 1x deinterlacers when available to avoid
this problem.  This commit does not change that.  Some could argue
that this new, deterministic dropping of frames produces better
results as only the minimum number of frames are dropped instead of
always dropping half.  A Change to always use 2x deinterlacers when
available will be reconsidered at a later time.




More information about the mythtv-commits mailing list