[client] wayland: forward HDR mastering metadata

Propagate valid ST 2086 mastering primaries and luminance data, MaxCLL,
and MaxFALL to the Wayland compositor using the protocol's expected
units.
This commit is contained in:
Geoffrey McRae
2026-07-19 02:15:48 +10:00
parent 1f6dbb0dae
commit ad5d7753e8
5 changed files with 36 additions and 25 deletions

View File

@@ -641,10 +641,11 @@ int main_frameThread(void * unused)
lgrFormat.pitch = frame->pitch;
lgrFormat.hdr = frame->flags & FRAME_FLAG_HDR;
lgrFormat.hdrPQ = frame->flags & FRAME_FLAG_HDR_PQ;
lgrFormat.hdrMetadata = frame->flags & FRAME_FLAG_HDR_METADATA;
lgrFormat.sdrWhiteLevel = frame->sdrWhiteLevel ?
frame->sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT;
if (lgrFormat.hdr)
if (lgrFormat.hdrMetadata)
{
memcpy(lgrFormat.hdrDisplayPrimary, frame->hdrDisplayPrimary, sizeof(lgrFormat.hdrDisplayPrimary));
memcpy(lgrFormat.hdrWhitePoint , frame->hdrWhitePoint , sizeof(lgrFormat.hdrWhitePoint ));