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_vp9_pipeline_g12.h 24 //! \brief Defines the interface for vp9 decode pipeline 25 //! 26 #ifndef __DECODE_VP9_PIPELINE_M12_H__ 27 #define __DECODE_VP9_PIPELINE_M12_H__ 28 29 #include "decode_vp9_pipeline.h" 30 #include "codec_def_decode_vp9.h" 31 #include "decode_huc_packet_creator_g12.h" 32 #include "decode_huc_prob_update_creator_m12.h" 33 34 namespace decode 35 { 36 37 class Vp9PipelineG12 : public Vp9Pipeline, public HucProbUpdatePacketCreatorM12 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 Vp9PipelineG12( 48 CodechalHwInterface * hwInterface, 49 CodechalDebugInterface *debugInterface); 50 ~Vp9PipelineG12()51 virtual ~Vp9PipelineG12(){}; 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 //! 78 //! \brief Create post sub packets 79 //! \param [in] subPipelineManager 80 //! \return MOS_STATUS 81 //! MOS_STATUS_SUCCESS if success, else fail reason 82 //! 83 virtual MOS_STATUS CreatePostSubPipeLines(DecodeSubPipelineManager &subPipelineManager) override; 84 85 //! 86 //! \brief Create pre sub packets 87 //! \param [in] subPipelineManager 88 //! \return MOS_STATUS 89 //! MOS_STATUS_SUCCESS if success, else fail reason 90 //! 91 virtual MOS_STATUS CreatePreSubPipeLines(DecodeSubPipelineManager &subPipelineManager) override; 92 93 94 protected: 95 virtual MOS_STATUS Initialize(void *settings) override; 96 virtual MOS_STATUS Uninitialize() override; 97 98 //! 99 //! \brief User Feature Key Report 100 //! \return MOS_STATUS 101 //! MOS_STATUS_SUCCESS if success, else fail reason 102 //! 103 virtual MOS_STATUS UserFeatureReport() override; 104 105 //! 106 //! \brief Create sub packets 107 //! \param [in] codecSettings 108 //! Point to codechal settings 109 //! \return MOS_STATUS 110 //! MOS_STATUS_SUCCESS if success, else fail reason 111 //! 112 virtual MOS_STATUS CreateSubPackets(DecodeSubPacketManager &subPacketManager, CodechalSetting &codecSettings) override; 113 114 //! 115 //! \brief Initialize MMC state 116 //! 117 //! \return MOS_STATUS 118 //! MOS_STATUS_SUCCESS if success 119 //! 120 virtual MOS_STATUS InitMmcState(); 121 122 virtual MOS_STATUS CreateFeatureManager() override; 123 124 virtual MOS_STATUS InitContexOption(Vp9BasicFeature &basicFeature) override; 125 126 #if USE_CODECHAL_DEBUG_TOOL 127 //! \brief Dump the parameters 128 //! 129 //! \return MOS_STATUS 130 //! MOS_STATUS_SUCCESS if success, else fail reason 131 //! 132 MOS_STATUS DumpParams(Vp9BasicFeature &basicFeature); 133 #endif 134 135 CodechalHwInterface *m_hwInterface = nullptr; 136 MEDIA_CLASS_DEFINE_END(decode__Vp9PipelineG12) 137 }; 138 } // namespace decode 139 #endif // !__DECODE_VP9_PIPELINE_M12_H__ 140