summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authornand <nand@lavabit.com>2012-12-23 19:49:19 +0100
committerwm4 <wm4@nowhere>2012-12-28 13:43:24 +0100
commitb32f2ef0d344e224a24ed72bf7abf394675ea58f (patch)
treea17fed17382267c33866cbaab72d51a5308b4017 /video/out/vo_opengl.c
parent6be50fa7736e0095ace5cb1b6e8da35aaa5e52df (diff)
downloadmpv-b32f2ef0d344e224a24ed72bf7abf394675ea58f.tar.bz2
mpv-b32f2ef0d344e224a24ed72bf7abf394675ea58f.tar.xz
vo_opengl: use more precise gamma for BT.709 with color management
Change from gamma 2.2 to the slightly more precise 1/0.45 as per BT.709. https://www.itu.int/rec/R-REC-BT.709-5-200204-I/en mentions a value of γ=0.45 for the conceptual non-linear precorrection of video signals. This is approximately the inverse of 2.22, and not 2.20 as the code had been using until now.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 9e333b90b5..d1808af265 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -1908,7 +1908,7 @@ static bool load_icc(struct gl_priv *p, const char *icc_file,
.Green = {0.30, 0.60, 1.0},
.Blue = {0.15, 0.06, 1.0},
};
- cmsToneCurve *tonecurve = cmsBuildGamma(NULL, 2.2);
+ cmsToneCurve *tonecurve = cmsBuildGamma(NULL, 1.0/0.45);
cmsHPROFILE vid_profile = cmsCreateRGBProfile(&d65, &bt709prim,
(cmsToneCurve*[3]){tonecurve, tonecurve, tonecurve});
cmsFreeToneCurve(tonecurve);
@@ -2318,7 +2318,7 @@ static const char help_text[] =
" Enable gamma-correct scaling by working in linear light. This\n"
" makes use of sRGB textures and framebuffers.\n"
" This option forces the options 'indirect' and 'gamma'.\n"
-" NOTE: For YUV colorspaces, gamma 2.2 is assumed. RGB input is always\n"
+" NOTE: For YUV colorspaces, gamma 1/0.45 is assumed. RGB input is always\n"
" assumed to be in sRGB.\n"
" pbo\n"
" Enable use of PBOs. This is faster, but can sometimes lead to\n"