[vlc-commits] opengl: fix value scale on mastering metadata
Niklas Haas
git at videolan.org
Sun Dec 16 21:41:02 CET 2018
vlc/vlc-3.0 | branch: master | Niklas Haas <git at haasn.xyz> | 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 <thomas at gllm.fr>
(cherry picked from commit a15da61da363e9976b9e1af1a63a2edc0b03a683)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> 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
More information about the vlc-commits
mailing list