[vlc-commits] opengl: fix value scale on mastering metadata
Niklas Haas
git at videolan.org
Mon Oct 8 08:54:38 CEST 2018
vlc | branch: master | Niklas Haas <git at haasn.xyz> | Fri Oct 5 21:07:50 2018 +0200| [a15da61da363e9976b9e1af1a63a2edc0b03a683] | committer: Thomas Guillem
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>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a15da61da363e9976b9e1af1a63a2edc0b03a683
---
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 9308857027..e117122b93 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