summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-03 13:36:26 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-03 14:26:35 +0200
commit8f484567fc25c92c06d7796984e5ab8243eaa0d9 (patch)
treeb64b645fb42ae8ac4aede7a611e8e83de383b755
parent5e1e7d32e83861981b777faeb9f764c163b46c68 (diff)
downloadmpv-8f484567fc25c92c06d7796984e5ab8243eaa0d9.tar.bz2
mpv-8f484567fc25c92c06d7796984e5ab8243eaa0d9.tar.xz
vo_opengl: fix HLG OOTF inverse
Got the "sign" of the second multiplication wrong.
-rw-r--r--video/out/opengl/video_shaders.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index a8170c10d1..fd40dd04ab 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -550,7 +550,7 @@ void pass_inverse_ootf(struct gl_shader_cache *sc, enum mp_csp_light light, floa
{
case MP_CSP_LIGHT_SCENE_HLG:
GLSLF("color.rgb *= vec3(1.0/%f);\n", (1000 / MP_REF_WHITE) / pow(12, 1.2));
- GLSL(color.rgb *= vec3(pow(dot(src_luma, color.rgb), 0.2/1.2));)
+ GLSL(color.rgb /= vec3(max(1e-6, pow(dot(src_luma, color.rgb), 0.2/1.2)));)
break;
case MP_CSP_LIGHT_SCENE_709_1886:
GLSL(color.rgb = pow(color.rgb, vec3(1.0/2.4));)