mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
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:
parent
48455a9403
commit
5a12015c4b
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user