| 1 |
/*===================== begin_copyright_notice ================================== |
| 2 |
|
| 3 |
# Copyright (c) 2021, Intel Corporation |
| 4 |
|
| 5 |
# Permission is hereby granted, free of charge, to any person obtaining a |
| 6 |
# copy of this software and associated documentation files (the "Software"), |
| 7 |
# to deal in the Software without restriction, including without limitation |
| 8 |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 |
# and/or sell copies of the Software, and to permit persons to whom the |
| 10 |
# Software is furnished to do so, subject to the following conditions: |
| 11 |
|
| 12 |
# The above copyright notice and this permission notice shall be included |
| 13 |
# in all copies or substantial portions of the Software. |
| 14 |
|
| 15 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 16 |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 |
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 19 |
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 20 |
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 21 |
# OTHER DEALINGS IN THE SOFTWARE. |
| 22 |
|
| 23 |
======================= end_copyright_notice ==================================*/ |
| 24 |
//! |
| 25 |
//! \file media_interfaces_xehp_sdv.h |
| 26 |
//! \brief All interfaces used for XeHP that require factory creation |
| 27 |
//! |
| 28 |
|
| 29 |
#ifndef __MEDIA_INTERFACES_XE_XPM_H__ |
| 30 |
#define __MEDIA_INTERFACES_XE_XPM_H__ |
| 31 |
|
| 32 |
#include "media_interfaces_mhw.h" |
| 33 |
#include "media_interfaces_codechal.h" |
| 34 |
#include "media_interfaces_mmd.h" |
| 35 |
#include "media_interfaces_mcpy.h" |
| 36 |
#include "media_interfaces_cmhal.h" |
| 37 |
#include "media_interfaces_vphal.h" |
| 38 |
#include "media_interfaces_renderhal.h" |
| 39 |
#include "media_interfaces_nv12top010.h" |
| 40 |
#include "media_interfaces_decode_histogram.h" |
| 41 |
#include "media_interfaces_hwinfo_device.h" |
| 42 |
|
| 43 |
#include "mhw_cp_interface.h" |
| 44 |
#if IGFX_GEN12_SUPPORTED |
| 45 |
#include "mhw_mi_g12_X.h" |
| 46 |
#endif |
| 47 |
#include "mhw_render_xe_hp.h" |
| 48 |
#include "mhw_sfc_xe_xpm.h" |
| 49 |
#include "mhw_state_heap_xe_xpm.h" |
| 50 |
#include "mhw_vebox_xe_xpm.h" |
| 51 |
#include "mhw_vdbox_mfx_xe_xpm.h" |
| 52 |
#include "mhw_vdbox_hcp_xe_xpm.h" |
| 53 |
#include "mhw_vdbox_avp_xe_xpm.h" |
| 54 |
#include "mhw_vdbox_huc_g12_X.h" |
| 55 |
#include "mhw_vdbox_avp_g12_X.h" |
| 56 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 57 |
#include "mhw_vdbox_vdenc_xe_xpm.h" |
| 58 |
#include "mhw_vdbox_vdenc_xe_xpm_ext.h" |
| 59 |
#else |
| 60 |
#include "mhw_vdbox_vdenc_g12_X.h" |
| 61 |
#endif |
| 62 |
#include "vphal_render_vebox_memdecomp_xe_xpm.h" |
| 63 |
#include "media_copy_xe_xpm_base.h" |
| 64 |
#include "mhw_blt_xe_hp_base.h" |
| 65 |
|
| 66 |
#include "codechal_hw_xe_xpm.h" |
| 67 |
|
| 68 |
#ifdef _AVC_DECODE_SUPPORTED |
| 69 |
#include "decode_avc_pipeline_adapter_m12.h" |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 73 |
#include "decode_hevc_pipeline_adapter_m12.h" |
| 74 |
#endif |
| 75 |
|
| 76 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 77 |
#include "decode_jpeg_pipeline_adapter_m12.h" |
| 78 |
#endif |
| 79 |
|
| 80 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 81 |
#include "decode_mpeg2_pipeline_adapter_m12.h" |
| 82 |
#endif |
| 83 |
|
| 84 |
#ifdef _VC1_DECODE_SUPPORTED |
| 85 |
#include "codechal_decode_vc1_xe_xpm.h" |
| 86 |
#endif |
| 87 |
|
| 88 |
#ifdef _VP8_DECODE_SUPPORTED |
| 89 |
#include "codechal_decode_vp8_g12.h" |
| 90 |
#endif |
| 91 |
|
| 92 |
#ifdef _VP9_DECODE_SUPPORTED |
| 93 |
#include "decode_vp9_pipeline_adapter_m12.h" |
| 94 |
#endif |
| 95 |
|
| 96 |
#ifdef _AV1_DECODE_SUPPORTED |
| 97 |
#include "decode_av1_pipeline_adapter_g12.h" |
| 98 |
#endif |
| 99 |
|
| 100 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 101 |
#ifdef _JPEG_ENCODE_SUPPORTED |
| 102 |
#include "codechal_encode_jpeg_g12.h" |
| 103 |
#endif |
| 104 |
|
| 105 |
#include "codechal_encode_csc_ds_mdf_xe_xpm.h" |
| 106 |
|
| 107 |
#ifdef _MPEG2_ENCODE_VME_SUPPORTED |
| 108 |
#include "codechal_encode_mpeg2_g12.h" |
| 109 |
#include "codechal_encode_mpeg2_mdf_xe_xpm.h" |
| 110 |
#endif |
| 111 |
|
| 112 |
#ifdef _HEVC_ENCODE_VME_SUPPORTED |
| 113 |
#include "codechal_encode_hevc_g12.h" |
| 114 |
#include "codechal_encode_hevc_mbenc_xe_xpm.h" |
| 115 |
#include "codechal_encode_csc_ds_mdf_g12.h" |
| 116 |
#endif |
| 117 |
#ifdef _HEVC_ENCODE_VDENC_SUPPORTED |
| 118 |
#include "codechal_vdenc_hevc_xe_xpm.h" |
| 119 |
#ifdef _MEDIA_RESERVED |
| 120 |
#include "decode_hevc_pipeline_adapter_m12.h" |
| 121 |
#endif |
| 122 |
#endif |
| 123 |
|
| 124 |
#ifdef _AVC_ENCODE_VME_SUPPORTED |
| 125 |
#include "codechal_encode_avc_g12.h" |
| 126 |
#include "codechal_encode_avc_mdf_xe_xpm.h" |
| 127 |
#endif |
| 128 |
#ifdef _AVC_ENCODE_VDENC_SUPPORTED |
| 129 |
#include "codechal_vdenc_avc_xe_xpm.h" |
| 130 |
#endif |
| 131 |
|
| 132 |
|
| 133 |
#ifdef _VP9_ENCODE_VDENC_SUPPORTED |
| 134 |
#include "codechal_vdenc_vp9_g12.h" |
| 135 |
#include "codechal_vdenc_vp9_xe_hpm.h" |
| 136 |
#ifdef _MEDIA_RESERVED |
| 137 |
#include "encode_vp9_vdenc_pipeline_adapter_xe_xpm.h" |
| 138 |
#endif |
| 139 |
#endif |
| 140 |
|
| 141 |
|
| 142 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 143 |
#include "cm_hal_xe_xpm.h" |
| 144 |
#endif |
| 145 |
#endif |
| 146 |
#include "vphal_xe_xpm.h" |
| 147 |
#include "renderhal_xe_hp.h" |
| 148 |
|
| 149 |
#include "codechal_decode_histogram.h" |
| 150 |
#include "codechal_decode_histogram_g12.h" |
| 151 |
|
| 152 |
#include "decode_scalability_singlepipe.h" |
| 153 |
#include "decode_scalability_multipipe.h" |
| 154 |
class MhwInterfacesXehp_Sdv : public MhwInterfaces |
| 155 |
{ |
| 156 |
public: |
| 157 |
using Mi = MhwMiInterfaceG12; |
| 158 |
using Cp = MhwCpInterface; |
| 159 |
using Render = MhwRenderInterfaceXe_Hp; |
| 160 |
using Sfc = MhwSfcInterfaceXe_Xpm; |
| 161 |
using StateHeap = MHW_STATE_HEAP_INTERFACE_XE_XPM; |
| 162 |
using Mfx = MhwVdboxMfxInterfaceXe_Xpm; |
| 163 |
using Hcp = MhwVdboxHcpInterfaceXe_Xpm; |
| 164 |
using Avp = MhwVdboxAvpInterfaceXe_Xpm; |
| 165 |
using Huc = MhwVdboxHucInterfaceG12; |
| 166 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 167 |
using Vdenc = MhwVdboxVdencInterfaceG12ExtXehp; |
| 168 |
#else |
| 169 |
using Vdenc = MhwVdboxVdencInterfaceG12X; |
| 170 |
#endif |
| 171 |
using Vebox = MhwVeboxInterfaceXe_Xpm; |
| 172 |
using Blt = MhwBltInterfaceXe_Hp_Base; |
| 173 |
|
| 174 |
virtual MOS_STATUS Initialize( |
| 175 |
CreateParams params, |
| 176 |
PMOS_INTERFACE osInterface); |
| 177 |
|
| 178 |
}; |
| 179 |
|
| 180 |
class MmdDeviceXe_Xpm : public MmdDevice |
| 181 |
{ |
| 182 |
public: |
| 183 |
using Mmd = MediaVeboxDecompStateXe_Xpm; |
| 184 |
|
| 185 |
MOS_STATUS Initialize( |
| 186 |
PMOS_INTERFACE osInterface, |
| 187 |
MhwInterfaces *mhwInterfaces); |
| 188 |
|
| 189 |
MhwInterfaces* CreateMhwInterface( |
| 190 |
PMOS_INTERFACE osInterface); |
| 191 |
}; |
| 192 |
|
| 193 |
class McpyDeviceXe_Xpm : public McpyDevice |
| 194 |
{ |
| 195 |
public: |
| 196 |
using Mcpy = MediaCopyStateXe_Xpm_Base; |
| 197 |
|
| 198 |
MOS_STATUS Initialize( |
| 199 |
PMOS_INTERFACE osInterface); |
| 200 |
protected: |
| 201 |
MhwInterfaces* CreateMhwInterface( |
| 202 |
PMOS_INTERFACE osInterface); |
| 203 |
}; |
| 204 |
|
| 205 |
class Nv12ToP010DeviceXe_Xpm : public Nv12ToP010Device |
| 206 |
{ |
| 207 |
public: |
| 208 |
|
| 209 |
MOS_STATUS Initialize( |
| 210 |
PMOS_INTERFACE osInterface); |
| 211 |
}; |
| 212 |
|
| 213 |
class CodechalDecodeInterfacesXe_Xpm |
| 214 |
{ |
| 215 |
public: |
| 216 |
#ifdef _AVC_DECODE_SUPPORTED |
| 217 |
using Avc = DecodeAvcPipelineAdapterM12; |
| 218 |
#endif |
| 219 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 220 |
using Hevc = DecodeHevcPipelineAdapterM12; |
| 221 |
#endif |
| 222 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 223 |
using Jpeg = DecodeJpegPipelineAdapterM12; |
| 224 |
#endif |
| 225 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 226 |
using Mpeg2 = DecodeMpeg2PipelineAdapterM12; |
| 227 |
#endif |
| 228 |
#ifdef _VC1_DECODE_SUPPORTED |
| 229 |
using Vc1 = CodechalDecodeVc1Xe_Xpm; |
| 230 |
#endif |
| 231 |
#ifdef _VP8_DECODE_SUPPORTED |
| 232 |
using Vp8 = CodechalDecodeVp8G12; |
| 233 |
#endif |
| 234 |
#ifdef _VP9_DECODE_SUPPORTED |
| 235 |
using Vp9 = DecodeVp9PipelineAdapterG12; |
| 236 |
#endif |
| 237 |
#ifdef _AV1_DECODE_SUPPORTED |
| 238 |
using Av1 = DecodeAv1PipelineAdapterG12; |
| 239 |
#endif |
| 240 |
}; |
| 241 |
|
| 242 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 243 |
class CodechalEncodeInterfacesXe_Xpm |
| 244 |
{ |
| 245 |
public: |
| 246 |
using CscDs = CodechalEncodeCscDsMdfXe_Xpm; |
| 247 |
using CscDsMdf = CodechalEncodeCscDsMdfXe_Xpm; |
| 248 |
#ifdef _VP9_ENCODE_VDENC_SUPPORTED |
| 249 |
using Vp9 = CodechalVdencVp9StateXe_Xpm; |
| 250 |
#endif |
| 251 |
#ifdef _JPEG_ENCODE_SUPPORTED |
| 252 |
using Jpeg = CodechalEncodeJpegStateG12; |
| 253 |
#endif |
| 254 |
#ifdef _MPEG2_ENCODE_VME_SUPPORTED |
| 255 |
using Mpeg2 = CodechalEncodeMpeg2EncMdfG12; |
| 256 |
#endif |
| 257 |
#ifdef _HEVC_ENCODE_VME_SUPPORTED |
| 258 |
using HevcEnc = CodechalEncHevcStateG12; |
| 259 |
using HevcMbenc = CodecHalHevcMbencXe_Xpm; |
| 260 |
#endif |
| 261 |
#ifdef _HEVC_ENCODE_VDENC_SUPPORTED |
| 262 |
using HevcVdenc = CodechalVdencHevcStateXe_Xpm; |
| 263 |
#endif |
| 264 |
#ifdef _AVC_ENCODE_VME_SUPPORTED |
| 265 |
using AvcEnc = CodechalEncodeAvcEncMdfG12; |
| 266 |
#endif |
| 267 |
#ifdef _AVC_ENCODE_VDENC_SUPPORTED |
| 268 |
using AvcVdenc = CodechalVdencAvcStateXe_Xpm; |
| 269 |
#endif |
| 270 |
}; |
| 271 |
#endif |
| 272 |
class CodechalInterfacesXe_Xpm : public CodechalDevice |
| 273 |
{ |
| 274 |
public: |
| 275 |
using Decode = CodechalDecodeInterfacesXe_Xpm; |
| 276 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 277 |
using Encode = CodechalEncodeInterfacesXe_Xpm; |
| 278 |
#endif |
| 279 |
using Hw = CodechalHwInterfaceXe_Xpm; |
| 280 |
|
| 281 |
MOS_STATUS Initialize( |
| 282 |
void *standardInfo, |
| 283 |
void *settings, |
| 284 |
MhwInterfaces *mhwInterfaces, |
| 285 |
PMOS_INTERFACE osInterface) override; |
| 286 |
}; |
| 287 |
|
| 288 |
#ifdef IGFX_XEHP_SDV_ENABLE_NON_UPSTREAM |
| 289 |
class CMHalInterfacesXe_Xpm : public CMHalDevice |
| 290 |
{ |
| 291 |
protected: |
| 292 |
using CMHal = CmHalXe_Xpm; |
| 293 |
MOS_STATUS Initialize( |
| 294 |
CM_HAL_STATE *pCmState); |
| 295 |
}; |
| 296 |
#endif |
| 297 |
|
| 298 |
class VphalInterfacesXe_Xpm : public VphalDevice |
| 299 |
{ |
| 300 |
public: |
| 301 |
using VphalState = VphalStateXe_Xpm; |
| 302 |
|
| 303 |
MOS_STATUS Initialize( |
| 304 |
PMOS_INTERFACE osInterface, |
| 305 |
bool bInitVphalState, |
| 306 |
MOS_STATUS *eStatus, |
| 307 |
bool clearViewMode = false); |
| 308 |
|
| 309 |
MOS_STATUS CreateVpPlatformInterface( |
| 310 |
PMOS_INTERFACE osInterface, |
| 311 |
MOS_STATUS * eStatus); |
| 312 |
}; |
| 313 |
|
| 314 |
class RenderHalInterfacesXe_Xpm : public RenderHalDevice |
| 315 |
{ |
| 316 |
protected: |
| 317 |
using XRenderHal = XRenderHal_Interface_Xe_Hp; |
| 318 |
MOS_STATUS Initialize(); |
| 319 |
}; |
| 320 |
|
| 321 |
class DecodeHistogramDeviceXe_Xpm : public DecodeHistogramDevice |
| 322 |
{ |
| 323 |
public: |
| 324 |
using DecodeHistogramG12 = CodechalDecodeHistogramG12; |
| 325 |
|
| 326 |
MOS_STATUS Initialize( |
| 327 |
CodechalHwInterface *hwInterface, |
| 328 |
PMOS_INTERFACE osInterface); |
| 329 |
}; |
| 330 |
|
| 331 |
class MediaInterfacesHwInfoDeviceXe_Xpm : public MediaInterfacesHwInfoDevice |
| 332 |
{ |
| 333 |
public: |
| 334 |
virtual MOS_STATUS Initialize(PLATFORM platform) override; |
| 335 |
}; |
| 336 |
|
| 337 |
|
| 338 |
#endif // __MEDIA_INTERFACES_XE_XPM_H__ |