From 2b0736ed83a19ec31e0d4b3bf4b3882d7c69063d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 25 Sep 2022 20:31:08 +0200 Subject: vo_gpu_next: implement --video-output-levels This was ignored as an oversight. --- video/out/vo_gpu_next.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/out') diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index b4c0b2cbc8..ba9f56555b 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -128,6 +128,7 @@ struct priv { struct scaler_params scalers[SCALER_COUNT]; const struct pl_hook **hooks; // storage for `params.hooks` const struct pl_filter_config *frame_mixer; + enum mp_csp_levels output_levels; #ifdef PL_HAVE_LCMS struct pl_icc_params icc; @@ -780,6 +781,7 @@ static void update_options(struct vo *vo) p->color_adjustment.hue = cparams.hue; p->color_adjustment.saturation = cparams.saturation; p->color_adjustment.gamma = cparams.gamma; + p->output_levels = cparams.levels_out; } static void apply_target_options(struct priv *p, struct pl_frame *target) @@ -795,6 +797,8 @@ static void apply_target_options(struct priv *p, struct pl_frame *target) // Colorspace overrides const struct gl_video_opts *opts = p->opts_cache->opts; + if (p->output_levels) + target->repr.levels = mp_levels_to_pl(p->output_levels); if (opts->target_prim) target->color.primaries = mp_prim_to_pl(opts->target_prim); if (opts->target_trc) -- cgit v1.2.3