From d3f59ce3714b4ce90dc79a38401c522f7f21afa9 Mon Sep 17 00:00:00 2001 From: SteveZIntel Date: Sat, 3 Aug 2024 06:04:05 +0800 Subject: [PATCH] [Decode] Coding Style Refinement This patch is for coding style refinement on mhw interface. --- .../dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp | 6 +++--- .../common/codec/hal/dec/vvc/packet/decode_vvc_packet.h | 5 ++--- .../codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.cpp | 5 ++--- .../common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.h | 5 ++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp index 71e232e6911..33e91645f79 100644 --- a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp +++ b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp @@ -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(m_hwInterface); - if (_m_hwInterface != nullptr) + CodechalHwInterfaceXe2_Lpm_Base *hwInterface = dynamic_cast(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()) diff --git a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_packet.h b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_packet.h index 1a7bd507c17..0bd10051fef 100644 --- a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_packet.h +++ b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_packet.h @@ -58,10 +58,9 @@ class VvcDecodePkt : public CmdPacket, public MediaStatusReportObserver m_osInterface = hwInterface->GetOsInterface(); m_miItf = std::static_pointer_cast(hwInterface->GetMiInterfaceNext()); m_vdencItf = std::static_pointer_cast(hwInterface->GetVdencInterfaceNext()); - CodechalHwInterfaceNext * _m_hwInterface = dynamic_cast(m_hwInterface); - if (_m_hwInterface != nullptr) + if (m_hwInterface != nullptr) { - m_vvcpItf = std::static_pointer_cast(_m_hwInterface->GetVvcpInterfaceNext()); + m_vvcpItf = std::static_pointer_cast(m_hwInterface->GetVvcpInterfaceNext()); } } } diff --git a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.cpp b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.cpp index 6cb301a30ac..15f31862993 100644 --- a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.cpp +++ b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.cpp @@ -860,10 +860,9 @@ namespace decode { DECODE_FUNC_CALL(); uint32_t sliceLvlBufSize = 0; - CodechalHwInterfaceNext * _m_hwInterface = dynamic_cast(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; diff --git a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.h b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.h index db1c1db362b..95dade83aea 100644 --- a/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.h +++ b/media_softlet/agnostic/common/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet.h @@ -551,10 +551,9 @@ class VvcDecodeS2LPkt : public DecodeHucBasic, public mhw::vdbox::huc::Itf::ParS m_vdencItf = std::static_pointer_cast(hwInterface->GetVdencInterfaceNext()); m_hucItf = std::static_pointer_cast(hwInterface->GetHucInterfaceNext()); - CodechalHwInterfaceNext *_m_hwInterface = dynamic_cast(m_hwInterface); - if (_m_hwInterface != nullptr) + if (m_hwInterface != nullptr) { - m_vvcpItf = std::static_pointer_cast(_m_hwInterface->GetVvcpInterfaceNext()); + m_vvcpItf = std::static_pointer_cast(m_hwInterface->GetVvcpInterfaceNext()); } } }