summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-07 11:31:22 +0200
committerwm4 <wm4@nowhere>2016-06-07 12:18:39 +0200
commit38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c (patch)
tree344f2e1f659ca8feecb7393634eb48321ea57c8f
parent9bd886f449e24ec8a002271d7e410ef334743966 (diff)
downloadmpv-38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c.tar.bz2
mpv-38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c.tar.xz
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.
-rw-r--r--video/out/opengl/video.c14
1 files changed, 13 insertions, 1 deletions
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)