From 05f0980b9610c3d0f75f8004578ae61d3e3145e4 Mon Sep 17 00:00:00 2001 From: Kotori Itsuka Date: Thu, 17 Jan 2019 20:20:37 +1000 Subject: vo_gpu: allow resetting target-peak to the trc default Add "auto" the possible values of target-peak. The default value for target_peak is to calculate the target using mp_trc_nom_peak. Unfortunately, this default was outside the acceptable range of 10-10000 nits, which prevented its later reassignment. So add an "auto" choice to target-peak which lets clients and scripts go back to using the trc default after assigning a value. --- video/out/gpu/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index b0fa9eb4d9..c12fb8536c 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -351,7 +351,8 @@ const struct m_sub_options gl_video_conf = { OPT_FLAG("gamma-auto", gamma_auto, 0), OPT_CHOICE_C("target-prim", target_prim, 0, mp_csp_prim_names), OPT_CHOICE_C("target-trc", target_trc, 0, mp_csp_trc_names), - OPT_INTRANGE("target-peak", target_peak, 0, 10, 10000), + OPT_CHOICE_OR_INT("target-peak", target_peak, 0, 10, 10000, + ({"auto", 0})), OPT_CHOICE("tone-mapping", tone_mapping, 0, ({"clip", TONE_MAPPING_CLIP}, {"mobius", TONE_MAPPING_MOBIUS}, -- cgit v1.2.3