Skip to content

Commit

Permalink
[Encode] AVC xe2 critical log cleanup
Browse files Browse the repository at this point in the history
Check AVC fastpass avcSeqParams in Update function
  • Loading branch information
SenlinGe authored and intel-mediadev committed Nov 5, 2024
1 parent 1dc4c3e commit f5882dd
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ AvcVdencFastPass_Xe2_Hpm::AvcVdencFastPass_Xe2_Hpm(
m_basicFeature = dynamic_cast<AvcBasicFeature *>(encFeatureManager->GetFeature(FeatureIDs::basicFeature));
ENCODE_CHK_NULL_NO_STATUS_RETURN(m_basicFeature);

PCODEC_AVC_ENCODE_SEQUENCE_PARAMS avcSeqParams = m_basicFeature->m_seqParam;
ENCODE_CHK_NULL_NO_STATUS_RETURN(avcSeqParams);

if (hwInterface)
{
m_userSettingPtr = hwInterface->GetOsInterface()->pfnGetUserSettingInstance(hwInterface->GetOsInterface());
Expand All @@ -58,10 +55,6 @@ AvcVdencFastPass_Xe2_Hpm::AvcVdencFastPass_Xe2_Hpm(
MediaUserSetting::Group::Sequence);

m_enabled = outValue.Get<bool>();
if (avcSeqParams->GopRefDist > 1) //xe2_hpm HW restriction, no B frame
{
m_enabled = false;
}

if (m_enabled)
{
Expand All @@ -80,14 +73,19 @@ AvcVdencFastPass_Xe2_Hpm::AvcVdencFastPass_Xe2_Hpm(

MOS_STATUS AvcVdencFastPass_Xe2_Hpm::Update(void *params)
{
PCODEC_AVC_ENCODE_SEQUENCE_PARAMS avcSeqParams = m_basicFeature->m_seqParam;
ENCODE_CHK_NULL_RETURN(avcSeqParams);

if (avcSeqParams->GopRefDist > 1) //xe2_hpm HW restriction, no B frame
{
m_enabled = false;
}

if (!m_enabled)
{
return MOS_STATUS_SUCCESS;
}

PCODEC_AVC_ENCODE_SEQUENCE_PARAMS avcSeqParams = m_basicFeature->m_seqParam;
ENCODE_CHK_NULL_RETURN(avcSeqParams);

//xe2_hpm HW input surface restriction
m_aligned_Width = MOS_ALIGN_FLOOR(m_basicFeature->m_seqParam->FrameWidth, 256);
m_aligned_Height = MOS_ALIGN_FLOOR(m_basicFeature->m_seqParam->FrameHeight, 128);
Expand Down

0 comments on commit f5882dd

Please sign in to comment.