summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-28 15:45:35 +0100
committerwm4 <wm4@nowhere>2015-11-28 15:45:49 +0100
commit318e9801f2ac649ecc6c7d4fb83c7c46fa5b581d (patch)
tree260cc91d0f59942ce625fdc54b76e3e74f18348b /video/out/vo.h
parentea1caa474a1b469791129c75e587f3ad837e450d (diff)
downloadmpv-318e9801f2ac649ecc6c7d4fb83c7c46fa5b581d.tar.bz2
mpv-318e9801f2ac649ecc6c7d4fb83c7c46fa5b581d.tar.xz
vo_opengl: fix interpolation with display-sync
At least I hope so. Deriving the duration from the pts was not really correct. It doesn't include speed adjustments, and becomes completely wrong of the user e.g. changes the playback speed by a huge amount. Pass through the accurate duration value by adding a new vo_frame field. The value for vsync_offset was not correct either. We don't need the error for the next frame, but the error for the current one. This wasn't noticed because it makes no difference in symmetric cases, like 24 fps on 60 Hz. I'm still not entirely confident in the correctness of this, but it sure is an improvement. Also, remove the MP_STATS() calls - they're not really useful to debug anything anymore.
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 051638882b..87fd741c98 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -168,6 +168,9 @@ struct vo_frame {
double vsync_interval;
// "ideal" display time within the vsync
double vsync_offset;
+ // "ideal" frame duration (can be different from num_vsyncs*vsync_interval
+ // up to a vsync) - valid for the entire frame, i.e. not changed for repeats
+ double ideal_frame_duration;
// how often the frame will be repeated (does not include OSD redraws)
int num_vsyncs;
// Set if the current frame is repeated from the previous. It's guaranteed