summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-28 13:55:10 +0200
committerwm4 <wm4@nowhere>2016-06-28 19:48:29 +0200
commit6e6c32ed6cc70f21e99c882e57944e272906c368 (patch)
tree04af73922f5b0140c961e2d7ab28023fe52f5b3f /video
parentf9fe5d06ad8ba5f8aa6068dd3c6a1a9fc6332707 (diff)
downloadmpv-6e6c32ed6cc70f21e99c882e57944e272906c368.tar.bz2
mpv-6e6c32ed6cc70f21e99c882e57944e272906c368.tar.xz
vo_opengl: revise the logic for picking the default color space
Too many "exceptions" these days, it's easier to just hard-code a whitelist instead of a blacklist. And besides, it only really makes sense to avoid adaptation for BT.601 specifically, since that's the one we auto-guess based on the resolution.
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/video.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 89030a8952..fff41a1b91 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -2189,20 +2189,19 @@ static void pass_colormanage(struct gl_video *p, float peak_src,
}
}
- // 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 = p->image_params.primaries;
+ // The vast majority of people are on sRGB or BT.709 displays, so pick
+ // this as the default output color space.
+ prim_dst = MP_CSP_PRIM_BT_709;
- // 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_V_GAMUT)
+ if (p->image_params.primaries == MP_CSP_PRIM_BT_601_525 ||
+ p->image_params.primaries == MP_CSP_PRIM_BT_601_625)
{
- prim_dst = MP_CSP_PRIM_BT_709;
+ // Since we auto-pick BT.601 and BT.709 based on the dimensions,
+ // combined with the fact that they're very similar to begin with,
+ // and to avoid confusing the average user, just don't adapt BT.601
+ // content automatically at all.
+ prim_dst = p->image_params.primaries;
}
}