diff options
author | Niklas Haas <git@haasn.xyz> | 2017-08-03 13:36:26 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-08-03 14:26:35 +0200 |
commit | 8f484567fc25c92c06d7796984e5ab8243eaa0d9 (patch) | |
tree | b64b645fb42ae8ac4aede7a611e8e83de383b755 /video | |
parent | 5e1e7d32e83861981b777faeb9f764c163b46c68 (diff) | |
download | mpv-8f484567fc25c92c06d7796984e5ab8243eaa0d9.tar.bz2 mpv-8f484567fc25c92c06d7796984e5ab8243eaa0d9.tar.xz |
vo_opengl: fix HLG OOTF inverse
Got the "sign" of the second multiplication wrong.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/video_shaders.c | 2 |
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));) |