[vlc-commits] d3d_dynamic_shader: adjust HLG maximum
Steve Lhomme
git at videolan.org
Thu Feb 18 06:46:09 UTC 2021
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 17 11:11:36 2021 +0100| [60184d5a5af93d9a84f49a060af735873a2ac1f6] | committer: Steve Lhomme
d3d_dynamic_shader: adjust HLG maximum
The maximum range of HLG is 1000 nits.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=60184d5a5af93d9a84f49a060af735873a2ac1f6
---
modules/video_output/win32/d3d_dynamic_shader.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/video_output/win32/d3d_dynamic_shader.c b/modules/video_output/win32/d3d_dynamic_shader.c
index bcd0ec447d..c7b9f26a6a 100644
--- a/modules/video_output/win32/d3d_dynamic_shader.c
+++ b/modules/video_output/win32/d3d_dynamic_shader.c
@@ -123,13 +123,12 @@ inline float4 sourceToLinear(float4 rgb) {\n\
rgb = pow(rgb, 1.0/ST2084_m1);\n\
return rgb * 10000;\n\
#elif (SRC_TO_LINEAR==SRC_TRANSFER_HLG)\n\
- const float alpha_gain = 2000; /* depends on the display output */\n\
/* TODO: in one call */\n\
rgb.r = inverse_HLG(rgb.r);\n\
rgb.g = inverse_HLG(rgb.g);\n\
rgb.b = inverse_HLG(rgb.b);\n\
float3 ootf_2020 = float3(0.2627, 0.6780, 0.0593);\n\
- float ootf_ys = alpha_gain * dot(ootf_2020, rgb);\n\
+ float ootf_ys = 1000 * dot(ootf_2020, rgb);\n\
return rgb * pow(ootf_ys, 0.200);\n\
#elif (SRC_TO_LINEAR==SRC_TRANSFER_709)\n\
return pow(rgb, 1.0 / 0.45);\n\
More information about the vlc-commits
mailing list