[vlc-commits] [Git][videolan/vlc][master] libplacebo: normalize mastering display metadata
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Sep 18 08:32:55 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ea23c732 by Alberto Bocchieri at 2026-09-18T08:21:27+00:00
libplacebo: normalize mastering display metadata
Convert chromaticity coordinates from 1/50000 units and luminance from
1/10000 cd/m2 units before passing mastering display metadata to
libplacebo. Otherwise a 1000 cd/m2 mastering peak is reported as
10000000 cd/m2.
- - - - -
1 changed file:
- modules/video_output/libplacebo/utils.c
Changes:
=====================================
modules/video_output/libplacebo/utils.c
=====================================
@@ -390,17 +390,17 @@ struct pl_color_space vlc_placebo_ColorSpace(const video_format_t *fmt)
.transfer = transfers[fmt->transfer],
.hdr = {
.prim = {
- .green.x = fmt->mastering.primaries[0],
- .green.y = fmt->mastering.primaries[1],
- .blue.x = fmt->mastering.primaries[2],
- .blue.y = fmt->mastering.primaries[3],
- .red.x = fmt->mastering.primaries[4],
- .red.y = fmt->mastering.primaries[5],
- .white.x = fmt->mastering.white_point[0],
- .white.y = fmt->mastering.white_point[1],
+ .green.x = fmt->mastering.primaries[0] / 50000.0f,
+ .green.y = fmt->mastering.primaries[1] / 50000.0f,
+ .blue.x = fmt->mastering.primaries[2] / 50000.0f,
+ .blue.y = fmt->mastering.primaries[3] / 50000.0f,
+ .red.x = fmt->mastering.primaries[4] / 50000.0f,
+ .red.y = fmt->mastering.primaries[5] / 50000.0f,
+ .white.x = fmt->mastering.white_point[0] / 50000.0f,
+ .white.y = fmt->mastering.white_point[1] / 50000.0f,
},
- .min_luma = fmt->mastering.min_luminance,
- .max_luma = fmt->mastering.max_luminance,
+ .min_luma = fmt->mastering.min_luminance / 10000.0f,
+ .max_luma = fmt->mastering.max_luminance / 10000.0f,
.max_cll = fmt->lighting.MaxCLL,
.max_fall = fmt->lighting.MaxFALL,
},
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ea23c7325c52ba833a7e89c9b5da92a11b1efcbc
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ea23c7325c52ba833a7e89c9b5da92a11b1efcbc
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list