From e8d8e88eb7479c9a578c401c244b3868e4c212d8 Mon Sep 17 00:00:00 2001 From: Niklas P Andersson <3985238+niklaspandersson@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:02:59 +0200 Subject: [PATCH] Update decklink consumer HDR metadata * It is now set to Rec2020 and HLG * Bigger changes needs to be made to propagate frame metadata from producers such as ffmpeg --- .../decklink/consumer/decklink_consumer.cpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/decklink/consumer/decklink_consumer.cpp b/src/modules/decklink/consumer/decklink_consumer.cpp index 00c0c5b265..07d271cd09 100644 --- a/src/modules/decklink/consumer/decklink_consumer.cpp +++ b/src/modules/decklink/consumer/decklink_consumer.cpp @@ -324,11 +324,11 @@ class decklink_frame switch (metadataID) { case bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc: - *value = EOTF::PQ; + *value = EOTF::HLG; break; case bmdDeckLinkFrameMetadataColorspace: - *value = bmdColorspaceRec709; + *value = bmdColorspaceRec2020; break; default: @@ -341,39 +341,40 @@ class decklink_frame HRESULT STDMETHODCALLTYPE GetFloat(BMDDeckLinkFrameMetadataID metadataID, double* value) { + const auto color_space = &REC_2020; HRESULT result = S_OK; switch (metadataID) { case bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX: - *value = REC_709.RedX; + *value = color_space->RedX; break; case bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY: - *value = REC_709.RedY; + *value = color_space->RedY; break; case bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX: - *value = REC_709.GreenX; + *value = color_space->GreenX; break; case bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY: - *value = REC_709.GreenY; + *value = color_space->GreenY; break; case bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX: - *value = REC_709.BlueX; + *value = color_space->BlueX; break; case bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY: - *value = REC_709.BlueY; + *value = color_space->BlueY; break; case bmdDeckLinkFrameMetadataHDRWhitePointX: - *value = REC_709.WhiteX; + *value = color_space->WhiteX; break; case bmdDeckLinkFrameMetadataHDRWhitePointY: - *value = REC_709.WhiteY; + *value = color_space->WhiteY; break; case bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance: