| 1 |
/* |
| 2 |
* Copyright (c) 2017, 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 media_interfaces_g9_bxt.h |
| 24 |
//! \brief All interfaces used for BXT that require factory creation |
| 25 |
//! |
| 26 |
|
| 27 |
#ifndef __MEDIA_INTERFACES_G9_BXT_H__ |
| 28 |
#define __MEDIA_INTERFACES_G9_BXT_H__ |
| 29 |
|
| 30 |
#include "media_interfaces_mhw.h" |
| 31 |
#include "media_interfaces_codechal.h" |
| 32 |
#include "media_interfaces_mmd.h" |
| 33 |
#include "media_interfaces_cmhal.h" |
| 34 |
#include "media_interfaces_vphal.h" |
| 35 |
#include "media_interfaces_renderhal.h" |
| 36 |
#include "media_interfaces_nv12top010.h" |
| 37 |
#include "media_interfaces_decode_histogram.h" |
| 38 |
|
| 39 |
#include "mhw_cp_interface.h" |
| 40 |
#include "mhw_mi_g9_X.h" |
| 41 |
#include "mhw_render_g9_X.h" |
| 42 |
#include "mhw_sfc_g9_X.h" |
| 43 |
#include "mhw_state_heap_g9.h" |
| 44 |
#include "mhw_vebox_g9_X.h" |
| 45 |
#include "mhw_vdbox_mfx_g9_bxt.h" |
| 46 |
#include "mhw_vdbox_hcp_g9_bxt.h" |
| 47 |
#include "mhw_vdbox_huc_g9_bxt.h" |
| 48 |
#include "mhw_vdbox_vdenc_g9_bxt.h" |
| 49 |
|
| 50 |
#include "codechal_hw_g9_bxt.h" |
| 51 |
|
| 52 |
#ifdef _AVC_DECODE_SUPPORTED |
| 53 |
#include "codechal_decode_avc.h" |
| 54 |
#endif |
| 55 |
#include "codechal_decode_downsampling_g9.h" |
| 56 |
|
| 57 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 58 |
#include "codechal_decode_hevc.h" |
| 59 |
#endif |
| 60 |
|
| 61 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 62 |
#include "codechal_decode_jpeg.h" |
| 63 |
#endif |
| 64 |
|
| 65 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 66 |
#include "codechal_decode_mpeg2.h" |
| 67 |
#endif |
| 68 |
|
| 69 |
#ifdef _VC1_DECODE_SUPPORTED |
| 70 |
#include "codechal_decode_vc1_g9.h" |
| 71 |
#endif |
| 72 |
|
| 73 |
#ifdef _VP8_DECODE_SUPPORTED |
| 74 |
#include "codechal_decode_vp8.h" |
| 75 |
#endif |
| 76 |
|
| 77 |
#ifdef _VP9_DECODE_SUPPORTED |
| 78 |
#include "codechal_decode_vp9.h" |
| 79 |
#endif |
| 80 |
#include "codechal_decode_nv12top010_g9_bxt.h" |
| 81 |
|
| 82 |
#ifdef _JPEG_ENCODE_SUPPORTED |
| 83 |
#include "codechal_encode_jpeg.h" |
| 84 |
#endif |
| 85 |
|
| 86 |
#ifdef _MPEG2_ENCODE_VME_SUPPORTED |
| 87 |
#include "codechal_encode_mpeg2_g9.h" |
| 88 |
#endif |
| 89 |
|
| 90 |
#ifdef _AVC_ENCODE_VME_SUPPORTED |
| 91 |
#include "codechal_encode_avc_g9_bxt.h" |
| 92 |
#endif |
| 93 |
#ifdef _AVC_ENCODE_VDENC_SUPPORTED |
| 94 |
#include "codechal_vdenc_avc_g9_bxt.h" |
| 95 |
#endif |
| 96 |
#include "codechal_memdecomp_g9.h" |
| 97 |
#include "codechal_encode_csc_ds_g9.h" |
| 98 |
|
| 99 |
#ifdef _HEVC_ENCODE_VME_SUPPORTED |
| 100 |
#include "codechal_encode_hevc_g9_bxt.h" |
| 101 |
#endif |
| 102 |
#ifdef _VP8_ENCODE_SUPPORTED |
| 103 |
#include "codechal_encode_vp8_g9.h" |
| 104 |
#endif |
| 105 |
|
| 106 |
#include "cm_hal_g9.h" |
| 107 |
#include "vphal_g9_bxt.h" |
| 108 |
|
| 109 |
#include "renderhal_g9.h" |
| 110 |
|
| 111 |
#include "codechal_decode_histogram_vebox_g9.h" |
| 112 |
|
| 113 |
class MhwInterfacesG9Bxt : public MhwInterfaces |
| 114 |
{ |
| 115 |
public: |
| 116 |
using Mi = MhwMiInterfaceG9; |
| 117 |
using Cp = MhwCpInterface; |
| 118 |
using Render = MhwRenderInterfaceG9; |
| 119 |
using Sfc = MhwSfcInterfaceG9; |
| 120 |
using StateHeap = MHW_STATE_HEAP_INTERFACE_G9_X; |
| 121 |
using Mfx = MhwVdboxMfxInterfaceG9Bxt; |
| 122 |
using Hcp = MhwVdboxHcpInterfaceG9Bxt; |
| 123 |
using Huc = MhwVdboxHucInterfaceG9Bxt; |
| 124 |
using Vdenc = MhwVdboxVdencInterfaceG9Bxt; |
| 125 |
using Vebox = MhwVeboxInterfaceG9; |
| 126 |
|
| 127 |
MOS_STATUS Initialize( |
| 128 |
CreateParams params, |
| 129 |
PMOS_INTERFACE osInterface); |
| 130 |
}; |
| 131 |
|
| 132 |
class MmdDeviceG9Bxt : public MmdDevice |
| 133 |
{ |
| 134 |
public: |
| 135 |
using Mmd = MediaMemDecompStateG9; |
| 136 |
|
| 137 |
MOS_STATUS Initialize( |
| 138 |
PMOS_INTERFACE osInterface, |
| 139 |
MhwInterfaces *mhwInterfaces); |
| 140 |
}; |
| 141 |
|
| 142 |
class Nv12ToP010DeviceG9Bxt : public Nv12ToP010Device |
| 143 |
{ |
| 144 |
public: |
| 145 |
using Nv12ToP010 = CodechalDecodeNv12ToP010G9Bxt; |
| 146 |
|
| 147 |
MOS_STATUS Initialize( |
| 148 |
PMOS_INTERFACE osInterface); |
| 149 |
}; |
| 150 |
|
| 151 |
class CodechalDecodeInterfacesG9Bxt |
| 152 |
{ |
| 153 |
public: |
| 154 |
#ifdef _AVC_DECODE_SUPPORTED |
| 155 |
using Avc = CodechalDecodeAvc; |
| 156 |
#endif |
| 157 |
#ifdef _HEVC_DECODE_SUPPORTED |
| 158 |
using Hevc = CodechalDecodeHevc; |
| 159 |
#endif |
| 160 |
#ifdef _JPEG_DECODE_SUPPORTED |
| 161 |
using Jpeg = CodechalDecodeJpeg; |
| 162 |
#endif |
| 163 |
#ifdef _MPEG2_DECODE_SUPPORTED |
| 164 |
using Mpeg2 = CodechalDecodeMpeg2; |
| 165 |
#endif |
| 166 |
#ifdef _VC1_DECODE_SUPPORTED |
| 167 |
using Vc1 = CodechalDecodeVc1G9; |
| 168 |
#endif |
| 169 |
#ifdef _VP8_DECODE_SUPPORTED |
| 170 |
using Vp8 = CodechalDecodeVp8; |
| 171 |
#endif |
| 172 |
#ifdef _VP9_DECODE_SUPPORTED |
| 173 |
using Vp9 = CodechalDecodeVp9; |
| 174 |
#endif |
| 175 |
#ifdef _DECODE_PROCESSING_SUPPORTED |
| 176 |
using FieldScaling = FieldScalingInterfaceG9; |
| 177 |
#endif |
| 178 |
}; |
| 179 |
|
| 180 |
class CodechalEncodeInterfacesG9Bxt |
| 181 |
{ |
| 182 |
public: |
| 183 |
using CscDs = CodechalEncodeCscDsG9; |
| 184 |
#ifdef _JPEG_ENCODE_SUPPORTED |
| 185 |
using Jpeg = CodechalEncodeJpegState; |
| 186 |
#endif |
| 187 |
#ifdef _MPEG2_ENCODE_VME_SUPPORTED |
| 188 |
using Mpeg2 = CodechalEncodeMpeg2G9; |
| 189 |
#endif |
| 190 |
#ifdef _HEVC_ENCODE_VME_SUPPORTED |
| 191 |
using HevcEnc = CodechalEncHevcStateG9Bxt; |
| 192 |
#endif |
| 193 |
#ifdef _AVC_ENCODE_VME_SUPPORTED |
| 194 |
using AvcEnc = CodechalEncodeAvcEncG9Bxt; |
| 195 |
#endif |
| 196 |
#ifdef _AVC_ENCODE_VDENC_SUPPORTED |
| 197 |
using AvcVdenc = CodechalVdencAvcStateG9Bxt; |
| 198 |
#endif |
| 199 |
#ifdef _VP8_ENCODE_SUPPORTED |
| 200 |
using Vp8 = CodechalEncodeVp8G9; |
| 201 |
#endif |
| 202 |
}; |
| 203 |
|
| 204 |
class CodechalInterfacesG9Bxt : public CodechalDevice |
| 205 |
{ |
| 206 |
public: |
| 207 |
using Decode = CodechalDecodeInterfacesG9Bxt; |
| 208 |
using Encode = CodechalEncodeInterfacesG9Bxt; |
| 209 |
using Hw = CodechalHwInterfaceG9Bxt; |
| 210 |
|
| 211 |
MOS_STATUS Initialize( |
| 212 |
void *standardInfo, |
| 213 |
void *settings, |
| 214 |
MhwInterfaces *mhwInterfaces, |
| 215 |
PMOS_INTERFACE osInterface) override; |
| 216 |
}; |
| 217 |
|
| 218 |
class CMHalInterfacesG9Bxt : public CMHalDevice |
| 219 |
{ |
| 220 |
protected: |
| 221 |
using CMHal = CM_HAL_G9_X; |
| 222 |
MOS_STATUS Initialize( |
| 223 |
CM_HAL_STATE *pCmState); |
| 224 |
}; |
| 225 |
|
| 226 |
class RenderHalInterfacesG9Bxt : public RenderHalDevice |
| 227 |
{ |
| 228 |
protected: |
| 229 |
using XRenderHal = XRenderHal_Interface_g9; |
| 230 |
MOS_STATUS Initialize(); |
| 231 |
}; |
| 232 |
|
| 233 |
class VphalInterfacesG9Bxt : public VphalDevice |
| 234 |
{ |
| 235 |
public: |
| 236 |
using VphalState = VphalStateG9Bxt; |
| 237 |
|
| 238 |
MOS_STATUS Initialize( |
| 239 |
PMOS_INTERFACE osInterface, |
| 240 |
bool bInitVphalState, |
| 241 |
MOS_STATUS *eStatus, |
| 242 |
bool clearViewMode = false); |
| 243 |
}; |
| 244 |
|
| 245 |
class DecodeHistogramDeviceG9Bxt : public DecodeHistogramDevice |
| 246 |
{ |
| 247 |
public: |
| 248 |
using DecodeHistogramVebox = CodechalDecodeHistogramVeboxG9; |
| 249 |
|
| 250 |
MOS_STATUS Initialize( |
| 251 |
CodechalHwInterface *hwInterface, |
| 252 |
PMOS_INTERFACE osInterface); |
| 253 |
}; |
| 254 |
|
| 255 |
#endif // __MEDIA_INTERFACES_G9_BXT_H__ |