From 6ea29ad88f9457e457cdcf9be4dcf527ddc08cbe Mon Sep 17 00:00:00 2001 From: spaceoden <26421479+spaceoden@users.noreply.github.com> Date: Tue, 4 Aug 2026 00:31:45 -0700 Subject: [PATCH] vo_gpu: interpolation-threshold check allow any integer Instead of checking whether the ideal_frame_duration to vsync_interval ratio is approximately 1.0, check whether the ratio is approximately an integer. This way, any video whose fps is approximately a factor of the display Hz will pass the check. --- video/out/gpu/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 656c11c29f275..fd550e6909647 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3574,7 +3574,7 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, (p->frames_drawn || !frame->still); if (interpolate) { double ratio = frame->ideal_frame_duration / frame->vsync_interval; - if (fabs(ratio - 1.0) < p->opts.interpolation_threshold) + if (fabs(ratio - floor(ratio + 0.5)) < p->opts.interpolation_threshold) interpolate = false; }