diff --git a/media_softlet/agnostic/FSL/Xe3_LPM/codec/hal/dec/vvc/pipeline/decode_vvc_pipeline_adapter_xe3_lpm.cpp b/media_softlet/agnostic/FSL/Xe3_LPM/codec/hal/dec/vvc/pipeline/decode_vvc_pipeline_adapter_xe3_lpm.cpp new file mode 100644 index 00000000000..66607b8da9e --- /dev/null +++ b/media_softlet/agnostic/FSL/Xe3_LPM/codec/hal/dec/vvc/pipeline/decode_vvc_pipeline_adapter_xe3_lpm.cpp @@ -0,0 +1,135 @@ +/* +* Copyright (c) 2024, Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ +//! +//! \file decode_vvc_pipeline_adapter_xe3_lpm.cpp +//! \brief Defines the interface to adapt to vvc decode pipeline +//! + +#include "decode_vvc_pipeline_adapter_xe3_lpm.h" +#include "decode_utils.h" + +DecodeVvcPipelineAdapterXe3Lpm::DecodeVvcPipelineAdapterXe3Lpm( + CodechalHwInterfaceNext * hwInterface, + CodechalDebugInterface *debugInterface) + : DecodePipelineAdapter(hwInterface, debugInterface) +{ + DECODE_CHK_NULL_NO_STATUS_RETURN(m_osInterface); + m_osInterface->pfnVirtualEngineSupported(m_osInterface, true, true); + Mos_SetVirtualEngineSupported(m_osInterface, true); +} + +MOS_STATUS DecodeVvcPipelineAdapterXe3Lpm::BeginFrame() +{ + DECODE_FUNC_CALL(); + decode::DecodePipelineParams decodeParams; + decodeParams.m_pipeMode = decode::decodePipeModeBegin; + DECODE_CHK_STATUS(m_decoder->Prepare(&decodeParams)); + return m_decoder->Execute(); +} + +MOS_STATUS DecodeVvcPipelineAdapterXe3Lpm::EndFrame() +{ + DECODE_FUNC_CALL(); + decode::DecodePipelineParams decodeParams; + decodeParams.m_pipeMode = decode::decodePipeModeEnd; + DECODE_CHK_STATUS(m_decoder->Prepare(&decodeParams)); + return m_decoder->Execute(); +} + +MOS_STATUS DecodeVvcPipelineAdapterXe3Lpm::Allocate(CodechalSetting *codecHalSettings) +{ + DECODE_FUNC_CALL(); + m_decoder = std::make_shared(m_hwInterface, m_debugInterface); + DECODE_CHK_NULL(m_decoder); + return m_decoder->Init(codecHalSettings); +} + +MOS_STATUS DecodeVvcPipelineAdapterXe3Lpm::Execute(void *params) +{ + DECODE_FUNC_CALL(); + decode::DecodePipelineParams decodeParams; + decodeParams.m_params = (CodechalDecodeParams*)params; + decodeParams.m_pipeMode = decode::decodePipeModeProcess; + DECODE_CHK_STATUS(m_decoder->Prepare(&decodeParams)); + return m_decoder->Execute(); +} + +MOS_STATUS DecodeVvcPipelineAdapterXe3Lpm::GetStatusReport( + void *status, + uint16_t numStatus) +{ + DECODE_FUNC_CALL(); + return m_decoder->GetStatusReport(status, numStatus); +} + +bool DecodeVvcPipelineAdapterXe3Lpm::IsIncompletePicture() +{ + return (!m_decoder->IsCompleteBitstream()); +} + +MOS_SURFACE *DecodeVvcPipelineAdapterXe3Lpm::GetDummyReference() +{ + DECODE_FUNC_CALL(); + return m_decoder->GetDummyReference(); +} + +CODECHAL_DUMMY_REFERENCE_STATUS DecodeVvcPipelineAdapterXe3Lpm::GetDummyReferenceStatus() +{ + DECODE_FUNC_CALL(); + return m_decoder->GetDummyReferenceStatus(); +} + +void DecodeVvcPipelineAdapterXe3Lpm::SetDummyReferenceStatus(CODECHAL_DUMMY_REFERENCE_STATUS status) +{ + DECODE_FUNC_CALL(); + m_decoder->SetDummyReferenceStatus(status); +} + +uint32_t DecodeVvcPipelineAdapterXe3Lpm::GetCompletedReport() +{ + return m_decoder->GetCompletedReport(); +} + +void DecodeVvcPipelineAdapterXe3Lpm::Destroy() +{ + DECODE_FUNC_CALL(); + m_decoder->Destroy(); +} + +MOS_GPU_CONTEXT DecodeVvcPipelineAdapterXe3Lpm::GetDecodeContext() +{ + DECODE_FUNC_CALL(); + return m_decoder->GetDecodeContext(); +} + +GPU_CONTEXT_HANDLE DecodeVvcPipelineAdapterXe3Lpm::GetDecodeContextHandle() +{ + DECODE_FUNC_CALL(); + return m_decoder->GetDecodeContextHandle(); +} + +#ifdef _DECODE_PROCESSING_SUPPORTED +bool DecodeVvcPipelineAdapterXe3Lpm::IsDownSamplingSupported() +{ + return false; +} +#endif \ No newline at end of file diff --git a/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_register_xe3_lpm.h b/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_register_xe3_lpm.h new file mode 100644 index 00000000000..af24350f189 --- /dev/null +++ b/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_register_xe3_lpm.h @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2023-2024, Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ +//! +//! \file decode_vvc_s2l_packet_register.h +//! +#ifndef __DECODE_VVC_S2L_PACKET_REGISTER_XE3_LPM_H__ +#define __DECODE_VVC_S2L_PACKET_REGISTER_XE3_LPM_H__ +#include "decode_huc_packet_creator.h" +#include "decode_vvc_s2l_packet_xe3_lpm_base.h" + +namespace decode +{ + REGISTER_HUC_PACKET(VvcS2L, Xe3Lpm, VvcDecodeS2LPktXe3_Lpm_Base, false); +} + +#endif \ No newline at end of file diff --git a/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/media_srcs.cmake b/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/media_srcs.cmake new file mode 100644 index 00000000000..634653b4358 --- /dev/null +++ b/media_softlet/agnostic/Xe3_FSL/Xe3_LPM/codec/hal/dec/vvc/packet/media_srcs.cmake @@ -0,0 +1,40 @@ +# Copyright (c) 2023-2024, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +if(${VVC_Decode_Supported} STREQUAL "yes") +set(SOFTLET_DECODE_VVC_SOURCES_ + ${SOFTLET_DECODE_VVC_SOURCES_} + ${CMAKE_CURRENT_LIST_DIR}/decode_vvc_s2l_packet_xe3_lpm_base.cpp +) + +set(SOFTLET_DECODE_VVC_HEADERS_ + ${SOFTLET_DECODE_VVC_HEADERS_} + ${CMAKE_CURRENT_LIST_DIR}/decode_vvc_s2l_packet_xe3_lpm_base.h + ${CMAKE_CURRENT_LIST_DIR}/decode_vvc_s2l_packet_register_xe3_lpm.h +) + +source_group( CodecHalNext\\Xe3_Lpm\\Decode FILES ${SOFTLET_DECODE_VVC_SOURCES_} ${SOFTLET_DECODE_VVC_HEADERS_}) + +endif() + +set(SOFTLET_DECODE_VVC_PRIVATE_INCLUDE_DIRS_ + ${SOFTLET_DECODE_VVC_PRIVATE_INCLUDE_DIRS_} + ${CMAKE_CURRENT_LIST_DIR} +) \ No newline at end of file