1
mirror of https://github.com/mpv-player/mpv synced 2024-10-02 16:25:33 +02:00

vo_gpu: don't tone-map for pure gamut reductions

Based on testing with real-world non-HDR BT.2020 clips, clipping the
color space looks better than attempting to gamut map using a tone
mapping shader that's (by now) optimized for HDR content.

If anything, we'd have to develop a separate gamut mapping shader that
works in LCh space.
This commit is contained in:
Niklas Haas 2018-02-21 20:16:30 +01:00 committed by Jan Ekström
parent fc76d41194
commit 66dfb96fa1

View File

@ -797,9 +797,6 @@ void pass_color_map(struct gl_shader_cache *sc,
mp_get_cms_matrix(csp_src, csp_dst, MP_INTENT_RELATIVE_COLORIMETRIC, m);
gl_sc_uniform_mat3(sc, "cms_matrix", true, &m[0][0]);
GLSL(color.rgb = cms_matrix * color.rgb;)
// Since this can reduce the gamut, figure out by how much
for (int c = 0; c < 3; c++)
src.sig_peak = MPMAX(src.sig_peak, m[c][c]);
}
// Tone map to prevent clipping when the source signal peak exceeds the