1 /* Copyright (c) 2020, Intel Corporation 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a 4 * copy of this software and associated documentation files (the "Software"), 5 * to deal in the Software without restriction, including without limitation 6 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 * and/or sell copies of the Software, and to permit persons to whom the 8 * Software is furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included 11 * in all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 17 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19 * OTHER DEALINGS IN THE SOFTWARE. 20 */ 21 //! 22 //! \file vp_render_sfc_m12.h 23 //! \brief The header file of the base class of SFC rendering component 24 //! \details The SFC renderer supports Scaling, IEF, CSC/ColorFill and Rotation. 25 //! It's responsible for setting up HW states and generating the SFC 26 //! commands. 27 //! 28 29 #ifndef __VP_RENDER_SFC_M12_H__ 30 #define __VP_RENDER_SFC_M12_H__ 31 32 #include "mhw_sfc_g12_X.h" 33 #include "vp_render_sfc_base_legacy.h" 34 35 namespace vp { 36 37 class SfcRenderM12 : public SfcRenderBaseLegacy 38 { 39 public: 40 SfcRenderM12(VP_MHWINTERFACE &vpMhwinterface, PVpAllocator &allocator, bool disbaleSfcDithering); 41 virtual ~SfcRenderM12(); 42 43 //! 44 //! \brief Setup SFC states and parameters 45 //! \details Setup SFC states and parameters including M12 SFC State 46 //! \param [in] targetSurface 47 //! Pointer to Output Surface 48 //! \return Return MOS_STATUS_SUCCESS if successful, otherwise failed 49 //! 50 virtual MOS_STATUS SetupSfcState( 51 PVP_SURFACE targetSurface); 52 53 virtual MOS_STATUS AddSfcLock( 54 PMOS_COMMAND_BUFFER pCmdBuffer, 55 PMHW_SFC_LOCK_PARAMS pSfcLockParams); 56 57 //! 58 //! \brief Set sfc pipe selected with vebox 59 //! \details Set sfc pipe selected with vebox 60 //! \param [in] dwSfcIndex 61 //! Sfc pipe selected with vebox 62 //! \param [in] dwSfcCount 63 //! Sfc pipe num in total 64 //! \return MOS_STATUS 65 //! MOS_STATUS_SUCCESS if success, else fail reason 66 virtual MOS_STATUS SetSfcPipe( 67 uint32_t dwSfcIndex, 68 uint32_t dwSfcCount); 69 70 protected: 71 //! 72 //! \brief Initiazlize SFC State Parameters 73 //! \details Initiazlize SFC State Parameters 74 //! \return Return MOS_STATUS_SUCCESS if successful, otherwise failed 75 //! 76 virtual MOS_STATUS InitSfcStateParams(); 77 78 virtual MOS_STATUS SetSfcStateInputOrderingModeHcp( 79 PMHW_SFC_STATE_PARAMS sfcStateParams); 80 81 virtual MOS_STATUS SetCodecPipeMode(CODECHAL_STANDARD codecStandard); 82 83 virtual MOS_STATUS SetupScalabilityParams(); 84 85 virtual bool IsOutputChannelSwapNeeded(MOS_FORMAT outputFormat); 86 virtual bool IsCscNeeded(SFC_CSC_PARAMS &cscParams); 87 MEDIA_CLASS_DEFINE_END(vp__SfcRenderM12) 88 }; 89 90 } 91 #endif // !__VP_RENDER_SFC_M12_H__ 92