From 05bb2a9e8a298178acb620204c9a9051e24399ed Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 5 Mar 2015 16:39:22 +0100 Subject: vo_opengl: make smoothmotion-threshold inclusive This behavior makes more sense near the borders, eg. smoothmotion-threshold=0 and smoothmotion-threshold=0.5. --- video/out/gl_video.c | 4 ++-- 1 file 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, -- cgit v1.2.3