1 /* 2 * Copyright (c) 2017 - 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 vphal_render_vebox_iecp.h 24 //! \brief VPHAL VEBOX Image Enhancement and Color Processing (IECP) interfaces 25 //! \details VPHAL VEBOX Image Enhancement and Color Processing (IECP) interfaces 26 //! 27 #ifndef __VPHAL_RENDER_VEBOX_IECP_H__ 28 #define __VPHAL_RENDER_VEBOX_IECP_H__ 29 30 #include "mhw_vebox.h" 31 32 #define VPHAL_MAX_IECP_FILTERS 16 //!< Max number of IECP filters 33 34 typedef struct VPHAL_VEBOX_RENDER_DATA *PVPHAL_VEBOX_RENDER_DATA; 35 typedef class VPHAL_VEBOX_STATE *PVPHAL_VEBOX_STATE; 36 37 typedef class VPHAL_VEBOX_IECP_PARAMS *PVPHAL_VEBOX_IECP_PARAMS; 38 39 class VPHAL_VEBOX_IECP_FILTER 40 { 41 public: ~VPHAL_VEBOX_IECP_FILTER()42 virtual ~VPHAL_VEBOX_IECP_FILTER() {} 43 44 //! 45 //! \brief Vebox set IECP parameter 46 //! \details Set Vebox IECP state parameter 47 //! \param [in] pSrcSurface 48 //! Pointer to input surface of Vebox 49 //! \param [in,out] pRenderData 50 //! Pointer to Vebox Render Data 51 //! \return void 52 //! SetParams(PVPHAL_SURFACE pSrcSurface,PVPHAL_VEBOX_RENDER_DATA pRenderData)53 virtual void SetParams( 54 PVPHAL_SURFACE pSrcSurface, 55 PVPHAL_VEBOX_RENDER_DATA pRenderData) {} 56 57 //! 58 //! \brief Init Vebox IECP parameter 59 //! \param [in] pVphalVeboxIecpParams 60 //! Pointer to input Vphal Iecp parameters 61 //! \param [in,out] pMhwVeboxIecpParams 62 //! Pointer to Mhw Iecp parameters 63 //! \return void 64 //! InitParams(PVPHAL_VEBOX_IECP_PARAMS pVphalVeboxIecpParams,PMHW_VEBOX_IECP_PARAMS pMhwVeboxIecpParams)65 virtual void InitParams( 66 PVPHAL_VEBOX_IECP_PARAMS pVphalVeboxIecpParams, 67 PMHW_VEBOX_IECP_PARAMS pMhwVeboxIecpParams) {} 68 }; 69 typedef VPHAL_VEBOX_IECP_FILTER * PVPHAL_VEBOX_IECP_FILTER; 70 71 typedef class VPHAL_VEBOX_IECP_RENDERER_EXT *PVPHAL_VEBOX_IECP_RENDERER_EXT; 72 class VPHAL_VEBOX_IECP_RENDERER 73 { 74 public: 75 VPHAL_VEBOX_IECP_RENDERER(); 76 77 virtual ~VPHAL_VEBOX_IECP_RENDERER(); 78 79 PVPHAL_VEBOX_STATE m_veboxState; 80 PVPHAL_VEBOX_RENDER_DATA m_renderData; 81 GetExtParams()82 virtual PVPHAL_VEBOX_IECP_RENDERER_EXT GetExtParams() { return nullptr; } 83 84 //! 85 //! \brief Vebox set alpha parameter 86 //! \details Setup Alpha Params 87 //! \param [in] pOutSurface 88 //! Pointer to output surface of Vebox 89 //! \param [in,out] pVphalVeboxIecpParams 90 //! Pointer to IECP parameter 91 //! \return void 92 //! 93 void VeboxSetAlphaParams( 94 PVPHAL_SURFACE pOutSurface, 95 PVPHAL_VEBOX_IECP_PARAMS pVphalVeboxIecpParams); 96 97 //! 98 //! \brief Initial Vebox IECP state parameter 99 //! \param [in] VphalColorSpace 100 //! Vphal color space 101 //! \param [in] pMhwVeboxIecpParams 102 //! Pointer to Mhw Vebox IECP parameters 103 //! \return MOS_STATUS 104 //! 105 virtual MOS_STATUS InitParams( 106 VPHAL_CSPACE VphalColorSpace, 107 PMHW_VEBOX_IECP_PARAMS pMhwVeboxIecpParams); 108 109 //! 110 //! \brief Vebox set IECP parameter 111 //! \details Set Vebox IECP state parameter 112 //! \param [in] pSrcSurface 113 //! Pointer to input surface of Vebox 114 //! \param [in] pOutSurface 115 //! Pointer to output surface of Vebox 116 //! \return void 117 //! 118 virtual void SetParams( 119 PVPHAL_SURFACE pSrcSurface, 120 PVPHAL_SURFACE pOutSurface); 121 122 private: 123 // Array of VEBOX IECP Filters 124 VPHAL_VEBOX_IECP_FILTER *m_filters[VPHAL_MAX_IECP_FILTERS]; 125 int32_t m_filterCount; 126 }; 127 typedef VPHAL_VEBOX_IECP_RENDERER * PVPHAL_VEBOX_IECP_RENDERER; 128 129 #endif //__VPHAL_RENDER_VEBOX_IECP_H__