Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

[HEVCd] Added HDR SEI info parsing for HEVC decoding #2726

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

pengxin99
Copy link
Contributor

For #2597

Attach the MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME and MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO to outputSurface when you need this info for HEVC HDR transfer.

     mfxFrameSurface1& surf;
    // Mastering Display Colour Volume SEI info
    mfxExtMasteringDisplayColourVolume* pExtPar_MasteringDisplay = new mfxExtMasteringDisplayColourVolume{};
    pExtPar_MasteringDisplay->Header.BufferId = MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME;
    pExtPar_MasteringDisplay->Header.BufferSz = sizeof(mfxExtMasteringDisplayColourVolume);
    
    // Mastering Content Light Level info
    mfxExtContentLightLevelInfo* pExtPar_ContentLight = new mfxExtContentLightLevelInfo{};
    pExtPar_ContentLight->Header.BufferId = MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO;
    pExtPar_ContentLight->Header.BufferSz = sizeof(mfxExtContentLightLevelInfo);

    surf.Data.ExtParam[0] = reinterpret_cast<mfxExtBuffer*>(pExtPar_MasteringDisplay);
    surf.Data.ExtParam[1] = reinterpret_cast<mfxExtBuffer*>(pExtPar_ContentLight);

@pengxin99 pengxin99 changed the title [HEVCe] Added HDR SEI info parsing for HEVC decoding [HEVCd] Added HDR SEI info parsing for HEVC decoding Jul 7, 2021
Comment on lines 1388 to 1391
mfxExtMasteringDisplayColourVolume* dispaly_colour = (mfxExtMasteringDisplayColourVolume*)GetExtendedBuffer(surface_out->Data.ExtParam, surface_out->Data.NumExtParam, MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME);
if (pFrame->m_mastering_display.payLoadSize != 0)
{
if (dispaly_colour && pFrame->m_mastering_display.payLoadSize > 0)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU HDR SEI might be present not on each frame. If so, what is the expectation here: shall decoder repeat previous SEI HDR info ? It may require ARB discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, the related ExtBuffer will use the default value 0 for the frame not include HDR SEI. And can do modify according to the ARB discussion

@dmitryermilov dmitryermilov self-requested a review July 8, 2021 06:58
@pengxin99 pengxin99 requested a review from onabiull as a code owner August 10, 2021 14:25
@softworkz
Copy link

Hi, what happened to this PR?

It doesn't look like there would be any showstopping reason?

Copy link
Contributor

@dmitryermilov dmitryermilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but we need to decide if we need to update manual, especially for VPL. I'll ping Igor.

@dmitryermilov dmitryermilov merged commit 2c2b13f into Intel-Media-SDK:master Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants