Skip to content

Commit

Permalink
vo_gpu_next: infer target parameters
Browse files Browse the repository at this point in the history
This allows us to read them back.
  • Loading branch information
kasper93 authored and jeeb committed Mar 7, 2024
1 parent fc5d533 commit 580bc69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions video/out/vo_gpu_next.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
goto done;
}

struct pl_frame ref_frame;
pl_frames_infer_mix(p->rr, &mix, &target, &ref_frame);

mp_mutex_lock(&vo->params_mutex);
if (!vo->target_params)
vo->target_params = talloc(vo, struct mp_image_params);
Expand All @@ -1127,9 +1130,8 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
.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;
if (vo->params) {
vo->params->color.hdr = ref_frame.color.hdr;
// Augment metadata with peak detection max_pq_y / avg_pq_y
pl_renderer_get_hdr_metadata(p->rr, &vo->params->color.hdr);
}
Expand Down

0 comments on commit 580bc69

Please sign in to comment.