[mythtv-commits] [MythTV/mythtv] fe59af: Improve fast-forward/rewind at slower speeds.

David Engel noreply at github.com
Tue May 11 01:18:37 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: fe59af2fb7604d5115bc5317cc043a919fae4002
      https://github.com/MythTV/mythtv/commit/fe59af2fb7604d5115bc5317cc043a919fae4002
  Author: David Engel <dengel at mythtv.org>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M mythtv/libs/libmythtv/mythplayer.cpp
    M mythtv/libs/libmythtv/mythplayer.h

  Log Message:
  -----------
  Improve fast-forward/rewind at slower speeds.

Smooth fast-forward/rewind works as follows.  For the desired speed,
choose a reasonable frame rate.  Then calculate the number of frames
to skip to achieve that speed and frame rate.  Because only key frames
can be skipped to, there is usually a difference between the desired
frame and the actual frame skipped to.  Remember that difference and
adjust the next skip accordingly.

This works well in nearly all cases.  It doesn't work as well at
slower speeds where the skip distance is small, and especially when
the distance between key frames is large.  When this happens,
fast-forward/rewind is jerky as large corrections are often needed
after each skip because of mismatched skip and key frame distances.
This commit fixes these cases with the following two changes.

First, a slightly, lower, frame rate is used for slower speeds.  This
results in slightly, larger, skip distances that have a better chance
of initially matching large, key frame distances.  This also restores
the behavior that fast-forward/rewind had long ago where slower speeds
also looked slower and faster speeds looked faster.

Second, slightly adjust the frame rate and skip distance up or down,
within limits, when large corrections are seen.  This simple, minded
approach performed surprisingly well.  Well enough, in fact, that
efforts to explore more advanced techniques of matching the skip and
key frame distances were abandoned.




More information about the mythtv-commits mailing list