summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-21 00:19:39 +0100
committerDudemanguy <random342@airmail.cc>2023-11-21 01:33:10 +0000
commit5a12015c4bdeba42ddedf8f6986ffc92e1d38b46 (patch)
tree9e1f7f02030ef9e7e0c18fc1f352220f700202d1
parent48455a9403ee24ee897a279e31c71d47e4551e34 (diff)
downloadmpv-5a12015c4bdeba42ddedf8f6986ffc92e1d38b46.tar.bz2
mpv-5a12015c4bdeba42ddedf8f6986ffc92e1d38b46.tar.xz
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
-rw-r--r--video/out/vo_gpu_next.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 0e2e3e0fc4..1dc1b181ae 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));