From 838dfab45bfd28bdb0413b20c50a662c5d0d8f77 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Mon, 7 Aug 2023 13:12:22 +0200 Subject: [PATCH] Fix PIP for cuvid (unstable) --- video.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/video.c b/video.c index 10ab946..c79e4c3 100644 --- a/video.c +++ b/video.c @@ -3793,6 +3793,7 @@ static void CuvidMixVideo(CuvidDecoder *decoder, __attribute__((unused)) int lev AVFrameSideData *sd, *sd1 = NULL, *sd2 = NULL; #ifdef PLACEBO + if (level) { dst_rect.x0 = decoder->VideoX; // video window output (clip) dst_rect.y0 = decoder->VideoY; @@ -4082,6 +4083,9 @@ static void CuvidMixVideo(CuvidDecoder *decoder, __attribute__((unused)) int lev render_params.upscaler = pl_named_filters[VideoScaling[decoder->Resolution]].filter; render_params.downscaler = pl_named_filters[VideoScaling[decoder->Resolution]].filter; + if (level) + render_params.skip_target_clearing = 1; + render_params.color_adjustment = &colors; colors.brightness = VideoBrightness; @@ -4175,6 +4179,7 @@ static void CuvidMixVideo(CuvidDecoder *decoder, __attribute__((unused)) int lev // render_params.lut = NULL; render_params.num_hooks = 0; + render_params.skip_target_clearing = 1; if (!p->renderertest) p->renderertest = pl_renderer_create(p->ctx, p->gpu); @@ -4413,7 +4418,7 @@ static void CuvidDisplayFrame(void) { if ((VideoShowBlackPicture && !decoder->TrickSpeed) || (VideoShowBlackPicture && decoder->Closing < -300)) { CuvidBlackSurface(decoder); - CuvidMessage(4, "video/cuvid: black surface displayed\n"); + CuvidMessage(4, "video/cuvid: black surface displayed Filled %d\n",filled); } continue; }