Skip to content

Commit

Permalink
vo_gpu_next: reduce number of requested frames from VO
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kasper93 authored and Dudemanguy committed Nov 21, 2023
1 parent 48455a9 commit 5a12015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions video/out/vo_gpu_next.c
Expand Up @@ -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));

Expand Down

0 comments on commit 5a12015

Please sign in to comment.