diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index d57ffa88d3..1f1c2138c9 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5357,12 +5357,14 @@ The following video options are currently all specific to ``--vo=gpu`` and Size of the 3D LUT generated from the ICC profile in each dimension. Default is 64x64x64. Sizes may range from 2 to 512. -``--icc-contrast=<0-1000000>`` +``--icc-contrast=<0-1000000|inf>`` Specifies an upper limit on the target device's contrast ratio. This is detected automatically from the profile if possible, but for some profiles it might be missing, causing the contrast to be assumed as infinite. As a result, video may appear darker than intended. This only affects BT.1886 - content. The default of 0 means no limit. + content. The default of 0 means no limit if the detected contrast is less + than 100000, and limits to 1000 otherwise. Use ``--icc-contrast=inf`` to + preserve the infinite contrast (most likely when using OLED displays). ``--blend-subtitles=`` Blend subtitles directly onto upscaled video frames, before interpolation diff --git a/video/out/gpu/lcms.c b/video/out/gpu/lcms.c index bc76db965f..a8f277d3f0 100644 --- a/video/out/gpu/lcms.c +++ b/video/out/gpu/lcms.c @@ -83,7 +83,7 @@ const struct m_sub_options mp_icc_conf = { OPT_FLAG("icc-profile-auto", profile_auto, 0), OPT_STRING("icc-cache-dir", cache_dir, M_OPT_FILE), OPT_INT("icc-intent", intent, 0), - OPT_INTRANGE("icc-contrast", contrast, 0, 0, 1000000), + OPT_CHOICE_OR_INT("icc-contrast", contrast, 0, 0, 1000000, ({"inf", -1})), OPT_STRING_VALIDATE("icc-3dlut-size", size_str, 0, validate_3dlut_size_opt), OPT_REPLACED("3dlut-size", "icc-3dlut-size"),