[vlc-devel] [PATCH 2/7] opengl: fix value scale on mastering metadata
Steve Lhomme
robux4 at ycbcr.xyz
Wed Oct 3 09:53:50 CEST 2018
This patch seems unrelated to the patchset.
LGTM
On 01/10/2018 16:51, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.xyz>
>
> 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.
> ---
> 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
> --
> 2.19.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list