summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-03-05 16:39:22 +0100
committerNiklas Haas <git@nand.wakku.to>2015-03-05 16:39:22 +0100
commit05bb2a9e8a298178acb620204c9a9051e24399ed (patch)
tree61e07f86b4e74a72a652240b922ccfdd2564f2cd
parent27b5492a828b5321a2f379f88f8f425cac0bbb85 (diff)
downloadmpv-05bb2a9e8a298178acb620204c9a9051e24399ed.tar.bz2
mpv-05bb2a9e8a298178acb620204c9a9051e24399ed.tar.xz
vo_opengl: make smoothmotion-threshold inclusive
This behavior makes more sense near the borders, eg. smoothmotion-threshold=0 and smoothmotion-threshold=0.5.
-rw-r--r--video/out/gl_video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 1f7920fbd3..8654242bcb 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1800,8 +1800,8 @@ static double gl_video_interpolate_frame(struct gl_video *p,
double R = t->pts - t->next_vsync;
float ts = p->opts.smoothmotion_threshold;
inter_coeff = R / vsync_interval;
- inter_coeff = inter_coeff < 0.0 + ts ? 0.0 : inter_coeff;
- inter_coeff = inter_coeff > 1.0 - ts ? 1.0 : inter_coeff;
+ inter_coeff = inter_coeff <= 0.0 + ts ? 0.0 : inter_coeff;
+ inter_coeff = inter_coeff >= 1.0 - ts ? 1.0 : inter_coeff;
MP_DBG(p, "inter frame ppts: %lld, pts: %lld, "
"vsync: %lld, mix: %f\n",
(long long)prev_pts, (long long)t->pts,