color-lcms: extract color characteristics even when output cprof != NULL

cmlcms_get_hdr_meta() returns early if the output has a color profile
set. That makes sense, because we should be able to get the color
characteristics from the color profiles.

But in the next commits, every output will have a color profile set. To
allow the color-metadata-parsing test, do not return early when
output->color_profile != NULL in cmlcms_get_hdr_meta() anymore.

In the future we'll adjust this function in order to always extract the
color characteristics from color profiles, as output->color_profile
should always be set.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2023-10-09 17:44:19 -03:00 committed by Pekka Paalanen
parent 977c41a65c
commit afbc729e71

View file

@ -229,22 +229,14 @@ cmlcms_get_hdr_meta(struct weston_output *output,
{
const struct weston_color_characteristics *cc;
/* TODO: get color characteristics from color profiles instead. */
hdr_meta->group_mask = 0;
/* Only SMPTE ST 2084 mode uses HDR Static Metadata Type 1 */
if (weston_output_get_eotf_mode(output) != WESTON_EOTF_MODE_ST2084)
return true;
/* ICC profile overrides color characteristics */
if (output->color_profile) {
/*
* TODO: extract characteristics from profile?
* Get dynamic range from weston_color_characteristics?
*/
return true;
}
cc = weston_output_get_color_characteristics(output);
/* Target content chromaticity */