| 1 |
/*===================== begin_copyright_notice ================================== |
| 2 |
Copyright (c) 2024, 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 |
======================= end_copyright_notice ==================================*/ |
| 22 |
//! |
| 23 |
//! \file media_interfaces_ptl.h |
| 24 |
//! \brief All interfaces used for PTL that require factory creation |
| 25 |
//! |
| 26 |
|
| 27 |
#ifndef __MEDIA_INTERFACES_XE3_LPM_H__ |
| 28 |
#define __MEDIA_INTERFACES_XE3_LPM_H__ |
| 29 |
|
| 30 |
#include "media_interfaces_mhw_next.h" |
| 31 |
#include "media_interfaces_codechal_next.h" |
| 32 |
#include "media_interfaces_vphal.h" |
| 33 |
#include "media_interfaces_renderhal.h" |
| 34 |
#include "media_interfaces_hwinfo_device.h" |
| 35 |
#include "media_interfaces_mcpy_next.h" |
| 36 |
|
| 37 |
#include "mhw_cp_interface.h" |
| 38 |
#include "mhw_state_heap_xe2_hpg.h" |
| 39 |
#include "mhw_vdbox_hcp_impl_xe3_lpm.h" |
| 40 |
|
| 41 |
#include "mhw_vdbox_mfx_impl_xe3_lpm.h" |
| 42 |
|
| 43 |
#include "mhw_vdbox_vvcp_impl_xe3_lpm.h" |
| 44 |
#include "mhw_vdbox_avp_impl_xe3_lpm.h" |
| 45 |
|
| 46 |
#include "mhw_vdbox_huc_impl_xe3_lpm.h" |
| 47 |
|
| 48 |
#include "mhw_vdbox_vdenc_impl_xe3_lpm.h" |
| 49 |
|
| 50 |
#include "codec_hw_xe3_lpm_base.h" |
| 51 |
|
| 52 |
#ifdef _AVC_DECODE_SUPPORTED |
| 53 |
#include "decode_avc_pipeline_adapter_xe3_lpm_base.h" |
| 54 |
#endif |
| 55 |
|
| 56 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 57 |
#include "decode_hevc_pipeline_adapter_xe3_lpm_base.h" |
| 58 |
#endif |
| 59 |
|
| 60 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 61 |
#include "decode_jpeg_pipeline_adapter_xe3_lpm_base.h" |
| 62 |
#endif |
| 63 |
|
| 64 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 65 |
#include "decode_mpeg2_pipeline_adapter_xe3_lpm_base.h" |
| 66 |
#endif |
| 67 |
|
| 68 |
#ifdef _VP9_DECODE_SUPPORTED |
| 69 |
#include "decode_vp9_pipeline_adapter_xe3_lpm_base.h" |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifdef _VP8_DECODE_SUPPORTED |
| 73 |
#include "decode_vp8_pipeline_adapter_xe3_lpm_base.h" |
| 74 |
#endif |
| 75 |
|
| 76 |
#ifdef _AV1_DECODE_SUPPORTED |
| 77 |
#include "decode_av1_pipeline_adapter_xe3_lpm_base.h" |
| 78 |
#endif |
| 79 |
|
| 80 |
#ifdef _VVC_DECODE_SUPPORTED |
| 81 |
#include "decode_vvc_pipeline_adapter_xe3_lpm_base.h" |
| 82 |
#endif |
| 83 |
|
| 84 |
|
| 85 |
#ifdef _JPEG_ENCODE_SUPPORTED |
| 86 |
#include "encode_jpeg_pipeline_adapter.h" |
| 87 |
#endif |
| 88 |
|
| 89 |
#ifdef _HEVC_ENCODE_VDENC_SUPPORTED |
| 90 |
#include "encode_hevc_vdenc_pipeline_adapter_xe3_lpm_base.h" |
| 91 |
#endif |
| 92 |
|
| 93 |
#ifdef _AV1_ENCODE_VDENC_SUPPORTED |
| 94 |
#include "encode_av1_vdenc_pipeline_adapter_xe3_lpm.h" |
| 95 |
#endif |
| 96 |
|
| 97 |
#ifdef _AVC_ENCODE_VDENC_SUPPORTED |
| 98 |
#include "encode_avc_vdenc_pipeline_adapter_xe3_lpm.h" |
| 99 |
#endif |
| 100 |
|
| 101 |
#ifdef _VP9_ENCODE_VDENC_SUPPORTED |
| 102 |
#include "encode_vp9_vdenc_pipeline_adapter_xe3_lpm.h" |
| 103 |
#endif |
| 104 |
|
| 105 |
#include "renderhal_xe2_hpg_next.h" |
| 106 |
#include "decode_scalability_singlepipe_next.h" |
| 107 |
#include "decode_scalability_multipipe_next.h" |
| 108 |
|
| 109 |
#include "media_copy_xe3_lpm_base.h" |
| 110 |
|
| 111 |
class MhwInterfacesPtl_Next : public MhwInterfacesNext |
| 112 |
{ |
| 113 |
public: |
| 114 |
|
| 115 |
using Cp = MhwCpInterface; |
| 116 |
using StateHeap = MHW_STATE_HEAP_INTERFACE_XE2_HPG; |
| 117 |
|
| 118 |
virtual MOS_STATUS Initialize( |
| 119 |
CreateParams params, |
| 120 |
PMOS_INTERFACE osInterface); |
| 121 |
|
| 122 |
//! |
| 123 |
//! \brief Destroys all created MHW interfaces |
| 124 |
//! \details If the HAL creation fails, this is used for cleanup |
| 125 |
//! |
| 126 |
virtual void Destroy(); |
| 127 |
MEDIA_CLASS_DEFINE_END(MhwInterfacesPtl_Next) |
| 128 |
}; |
| 129 |
|
| 130 |
class CodechalDecodeInterfacesXe3_Lpm |
| 131 |
{ |
| 132 |
public: |
| 133 |
#ifdef _AVC_DECODE_SUPPORTED |
| 134 |
using Avc = DecodeAvcPipelineAdapterXe3_Lpm_Base; |
| 135 |
#endif |
| 136 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 137 |
using Hevc = DecodeHevcPipelineAdapterXe3_Lpm_Base; |
| 138 |
#endif |
| 139 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 140 |
using Jpeg = DecodeJpegPipelineAdapterXe3_Lpm_Base; |
| 141 |
#endif |
| 142 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 143 |
using Mpeg2 = DecodeMpeg2PipelineAdapterXe3_Lpm_Base; |
| 144 |
#endif |
| 145 |
#ifdef _VP9_DECODE_SUPPORTED |
| 146 |
using Vp9 = DecodeVp9PipelineAdapterXe3_Lpm_Base; |
| 147 |
#endif |
| 148 |
#ifdef _VP8_DECODE_SUPPORTED |
| 149 |
using Vp8 = DecodeVp8PipelineAdapterXe3_Lpm_Base; |
| 150 |
#endif |
| 151 |
#ifdef _AV1_DECODE_SUPPORTED |
| 152 |
using Av1 = DecodeAv1PipelineAdapterXe3_Lpm_Base; |
| 153 |
#endif |
| 154 |
#ifdef _VVC_DECODE_SUPPORTED |
| 155 |
using Vvc = DecodeVvcPipelineAdapterXe3_Lpm_Base; |
| 156 |
#endif |
| 157 |
|
| 158 |
MEDIA_CLASS_DEFINE_END(CodechalDecodeInterfacesXe3_Lpm) |
| 159 |
}; |
| 160 |
|
| 161 |
class CodechalInterfacesXe3_Lpm : public CodechalDeviceNext |
| 162 |
{ |
| 163 |
public: |
| 164 |
using Decode = CodechalDecodeInterfacesXe3_Lpm; |
| 165 |
using Hw = CodechalHwInterfaceXe3_Lpm_Base; |
| 166 |
|
| 167 |
MOS_STATUS Initialize( |
| 168 |
void * standardInfo, |
| 169 |
void * settings, |
| 170 |
MhwInterfacesNext *mhwInterfaces, |
| 171 |
PMOS_INTERFACE osInterface) override; |
| 172 |
|
| 173 |
MEDIA_CLASS_DEFINE_END(CodechalInterfacesXe3_Lpm) |
| 174 |
}; |
| 175 |
|
| 176 |
class VphalInterfacesXe3_Lpm : public VphalDevice |
| 177 |
{ |
| 178 |
public: |
| 179 |
MOS_STATUS Initialize( |
| 180 |
PMOS_INTERFACE osInterface, |
| 181 |
bool bInitVphalState, |
| 182 |
MOS_STATUS * eStatus, |
| 183 |
bool clearViewMode = false); |
| 184 |
|
| 185 |
MOS_STATUS CreateVpPlatformInterface( |
| 186 |
PMOS_INTERFACE osInterface, |
| 187 |
MOS_STATUS * eStatus); |
| 188 |
|
| 189 |
private: |
| 190 |
void InitPlatformKernelBinary( |
| 191 |
vp::VpPlatformInterface *&vpPlatformInterface); |
| 192 |
|
| 193 |
MEDIA_CLASS_DEFINE_END(VphalInterfacesXe3_Lpm) |
| 194 |
}; |
| 195 |
|
| 196 |
class RenderHalInterfacesXe3_Lpg : public RenderHalDevice |
| 197 |
{ |
| 198 |
protected: |
| 199 |
using XRenderHal = XRenderHal_Interface_Xe2_Hpg_Next; |
| 200 |
MOS_STATUS Initialize(); |
| 201 |
|
| 202 |
MEDIA_CLASS_DEFINE_END(RenderHalInterfacesXe3_Lpg) |
| 203 |
}; |
| 204 |
|
| 205 |
class MediaInterfacesHwInfoDeviceXe3_Lpm : public MediaInterfacesHwInfoDevice |
| 206 |
{ |
| 207 |
public: |
| 208 |
virtual MOS_STATUS Initialize(PLATFORM platform) override; |
| 209 |
|
| 210 |
MEDIA_CLASS_DEFINE_END(MediaInterfacesHwInfoDeviceXe3_Lpm) |
| 211 |
}; |
| 212 |
|
| 213 |
using McpyDeviceXe3_Lpm_Base = McpyDeviceNextImpl<MediaCopyStateXe3_Lpm_Base>; |
| 214 |
|
| 215 |
#endif // __MEDIA_INTERFACES_XE3_LPM_H__ |