1 /* 2 * Copyright (c) 2018-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 #ifndef __VP_PIPELINE_ADAPTER_G12_H__ 23 #define __VP_PIPELINE_ADAPTER_G12_H__ 24 25 #include "vphal_g12_tgllp.h" 26 #include "vp_pipeline.h" 27 #include "vp_pipeline_common.h" 28 #include "vp_pipeline_adapter_legacy.h" 29 30 class VpPipelineG12Adapter : public VphalStateG12Tgllp, public VpPipelineAdapterLegacy 31 { 32 public: 33 VpPipelineG12Adapter( 34 PMOS_INTERFACE pOsInterface, 35 vp::VpPlatformInterface &vpPlatformInterface, 36 MOS_STATUS &eStatus); 37 38 //! 39 //! \brief VpPipelineG12Adapter Destuctor 40 //! \details Destroys VpPipelineG12Adapter and all internal states and objects 41 //! \return void 42 //! 43 virtual ~VpPipelineG12Adapter(); 44 45 //! 46 //! \brief Performs VP Rendering 47 //! \details Performs VP Rendering 48 //! - call default render of video 49 //! \param [in] pcRenderParams 50 //! Pointer to Render Params 51 //! \return MOS_STATUS 52 //! Return MOS_STATUS_SUCCESS if successful, otherwise failed 53 //! 54 virtual MOS_STATUS Render( 55 PCVPHAL_RENDER_PARAMS pcRenderParams) override; 56 57 //! 58 //! \brief Allocate VP Resources 59 //! \details Allocate VP Resources 60 //! - Allocate and initialize HW states 61 //! - Allocate and initialize renderer states 62 //! \param [in] pVpHalSettings 63 //! Pointer to VPHAL Settings 64 //! \return MOS_STATUS 65 //! Return MOS_STATUS_SUCCESS if successful, otherwise failed 66 //! 67 virtual MOS_STATUS Allocate( 68 const VphalSettings *pVpHalSettings) override; 69 70 virtual MOS_STATUS GetStatusReport( 71 PQUERY_STATUS_REPORT_APP pQueryReport, 72 uint16_t numStatus) override; 73 74 virtual MOS_STATUS Execute(PVP_PIPELINE_PARAMS params) override; 75 76 //! 77 //! \brief Get feature reporting 78 //! \details Get feature reporting 79 //! \return VphalFeatureReport* 80 //! Pointer to VPHAL_FEATURE_REPOR: rendering features reported 81 //! 82 virtual VphalFeatureReport* GetRenderFeatureReport() override; 83 84 protected: IsApoEnabled()85 virtual bool IsApoEnabled() override 86 { 87 return true; 88 } 89 90 MEDIA_CLASS_DEFINE_END(VpPipelineG12Adapter) 91 }; 92 #endif // !__VP_PIPELINE_ADAPTER_G12_H__ 93 94