1 /* 2 * Copyright (c) 2020, 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_cp_bitstream.h 24 //! \brief Defines the common interface for decode cp bitstream 25 //! \details Defines the interface to handle the decode cp bitstream 26 //! 27 28 #ifndef __DECODE_CP_BITSTREAM_H__ 29 #define __DECODE_CP_BITSTREAM_H__ 30 31 #include "decode_resource_array.h" 32 #include "decode_sub_pipeline.h" 33 #include "codec_def_decode.h" 34 #include "media_feature_manager.h" 35 #include "decode_status_report.h" 36 #include "codechal_debug.h" 37 38 namespace decode 39 { 40 class DecodeStreamOut : public DecodeSubPipeline 41 { 42 public: 43 //! 44 //! \brief Decode input bitstream constructor 45 //! DecodeStreamOut(DecodePipeline * pipeline,MediaTask * task,uint8_t numVdbox)46 DecodeStreamOut(DecodePipeline *pipeline, MediaTask *task, uint8_t numVdbox) 47 : DecodeSubPipeline(pipeline, task, numVdbox) 48 {} 49 50 //! 51 //! \brief Decode input bitstream destructor 52 //! ~DecodeStreamOut()53 virtual ~DecodeStreamOut(){} 54 55 //! 56 //! \brief Initialize the bitstream context 57 //! 58 //! \param [in] settings 59 //! Reference to the Codechal settings 60 //! \return MOS_STATUS 61 //! MOS_STATUS_SUCCESS if success, else fail reason 62 //! Init(CodechalSetting & settings)63 virtual MOS_STATUS Init(CodechalSetting &settings) {return MOS_STATUS_SUCCESS;} 64 65 //! 66 //! \brief Prepare interal parameters 67 //! \param [in] params 68 //! Reference to decode pipeline parameters 69 //! \return MOS_STATUS 70 //! MOS_STATUS_SUCCESS if success, else fail reason 71 //! Prepare(DecodePipelineParams & params)72 virtual MOS_STATUS Prepare(DecodePipelineParams ¶ms) {return MOS_STATUS_SUCCESS;} 73 74 //! 75 //! \brief Get media function for context switch 76 //! \return MediaFunction 77 //! Return the media function 78 //! GetMediaFunction()79 MediaFunction GetMediaFunction() { return VdboxDecodeWaFunc;} 80 81 82 #if USE_CODECHAL_DEBUG_TOOL 83 //! 84 //! \brief Dump Output 85 //! \param [in] reportData 86 //! Decode status report data 87 //! \return MOS_STATUS 88 //! MOS_STATUS_SUCCESS if success, else fail reason 89 //! DumpOutput(const DecodeStatusReportData & reportData)90 virtual MOS_STATUS DumpOutput(const DecodeStatusReportData& reportData) {return MOS_STATUS_SUCCESS;} 91 92 //! 93 //! \brief InitStatusReportParam 94 //! \param [in] inputParameters 95 //! Decode status report parameters 96 //! \return MOS_STATUS 97 //! MOS_STATUS_SUCCESS if success, else fail reason 98 //! InitStatusReportParam(DecodeStatusParameters & inputParameters)99 virtual MOS_STATUS InitStatusReportParam(DecodeStatusParameters &inputParameters) {return MOS_STATUS_SUCCESS;} 100 #endif 101 protected: 102 //! 103 //! \brief Initialize scalability parameters 104 //! InitScalabilityPars(PMOS_INTERFACE osInterface)105 virtual void InitScalabilityPars(PMOS_INTERFACE osInterface) {} 106 107 MEDIA_CLASS_DEFINE_END(decode__DecodeStreamOut) 108 }; 109 } // namespace decode 110 111 #endif 112