From 5e1e7d32e83861981b777faeb9f764c163b46c68 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 3 Aug 2017 12:46:57 +0200 Subject: vo_opengl: generalize HDR tone mapping to gamut mapping Since this code was already written for HDR, and is now per-channel (because it works better for HDR as well), we can actually reuse this to get very high quality gamut mapping without clipping. The only required change is to move the tone mapping from before the gamut map to after the gamut map. Additonally, we need to also account for changes in the signal range as a result of applying the CMS when we compute ref_peak, which is fortunately pretty easy because we only need to consider the case of primaries mapping to themselves. Since `HDR` no longer really makes sense as a label, rename it to `--tone-mapping` in general. Also fits better with `--tone-mapping-desat` etc. Arguably we could also rename `--hdr-compute-peak`, but that option is basically only useful for HDR content anyway because we don't need information about the signal range for gamut mapping. This (finally!) gives us reasonably high quality gamut mapping even in the absence of an ICC profile / 3DLUT. --- DOCS/interface-changes.rst | 1 + DOCS/man/options.rst | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index a9a6664461..ea4545bdc3 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -26,6 +26,7 @@ Interface changes "audio-file", "external-file" (these cases used to log a deprecation warning) - drop deprecated --video-aspect-method=hybrid option choice + - rename --hdr-tone-mapping to --tone-mapping (and generalize it) --- mpv 0.26.0 --- - remove remaining deprecated audio device options, like --alsa-device Some of them were removed in earlier releases. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e824e04e0f..814f6fe2d9 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4765,9 +4765,11 @@ The following video options are currently all specific to ``--vo=opengl`` and The user should independently guarantee this before using these signal formats for display. -``--hdr-tone-mapping=`` - Specifies the algorithm used for tone-mapping HDR images onto the target - display. Valid values are: +``--tone-mapping=`` + Specifies the algorithm used for tone-mapping images onto the target + display. This is relevant for both HDR->SDR conversion as well as gamut + reduction (e.g. playing back BT.2020 content on a standard gamut display). + Valid values are: clip Hard-clip any out-of-range values. Use this when you care about @@ -4786,10 +4788,10 @@ The following video options are currently all specific to ``--vo=opengl`` and results in flattening of details and degradation in color accuracy. hable Similar to ``reinhard`` but preserves both dark and bright details - better (slightly sigmoidal), at the cost of slightly darkening - everything. Developed by John Hable for use in video games. Use this - when you care about detail preservation more than color/brightness - accuracy. This is roughly equivalent to + better (slightly sigmoidal), at the cost of slightly darkening / + desaturating everything. Developed by John Hable for use in video + games. Use this when you care about detail preservation more than + color/brightness accuracy. This is roughly equivalent to ``--hdr-tone-mapping=reinhard --tone-mapping-param=0.24``. gamma Fits a logarithmic transfer between the tone curves. -- cgit v1.2.3