Skip to content

Commit

Permalink
Define a new sidedata type for the DoVi RPU buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Mar 6, 2023
1 parent 19e58e6 commit 530baf9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions decoder/LAVVideo/decoders/avcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,13 @@ STDMETHODIMP CDecAvcodec::DecodePacket(AVPacket *avpkt, REFERENCE_TIME rtStartIn
processFFDOVIData(hdr, metadata);
}

AVFrameSideData *sdDOVIRPU = av_frame_get_side_data(m_pFrame, AV_FRAME_DATA_DOVI_RPU_BUFFER);
if (sdDOVIRPU)
{
BYTE *pDVRPU = AddLAVFrameSideData(pOutFrame, IID_MediaSideDataDOVIRPU, sdDOVIRPU->size);
memcpy(pDVRPU, sdDOVIRPU->data, sdDOVIRPU->size);
}

AVFrameSideData *sdCC = av_frame_get_side_data(m_pFrame, AV_FRAME_DATA_A53_CC);
if (sdCC)
{
Expand Down
3 changes: 3 additions & 0 deletions include/IMediaSideData.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ struct MediaSideDataHDR10Plus
};
#pragma pack(pop)

// {BAE40E6C-5B93-4170-90CC-5D5F02A29638}
DEFINE_GUID(IID_MediaSideDataDOVIRPU, 0xbae40e6c, 0x5b93, 0x4170, 0x90, 0xcc, 0x5d, 0x5f, 0x2, 0xa2, 0x96, 0x38);

// {277EE779-13F4-434E-BDEC-3D6F8C0E15D2}
DEFINE_GUID(IID_MediaSideDataDOVIMetadata, 0x277ee779, 0x13f4, 0x434e, 0xbd, 0xec, 0x3d, 0x6f, 0x8c, 0xe, 0x15, 0xd2);

Expand Down

0 comments on commit 530baf9

Please sign in to comment.