vo_gpu_next: reduce number of requested frames from VO

Up to 2x playback rate is the most we can offer currently. Should work
fine for most kernels with radius <= 2.

This avoids limitation of hwdecs number of frames in-flight.

Fixes: #12927
This commit is contained in:
Kacper Michajłow 2023-11-21 00:19:39 +01:00 committed by Dudemanguy
parent 48455a9403
commit 5a12015c4b
1 changed files with 2 additions and 2 deletions

View File

@ -1953,11 +1953,11 @@ static void update_render_options(struct vo *vo)
// Request as many frames as required from the decoder, depending on the
// speed VPS/FPS ratio libplacebo may need more frames. Request frames up to
// ratio of 1/4, but only if anti aliasing is enabled.
// ratio of 1/2, but only if anti aliasing is enabled.
int req_frames = 2;
if (pars->params.frame_mixer) {
req_frames += ceilf(pars->params.frame_mixer->kernel->radius) *
(pars->params.skip_anti_aliasing ? 1 : 4);
(pars->params.skip_anti_aliasing ? 1 : 2);
}
vo_set_queue_params(vo, 0, MPMIN(VO_MAX_REQ_FRAMES, req_frames));