Skip to content

Commit

Permalink
vo_gpu_next: add support for video-target-params
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 authored and jeeb committed Mar 7, 2024
1 parent da3bfc9 commit fc5d533
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion video/out/vo_gpu_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc5d533

Please sign in to comment.