Commit 31351641 authored by Niklas Haas's avatar Niklas Haas Committed by Hugo Beauzée-Luyssen
Browse files

libplacebo: add colorimetric gamut clipping option

New upstream feature. Simply needs to be exposed in the UI.
parent ca206a51
......@@ -477,6 +477,9 @@ vlc_module_begin ()
#else
add_float("pl-tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate,
TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false)
#endif
#if PL_API_VER >= 80
add_bool("pl-gamut-clipping", false, GAMUT_CLIPPING_TEXT, GAMUT_CLIPPING_LONGTEXT, true)
#endif
add_bool("pl-gamut-warning", false, GAMUT_WARN_TEXT, GAMUT_WARN_LONGTEXT, true)
......@@ -586,6 +589,9 @@ static void UpdateParams(vout_display_t *vd)
sys->color_map.max_boost = var_InheritFloat(vd, "pl-max-boost");
#else
sys->color_map.tone_mapping_desaturate = var_InheritFloat(vd, "pl-tone-mapping-desat");
#endif
#if PL_API_VER >= 80
sys->color_map.gamut_clipping = var_InheritBool(vd, "pl-gamut-clipping");
#endif
sys->color_map.gamut_warning = var_InheritBool(vd, "pl-gamut-warning");
#if PL_API_VER < 12
......
......@@ -191,6 +191,9 @@ static const char * const tone_text[] = {
#define MAX_BOOST_TEXT "Maximum brightness boost"
#define MAX_BOOST_LONGTEXT "Maximum allowed brightness boost to compensate for dark scenes. A value of 1.0 means no brightness boost is allowed."
#define GAMUT_CLIPPING_TEXT "Colorimetric gamut clipping"
#define GAMUT_CLIPPING_LONGTEXT "Colorimetrically clip out-of-gamut colors by desaturating them until they hit the boundary of the permissible color volume."
#define GAMUT_WARN_TEXT "Highlight clipped pixels"
#define GAMUT_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment