Skip to content

Commit 813cfb4

Browse files
committed
meson: bump API for input ICC frame luminance fix
Now input frame.hdr.max_luma is now respected by when frame has ICC profile. Previously regardless of max_luma value, if ICC profile was attached, internally max_luma were always replaced by PL_COLOR_SDR_WHITE. That's no longer the case and you can render SDR at any requested luminance level, for example when doing SDR->PQ conversion. There is no behaviour change when input max_luma==0, in which case default PL_COLOR_SDR_WHITE will be used. Note that by design we never use ICC reported luminance for SDR content, as we render by default at PL_COLOR_SDR_WHITE (203) nits or at level requested in max_luma filed. This was changed in 50a7571 and subsequently adjusted in next commits, to avoid SDR->SDR luminance mismatch. This API bump is to allow users decide if this fix is present and it can be used. For example in mpv we need to know if libplecebo will respect max_luma or use 203 nits.
1 parent 08c2177 commit 813cfb4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project('libplacebo', ['c', 'cpp'],
1212
7,
1313
# API version
1414
{
15+
'371': 'input frame.hdr.max_luma is now respecte when frame has ICC profile',
1516
'370': 'deprecate pl_avdovi_metadata_supported and pl_avframe_params.map_dovi_force',
1617
'369': 'add pl_color_decode_args.enhancement_layer',
1718
'368': 'add pl_shader_decode_color_ex and pl_color_decode_args, deprecate pl_shader_decode_color',

src/colorspace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ void pl_color_space_infer_map(struct pl_color_space *src,
975975
if (unknown_src_luminance && src_is_sdr && dst_is_sdr)
976976
src->hdr.max_luma = dst->hdr.max_luma;
977977

978-
// If SDR source has luminance, say from ICC profile, use it for target.
978+
// If SDR source has luminance, use it for target.
979979
if (!unknown_src_luminance && src_is_sdr && dst_is_sdr)
980980
dst->hdr.max_luma = src->hdr.max_luma;
981981

0 commit comments

Comments
 (0)