[Decode] Add flag for HEVCd HDR SEI parsing result (#2914)
* [Decode] Add flag for HEVCd HDR SEI parsing result
* Fix commnets
pengxin99 authored 1 year, 8 months ago
GitHub committed 1 year, 8 months ago
1394 | 1394 |
dispaly_colour->WhitePointY = (mfxU16)pFrame->m_mastering_display.SEI_messages.mastering_display.white_point[1];
|
1395 | 1395 |
dispaly_colour->MaxDisplayMasteringLuminance = (mfxU32)pFrame->m_mastering_display.SEI_messages.mastering_display.max_luminance;
|
1396 | 1396 |
dispaly_colour->MinDisplayMasteringLuminance = (mfxU32)pFrame->m_mastering_display.SEI_messages.mastering_display.min_luminance;
|
1397 | |
}
|
|
1397 |
dispaly_colour->InsertPayloadToggle = MFX_PAYLOAD_IDR;
|
|
1398 |
}
|
|
1399 |
else if (dispaly_colour)
|
|
1400 |
{
|
|
1401 |
dispaly_colour->InsertPayloadToggle = MFX_PAYLOAD_OFF;
|
|
1402 |
}
|
|
1403 |
|
1398 | 1404 |
mfxExtContentLightLevelInfo* content_light = (mfxExtContentLightLevelInfo*)GetExtendedBuffer(surface_out->Data.ExtParam, surface_out->Data.NumExtParam, MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO);
|
1399 | 1405 |
if (content_light && pFrame->m_content_light_level_info.payLoadSize > 0)
|
1400 | 1406 |
{
|
1401 | 1407 |
content_light->MaxContentLightLevel = (mfxU16)pFrame->m_content_light_level_info.SEI_messages.content_light_level_info.max_content_light_level;
|
1402 | 1408 |
content_light->MaxPicAverageLightLevel = (mfxU16)pFrame->m_content_light_level_info.SEI_messages.content_light_level_info.max_pic_average_light_level;
|
|
1409 |
content_light->InsertPayloadToggle = MFX_PAYLOAD_IDR;
|
|
1410 |
}
|
|
1411 |
else if (content_light)
|
|
1412 |
{
|
|
1413 |
content_light->InsertPayloadToggle = MFX_PAYLOAD_OFF;
|
1403 | 1414 |
}
|
1404 | 1415 |
|
1405 | 1416 |
}
|
5228 | 5228 |
**Description**
|
5229 | 5229 |
|
5230 | 5230 |
The `mfxExtMasteringDisplayColourVolume` configures the HDR SEI message. If application attaches this structure to the [mfxEncodeCtrl](#mfxEncodeCtrl) at [runtime](#MFXVideoENCODE_EncodeFrameAsync), the encoder inserts the HDR SEI message for current frame and ignores `InsertPayloadToggle`. If application attaches this structure to the [mfxVideoParam](#mfxVideoParam) during [initialization](#MFXVideoENCODE_Init) or [reset](#MFXVideoENCODE_Reset), the encoder inserts HDR SEI message based on `InsertPayloadToggle`. Fields semantic defined in ITU-T* H.265 Annex D.
|
|
5231 |
If application attaches this structure to the [mfxFrameSurface1](#mfxFrameSurface) at [runtime](#MFXVideoDECODE_DecodeFrameAsync) for HDR SEI parsing, the decoder sets `InsertPayloadToggle` to `MFX_PAYLOAD_IDR` if there exist MasteringDisplayColourVolume in the current frame. Otherwise the decoder sets `InsertPayloadToggle` to `MFX_PAYLOAD_OFF`.
|
5231 | 5232 |
|
5232 | 5233 |
**Members**
|
5233 | 5234 |
|
|
5260 | 5261 |
**Description**
|
5261 | 5262 |
|
5262 | 5263 |
The `mfxExtContentLightLevelInfo` structure configures the HDR SEI message. If application attaches this structure to the [mfxEncodeCtrl](#mfxEncodeCtrl) structure at [runtime](#MFXVideoENCODE_EncodeFrameAsync), the encoder inserts the HDR SEI message for current frame and ignores `InsertPayloadToggle`. If application attaches this structure to the [mfxVideoParam](#mfxVideoParam) structure during [initialization](#MFXVideoENCODE_Init) or [reset](#MFXVideoENCODE_Reset), the encoder inserts HDR SEI message based on `InsertPayloadToggle`. Fields semantic defined in ITU-T* H.265 Annex D.
|
|
5264 |
If application attaches this structure to the [mfxFrameSurface1](#mfxFrameSurface) at [runtime](#MFXVideoDECODE_DecodeFrameAsync) for HDR SEI parsing, the decoder sets `InsertPayloadToggle` to `MFX_PAYLOAD_IDR` if there exist MasteringDisplayColourVolume in the current frame. Otherwise the decoder sets `InsertPayloadToggle` to `MFX_PAYLOAD_OFF`.
|
5263 | 5265 |
|
5264 | 5266 |
**Members**
|
5265 | 5267 |
|