From fc5d533a66df72b79e35aa35dfd028562601f58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 31 Aug 2023 17:00:25 +0200 Subject: [PATCH] vo_gpu_next: add support for video-target-params --- video/out/vo_gpu_next.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 0e42e190858b4..55a6fd083ffc9 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1114,8 +1114,20 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) goto done; } - const struct pl_frame *cur_frame = pl_frame_mix_nearest(&mix); mp_mutex_lock(&vo->params_mutex); + if (!vo->target_params) + vo->target_params = talloc(vo, struct mp_image_params); + *vo->target_params = (struct mp_image_params){ + .imgfmt_name = swframe.fbo->params.format + ? swframe.fbo->params.format->name : NULL, + .w = swframe.fbo->params.w, + .h = swframe.fbo->params.h, + .color = target.color, + .repr = target.repr, + .rotate = target.rotation, + }; + + const struct pl_frame *cur_frame = pl_frame_mix_nearest(&mix); if (cur_frame && vo->params) { vo->params->color.hdr = cur_frame->color.hdr; // Augment metadata with peak detection max_pq_y / avg_pq_y