mirror of https://github.com/mpv-player/mpv
vo: kill non-working missed frame detection
This was not very reliable. In the normal vo_opengl case, this didn't deal well enough with vsync jitter. Vsync timings can jitter quite extremely, up to a whole vsync duration, in which case the "missed" frame counter keeps growing, even though nothing is wrong. This behavior also messes up the A/V difference calculation, but as long as it's within tolerance, it won't provoke extra frame dropping/repeating. Real misses are harder to detect, and I might add such detection later. In the vo_opengl_cb case, this was additionally broken due to the asynchronity between renderer and VO threads.
This commit is contained in:
parent
70aa3b04f8
commit
f891b24cb5
|
@ -613,8 +613,6 @@ static bool render_frame(struct vo *vo)
|
|||
vo->in->vsync_interval = in->display_fps > 0 ? 1e6 / in->display_fps : 0;
|
||||
vo->in->vsync_interval = MPMAX(vo->in->vsync_interval, 1);
|
||||
|
||||
bool continuous = in->current_frame && in->current_frame->display_synced;
|
||||
|
||||
if (in->frame_queued) {
|
||||
talloc_free(in->current_frame);
|
||||
in->current_frame = in->frame_queued;
|
||||
|
@ -747,10 +745,6 @@ static bool render_frame(struct vo *vo)
|
|||
in->dropped_frame = prev_drop_count < vo->in->drop_count;
|
||||
in->rendering = false;
|
||||
|
||||
if (in->current_frame && in->current_frame->display_synced &&
|
||||
continuous && in->vsync_interval_approx > in->vsync_interval * 3 / 2)
|
||||
in->missed_count += 1;
|
||||
|
||||
double diff = (in->vsync_interval - in->vsync_interval_approx) / 1e6;
|
||||
if (fabs(diff) < 0.150)
|
||||
MP_STATS(vo, "value %f vsync-diff", diff);
|
||||
|
|
Loading…
Reference in New Issue