summaryrefslogtreecommitdiffstats
path: root/DOCS/Requirements
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-05-21 22:20:54 -0400
committerDudemanguy <random342@airmail.cc>2024-05-29 13:39:32 +0000
commiteaae9e9cf5356937baa9d08d5fd5d70f3bf2b1eb (patch)
tree5804b4869d7347f351e80004c5c029e1f7eb5e89 /DOCS/Requirements
parent52bdeb07a1af946d2c1562d6b463b82f6b8f4c81 (diff)
downloadmpv-master.tar.bz2
mpv-master.tar.xz
player/video: fix incorrect VO frame duration and frame dropsHEADmaster
The logic in question was added in 201bef7ee150f9d852996b379c926ba0c47320d5 for the VDPAU vsync frame timing algorithm, but after the code was moved around for several times, it is now used for all VOs with non-display-sync mode (where the video is synced to audio or system time). It nonetheless likely never did whatever it was intended for. This "correction" reduced the VO frame duration by the amount that the frame is fallen behind the ideal time. Since a frame is presented between pts (the ideal time for which the frame is scheduled) and pts + duration (the end time for which frame drop is determined), and pts is already computed from the current time and the deviation from the ideal time, this "correction" causes the end time to have the deviation added twice, which is nonsense: if the deviation is -0.5x the frame duration, the frame is dropped, even though it should be displayed from now to 0.5x the frame duration from now. It was not noticed at that time probably because the VDPAU secret rabbit code undid some of its damage, and the subsequent development focus on display-sync modes resulted in negligence and simplification of audio mode (e.g. b8bcf0f466ac40dbef8c1130e821d00cb0118af2), but the generic VO frame drop algorithm has been observed to cause inconsistent frame drops with this "correction": playing a 59.94 Hz video at 2x speed on a 60 Hz display results in spending over half of the time dropping adjacent frames instead of every other frames, visually causing stuttering, while it should only happen briefly when the pts is very close to vsync time. Fix this by deleting this logic, making the VO frame always having the duration of the video frame. Fixes: 201bef7ee150f9d852996b379c926ba0c47320d5
Diffstat (limited to 'DOCS/Requirements')
0 files changed, 0 insertions, 0 deletions