From 38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 7 Jun 2016 11:31:22 +0200 Subject: vo_opengl: avoid outputting ultra-wide-gamut by default The default behavior of vo_opengl has pretty much always been 'show the source colors as-is, without caring to adapt it to the target device'. This decision is mostly based on the fact that if we do anything else, lots of people will complain. With the rise of content like BT.2020, however, it turns out more people complain about this content being very desaturated than people complain about this content not matching VLC - so let's just map ultra-wide gamut content back down to standard gamut by default. --- video/out/opengl/video.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 0b04e1e20f..52dbe19961 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2245,8 +2245,19 @@ static void pass_colormanage(struct gl_video *p, float peak_src, } } - if (prim_dst == MP_CSP_PRIM_AUTO) + // When auto-guessing the output color params, just pick the source color + // params to preserve the authentic "look and feel" of wrong/naive players. + // Some exceptions apply to source spaces that even hardcore technoluddites + // would probably not enjoy viewing unaltered + if (prim_dst == MP_CSP_PRIM_AUTO) { prim_dst = prim_src; + + // Avoid outputting very wide gamut content automatically, since the + // majority target audience has standard gamut displays + if (prim_dst == MP_CSP_PRIM_BT_2020 || prim_dst == MP_CSP_PRIM_PRO_PHOTO) + prim_dst = MP_CSP_PRIM_BT_709; + } + if (trc_dst == MP_CSP_TRC_AUTO) { trc_dst = trc_src; // Avoid outputting linear light at all costs. First try @@ -2260,6 +2271,7 @@ static void pass_colormanage(struct gl_video *p, float peak_src, if (trc_dst == MP_CSP_TRC_LINEAR || trc_dst == MP_CSP_TRC_SMPTE_ST2084) trc_dst = MP_CSP_TRC_GAMMA22; } + if (!peak_src) { // If the source has no information known, it's display-referred // (and should be treated relative to the specified desired peak_dst) -- cgit v1.2.3