Skip to content

Commit

Permalink
[Decode] Coding Style Refinement
Browse files Browse the repository at this point in the history
This patch is for coding style refinement on mhw interface.
  • Loading branch information
SteveZIntel authored and intel-mediadev committed Aug 5, 2024
1 parent 128e179 commit d3f59ce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ MOS_STATUS VvcDecodeS2LPktXe2_Lpm_Base::Execute(MOS_COMMAND_BUFFER &cmdBuffer, b

// Check HuC_STATUS2 bit6, if bit6 > 0 HW continue execution following cmd, otherwise it send a COND BB END cmd.
uint32_t compareOperation = mhw::mi::xe2_lpm_base_next::Cmd::MI_CONDITIONAL_BATCH_BUFFER_END_CMD::COMPARE_OPERATION_MADGREATERTHANIDD;
CodechalHwInterfaceXe2_Lpm_Base * _m_hwInterface = dynamic_cast<CodechalHwInterfaceXe2_Lpm_Base *>(m_hwInterface);
if (_m_hwInterface != nullptr)
CodechalHwInterfaceXe2_Lpm_Base *hwInterface = dynamic_cast<CodechalHwInterfaceXe2_Lpm_Base *>(m_hwInterface);
if (hwInterface != nullptr)
{
DECODE_CHK_STATUS(_m_hwInterface->SendCondBbEndCmd(osResource, offset, 0, false, false, compareOperation, &cmdBuffer));
DECODE_CHK_STATUS(hwInterface->SendCondBbEndCmd(osResource, offset, 0, false, false, compareOperation, &cmdBuffer));
}

if (!m_vvcPipeline->IsSingleTaskPhaseSupported())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ class VvcDecodePkt : public CmdPacket, public MediaStatusReportObserver
m_osInterface = hwInterface->GetOsInterface();
m_miItf = std::static_pointer_cast<mhw::mi::Itf>(hwInterface->GetMiInterfaceNext());
m_vdencItf = std::static_pointer_cast<mhw::vdbox::vdenc::Itf>(hwInterface->GetVdencInterfaceNext());
CodechalHwInterfaceNext * _m_hwInterface = dynamic_cast<CodechalHwInterfaceNext *>(m_hwInterface);
if (_m_hwInterface != nullptr)
if (m_hwInterface != nullptr)
{
m_vvcpItf = std::static_pointer_cast<mhw::vdbox::vvcp::Itf>(_m_hwInterface->GetVvcpInterfaceNext());
m_vvcpItf = std::static_pointer_cast<mhw::vdbox::vvcp::Itf>(m_hwInterface->GetVvcpInterfaceNext());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,9 @@ namespace decode
{
DECODE_FUNC_CALL();
uint32_t sliceLvlBufSize = 0;
CodechalHwInterfaceNext * _m_hwInterface = dynamic_cast<CodechalHwInterfaceNext *>(m_hwInterface);
if (_m_hwInterface != nullptr)
if (m_hwInterface != nullptr)
{
DECODE_CHK_STATUS(_m_hwInterface->GetVvcpSliceLvlCmdSize(&sliceLvlBufSize));
DECODE_CHK_STATUS(m_hwInterface->GetVvcpSliceLvlCmdSize(&sliceLvlBufSize));
sliceLvlBufSize = MOS_ALIGN_CEIL(sliceLvlBufSize, 64);
}
return sliceLvlBufSize * sliceNum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,9 @@ class VvcDecodeS2LPkt : public DecodeHucBasic, public mhw::vdbox::huc::Itf::ParS
m_vdencItf = std::static_pointer_cast<mhw::vdbox::vdenc::Itf>(hwInterface->GetVdencInterfaceNext());
m_hucItf = std::static_pointer_cast<mhw::vdbox::huc::Itf>(hwInterface->GetHucInterfaceNext());

CodechalHwInterfaceNext *_m_hwInterface = dynamic_cast<CodechalHwInterfaceNext *>(m_hwInterface);
if (_m_hwInterface != nullptr)
if (m_hwInterface != nullptr)
{
m_vvcpItf = std::static_pointer_cast<mhw::vdbox::vvcp::Itf>(_m_hwInterface->GetVvcpInterfaceNext());
m_vvcpItf = std::static_pointer_cast<mhw::vdbox::vvcp::Itf>(m_hwInterface->GetVvcpInterfaceNext());
}
}
}
Expand Down

0 comments on commit d3f59ce

Please sign in to comment.