Skip to content

vo_gpu: interpolation-threshold deactivate on any integer ratio - #18341

Open
spaceoden wants to merge 1 commit into
mpv-player:masterfrom
spaceoden:1
Open

vo_gpu: interpolation-threshold deactivate on any integer ratio#18341
spaceoden wants to merge 1 commit into
mpv-player:masterfrom
spaceoden:1

Conversation

@spaceoden

Copy link
Copy Markdown

Instead of checking whether the ideal_frame_duration to vsync_interval ratio is approximately 1.0, check whether the ratio is approximately an integer (by comparing the ratio to itself rounded). This way, any video whose fps is approximately a factor of the display Hz will pass the check.

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.
Comment thread video/out/gpu/video.c
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are redrawing frame, it will be interpolated depending on tscale for each vsync, between frame points. This change would disable that, which is core interpolation logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants