From 0ee666afaad366a0e96498b78fbf1c6fb30d6547 Mon Sep 17 00:00:00 2001 From: bai-isaac Date: Mon, 9 Oct 2023 21:25:09 +0800 Subject: [PATCH] [Encode] vdencAvcImgStatePar1 set to 0 for bug fix vdencAvcImgStatePar1 set to 0 for bug fix. --- .../encode_avc_vdenc_stream_in_feature.cpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/media_softlet/agnostic/common/codec/hal/enc/avc/features/encode_avc_vdenc_stream_in_feature.cpp b/media_softlet/agnostic/common/codec/hal/enc/avc/features/encode_avc_vdenc_stream_in_feature.cpp index 89b993a859d..afee2430ff1 100644 --- a/media_softlet/agnostic/common/codec/hal/enc/avc/features/encode_avc_vdenc_stream_in_feature.cpp +++ b/media_softlet/agnostic/common/codec/hal/enc/avc/features/encode_avc_vdenc_stream_in_feature.cpp @@ -202,6 +202,27 @@ MHW_SETPAR_DECL_SRC(VDENC_AVC_IMG_STATE, AvcVdencStreamInFeature) params.mbLevelQpEnable = m_enabled && picParams->EnableRollingIntraRefresh == ROLLING_I_DISABLED && (picParams->NumROI && !picParams->bNativeROI || m_basicFeature->m_mbQpDataEnabled); + if (m_enabled) + { + PMOS_INTERFACE osInterface = m_hwInterface->GetOsInterface(); + ENCODE_CHK_NULL_RETURN(osInterface); + MEDIA_WA_TABLE *pWaTable = osInterface->pfnGetWaTable(osInterface); + ENCODE_CHK_NULL_RETURN(pWaTable); + + if (MEDIA_IS_WA(pWaTable, Wa_15013906446)) + { +#if _MEDIA_RESERVED + params.vdencAvcImgStatePar1 = 0; +#else + params.extSettings.emplace_back( + [this](uint32_t *data) { + data[2] &= 0xffffff7f; + return MOS_STATUS_SUCCESS; + }); +#endif // _MEDIA_RESERVED + } + } + return MOS_STATUS_SUCCESS; }