vlc/vlc-3.0 | branch: master | Niklas Haas <[email protected]> | Fri Oct  5 
21:07:50 2018 +0200| [51f04b41fd77363abe2ed2c073c0f2095a6c4a47] | committer: 
Jean-Baptiste Kempf

opengl: fix value scale on mastering metadata

This is not in cd/m² scale, but in a scale where a value of 10000.0
means 1 cd/m². So we have to divide out this factor.

Signed-off-by: Thomas Guillem <[email protected]>
(cherry picked from commit a15da61da363e9976b9e1af1a63a2edc0b03a683)
Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=51f04b41fd77363abe2ed2c073c0f2095a6c4a47
---

 modules/video_output/opengl/fragment_shaders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c 
b/modules/video_output/opengl/fragment_shaders.c
index 3c380ee67b..8c1f67ee7a 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -537,7 +537,7 @@ static struct pl_color_space 
pl_color_space_from_video_format(const video_format
     // As a fallback value for the signal peak, we can also use the mastering
     // metadata's luminance information
     if (!sig_peak)
-        sig_peak = fmt->mastering.max_luminance / PL_COLOR_REF_WHITE;
+        sig_peak = fmt->mastering.max_luminance / (10000.0 * 
PL_COLOR_REF_WHITE);
 
     // Sanitize the sig_peak/sig_avg, because of buggy or low quality tagging
     // that's sadly common in lots of typical sources

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to