summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/vo.rst4
-rw-r--r--video/out/vo_opengl.c4
-rw-r--r--video/out/vo_opengl_shaders.glsl6
3 files changed, 7 insertions, 7 deletions
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index cf92d97efa..941a7a7283 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -325,8 +325,8 @@ opengl
Enable gamma-correct scaling by working in linear light. This
makes use of sRGB textures and framebuffers.
This option forces the options 'indirect' and 'gamma'.
- NOTE: for YUV colorspaces, gamma 2.2 is assumed. RGB input is always
- assumed to be in sRGB.
+ NOTE: for YUV colorspaces, gamma 1/0.45 (2.222) is assumed. RGB input
+ is always assumed to be in sRGB.
This option is not really useful, as gamma-correct scaling has not much
influence on typical video playback. Most visible effect comes from
slightly different gamma.
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"
diff --git a/video/out/vo_opengl_shaders.glsl b/video/out/vo_opengl_shaders.glsl
index 1f302889e4..13595ec77e 100644
--- a/video/out/vo_opengl_shaders.glsl
+++ b/video/out/vo_opengl_shaders.glsl
@@ -74,7 +74,7 @@ void main() {
#ifdef USE_OSD_LINEAR_CONV
// If no 3dlut is being used, we need to pull up to linear light for
// the sRGB function. *IF* 3dlut is used, we do not.
- color.rgb = pow(color.rgb, vec3(2.2));
+ color.rgb = pow(color.rgb, vec3(1.0/0.45));
#endif
#ifdef USE_OSD_3DLUT
color = vec4(texture3D(lut_3d, color.rgb).rgb, color.a);
@@ -331,12 +331,12 @@ void main() {
color = mat3(colormatrix) * color + colormatrix[3];
#endif
#ifdef USE_LINEAR_CONV
- color = pow(color, vec3(2.2));
+ color = pow(color, vec3(1.0/0.45));
#endif
#ifdef USE_LINEAR_CONV_INV
// Convert from linear RGB to gamma RGB before putting it through the 3D-LUT
// in the final stage.
- color = pow(color, vec3(1.0/2.2));
+ color = pow(color, vec3(0.45));
#endif
#ifdef USE_GAMMA_POW
color = pow(color, inv_gamma);