Skip to content

Commit

Permalink
Update decklink consumer HDR metadata
Browse files Browse the repository at this point in the history
* It is now set to Rec2020 and HLG
* Bigger changes needs to be made to propagate frame metadata from producers such as ffmpeg
  • Loading branch information
niklaspandersson committed Apr 24, 2024
1 parent 06d810d commit e8d8e88
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/modules/decklink/consumer/decklink_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit e8d8e88

Please sign in to comment.