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.
This commit is contained in:
Kotori Itsuka 2019-01-17 20:20:37 +10:00 committed by sfan5
parent 08679f756c
commit 05f0980b96
1 changed files with 2 additions and 1 deletions

View File

@ -351,7 +351,8 @@ const struct m_sub_options gl_video_conf = {
OPT_FLAG("gamma-auto", gamma_auto, 0), OPT_FLAG("gamma-auto", gamma_auto, 0),
OPT_CHOICE_C("target-prim", target_prim, 0, mp_csp_prim_names), 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_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, OPT_CHOICE("tone-mapping", tone_mapping, 0,
({"clip", TONE_MAPPING_CLIP}, ({"clip", TONE_MAPPING_CLIP},
{"mobius", TONE_MAPPING_MOBIUS}, {"mobius", TONE_MAPPING_MOBIUS},