diff options
author | Kotori Itsuka <cmdrkotori@gmail.com> | 2019-01-17 20:20:37 +1000 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-01-23 09:31:35 +0100 |
commit | 05f0980b9610c3d0f75f8004578ae61d3e3145e4 (patch) | |
tree | 2c6f9996167283dd07ad1e6b02b59ee712364570 | |
parent | 08679f756cf0387d883247cd7e4e8b24ca6543f5 (diff) | |
download | mpv-05f0980b9610c3d0f75f8004578ae61d3e3145e4.tar.bz2 mpv-05f0980b9610c3d0f75f8004578ae61d3e3145e4.tar.xz |
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.
-rw-r--r-- | video/out/gpu/video.c | 3 |
1 files changed, 2 insertions, 1 deletions
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}, |