From 5a12015c4bdeba42ddedf8f6986ffc92e1d38b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 21 Nov 2023 00:19:39 +0100 Subject: [PATCH] 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 --- video/out/vo_gpu_next.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 0e2e3e0fc43b..1dc1b181ae8c 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -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));