1 /* 2 * Copyright (c) 2021, Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 //! 23 //! \file decode_vp8_pipeline_xe2_lpm_base.h 24 //! \brief Defines the interface for vp8 decode pipeline 25 //! 26 #ifndef __DECODE_VP8_PIPELINE_XE2_LPM_BASE_H__ 27 #define __DECODE_VP8_PIPELINE_XE2_LPM_BASE_H__ 28 29 #include "decode_vp8_pipeline.h" 30 #include "decode_vp8_packet_xe2_lpm_base.h" 31 #include "codec_def_decode_vp8.h" 32 #include "decode_huc_packet_creator.h" 33 34 namespace decode 35 { 36 37 class Vp8PipelineXe2_Lpm_Base : public Vp8Pipeline, public HucPacketCreator 38 { 39 public: 40 //! 41 //! \brief DecodePipeline constructor 42 //! \param [in] hwInterface 43 //! Pointer to CodechalHwInterface 44 //! \param [in] debugInterface 45 //! Pointer to CodechalDebugInterface 46 //! 47 Vp8PipelineXe2_Lpm_Base( 48 CodechalHwInterfaceNext * hwInterface, 49 CodechalDebugInterface *debugInterface); 50 ~Vp8PipelineXe2_Lpm_Base()51 virtual ~Vp8PipelineXe2_Lpm_Base(){}; 52 53 virtual MOS_STATUS Init(void *settings) override; 54 55 //! 56 //! \brief Prepare interal parameters, should be invoked for each frame 57 //! \param [in] params 58 //! Pointer to the input parameters 59 //! \return MOS_STATUS 60 //! MOS_STATUS_SUCCESS if success, else fail reason 61 //! 62 virtual MOS_STATUS Prepare(void *params) final; 63 64 //! 65 //! \brief Finish the execution for each frame 66 //! \return MOS_STATUS 67 //! MOS_STATUS_SUCCESS if success, else fail reason 68 //! 69 virtual MOS_STATUS Execute() final; 70 71 virtual MOS_STATUS GetStatusReport(void *status, uint16_t numStatus) override; 72 73 uint32_t GetCompletedReport(); 74 75 virtual MOS_STATUS Destroy() override; 76 77 protected: 78 virtual MOS_STATUS Initialize(void *settings) override; 79 virtual MOS_STATUS Uninitialize() override; 80 81 //! 82 //! \brief User Feature Key Report 83 //! \return MOS_STATUS 84 //! MOS_STATUS_SUCCESS if success, else fail reason 85 //! 86 virtual MOS_STATUS UserFeatureReport() override; 87 88 //! 89 //! \brief Create sub packets 90 //! \param [in] codecSettings 91 //! Point to codechal settings 92 //! \return MOS_STATUS 93 //! MOS_STATUS_SUCCESS if success, else fail reason 94 //! 95 virtual MOS_STATUS CreateSubPackets(DecodeSubPacketManager &subPacketManager, CodechalSetting &codecSettings) override; 96 97 #ifdef _MMC_SUPPORTED 98 //! 99 //! \brief Initialize MMC state 100 //! 101 //! \return MOS_STATUS 102 //! MOS_STATUS_SUCCESS if success 103 //! 104 virtual MOS_STATUS InitMmcState(); 105 #endif 106 107 #if USE_CODECHAL_DEBUG_TOOL 108 //! \brief Dump the parameters 109 //! 110 //! \return MOS_STATUS 111 //! MOS_STATUS_SUCCESS if success, else fail reason 112 //! 113 MOS_STATUS DumpParams(Vp8BasicFeature &basicFeature); 114 #endif 115 116 private: 117 Vp8DecodePktXe2_Lpm_Base *vp8DecodePkt = nullptr; 118 119 MEDIA_CLASS_DEFINE_END(decode__Vp8PipelineXe2_Lpm_Base) 120 }; 121 } // namespace decode 122 #endif // !__DECODE_VP8_PIPELINE_XE2_LPM_BASE_H__ 123