Debian Codegraph @

media_driver/media_interface/media_interfaces_m9_skl/media_interfaces_g9_skl.h

raw
1 /*
2 * Copyright (c) 2013-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_skl.h
24 //! \brief All interfaces used for SKL that require factory creation
25 //!
26
27 #ifndef __MEDIA_INTERFACES_G9_SKL_H__
28 #define __MEDIA_INTERFACES_G9_SKL_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_skl.h"
46 #include "mhw_vdbox_hcp_g9_skl.h"
47 #include "mhw_vdbox_huc_g9_skl.h"
48 #include "mhw_vdbox_vdenc_g9_skl.h"
49
50 #include "codechal_hw_g9_X.h"
51 #ifdef _AVC_DECODE_SUPPORTED
52 #include "codechal_decode_avc.h"
53 #endif
54
55 #include "codechal_decode_downsampling_g9.h"
56 #ifdef _HEVC_DECODE_SUPPORTED
57 #include "codechal_decode_hevc.h"
58 #endif
59
60 #ifdef _JPEG_DECODE_SUPPORTED
61 #include "codechal_decode_jpeg.h"
62 #endif
63
64 #ifdef _MPEG2_DECODE_SUPPORTED
65 #include "codechal_decode_mpeg2.h"
66 #endif
67
68 #ifdef _VC1_DECODE_SUPPORTED
69 #include "codechal_decode_vc1_g9.h"
70 #endif
71
72 #ifdef _VP8_DECODE_SUPPORTED
73 #include "codechal_decode_vp8.h"
74 #endif
75
76 #ifdef _VP9_DECODE_SUPPORTED
77 #include "codechal_decode_vp9.h"
78 #endif
79
80 #include "codechal_decode_nv12top010_g9.h"
81
82 #ifdef _JPEG_ENCODE_SUPPORTED
83 #include "codechal_encode_jpeg.h"
84 #endif
85
86 #ifdef _HEVC_ENCODE_VME_SUPPORTED
87 #include "codechal_encode_hevc_g9_skl.h"
88 #include "codechal_fei_hevc_g9_skl.h"
89 #endif
90
91 #ifdef _MPEG2_ENCODE_VME_SUPPORTED
92 #include "codechal_encode_mpeg2_g9_skl.h"
93 #endif
94
95 #ifdef _AVC_ENCODE_VME_SUPPORTED
96 #include "codechal_encode_avc_g9_skl.h"
97 #include "codechal_fei_avc_g9_skl.h"
98 #include "codechal_fei_avc_g9.h"
99 #endif
100 #ifdef _AVC_ENCODE_VDENC_SUPPORTED
101 #include "codechal_vdenc_avc_g9_skl.h"
102 #endif
103 #ifdef _VP8_ENCODE_SUPPORTED
104 #include "codechal_encode_vp8_g9.h"
105 #endif
106 #include "codechal_encode_csc_ds_g9.h"
107
108 #include "codechal_memdecomp_g9.h"
109
110 #include "cm_hal_g9.h"
111 #include "vphal_g9.h"
112
113 #include "renderhal_g9.h"
114
115 #include "codechal_decode_histogram_vebox_g9.h"
116
117 class MhwInterfacesG9Skl : public MhwInterfaces
118 {
119 public:
120 using Mi = MhwMiInterfaceG9;
121 using Cp = MhwCpInterface;
122 using Render = MhwRenderInterfaceG9;
123 using Sfc = MhwSfcInterfaceG9;
124 using StateHeap = MHW_STATE_HEAP_INTERFACE_G9_X;
125 using Mfx = MhwVdboxMfxInterfaceG9Skl;
126 using Hcp = MhwVdboxHcpInterfaceG9Skl;
127 using Huc = MhwVdboxHucInterfaceG9Skl;
128 using Vdenc = MhwVdboxVdencInterfaceG9Skl;
129 using Vebox = MhwVeboxInterfaceG9;
130
131 MOS_STATUS Initialize(
132 CreateParams params,
133 PMOS_INTERFACE osInterface);
134 };
135
136 class MmdDeviceG9Skl : public MmdDevice
137 {
138 public:
139 using Mmd = MediaMemDecompStateG9;
140
141 MOS_STATUS Initialize(
142 PMOS_INTERFACE osInterface,
143 MhwInterfaces *mhwInterfaces);
144 };
145
146 class Nv12ToP010DeviceG9Skl : public Nv12ToP010Device
147 {
148 public:
149 using Nv12ToP010 = CodechalDecodeNV12ToP010G9;
150
151 MOS_STATUS Initialize(
152 PMOS_INTERFACE osInterface);
153 };
154
155 class CodechalDecodeInterfacesG9Skl
156 {
157 public:
158 #ifdef _AVC_DECODE_SUPPORTED
159 using Avc = CodechalDecodeAvc;
160 #endif
161 #ifdef _HEVC_DECODE_SUPPORTED
162 using Hevc = CodechalDecodeHevc;
163 #endif
164 #ifdef _JPEG_DECODE_SUPPORTED
165 using Jpeg = CodechalDecodeJpeg;
166 #endif
167 #ifdef _MPEG2_DECODE_SUPPORTED
168 using Mpeg2 = CodechalDecodeMpeg2;
169 #endif
170 #ifdef _VC1_DECODE_SUPPORTED
171 using Vc1 = CodechalDecodeVc1G9;
172 #endif
173 #ifdef _VP8_DECODE_SUPPORTED
174 using Vp8 = CodechalDecodeVp8;
175 #endif
176 #ifdef _VP9_DECODE_SUPPORTED
177 using Vp9 = CodechalDecodeVp9;
178 #endif
179 using Nv12ToP010 = CodechalDecodeNV12ToP010;
180 #ifdef _DECODE_PROCESSING_SUPPORTED
181 using FieldScaling = FieldScalingInterfaceG9;
182 #endif
183 };
184
185 class CodechalEncodeInterfacesG9Skl
186 {
187 public:
188 #ifdef _JPEG_ENCODE_SUPPORTED
189 using Jpeg = CodechalEncodeJpegState;
190 #endif
191 #ifdef _MPEG2_ENCODE_VME_SUPPORTED
192 using Mpeg2 = CodechalEncodeMpeg2G9Skl;
193 #endif
194 using CscDs = CodechalEncodeCscDsG9;
195
196 #ifdef _HEVC_ENCODE_VME_SUPPORTED
197 using HevcEnc = CodechalEncHevcStateG9Skl;
198 using HevcFei = CodechalFeiHevcStateG9Skl;
199 #endif
200
201 #ifdef _AVC_ENCODE_VME_SUPPORTED
202 using AvcEnc = CodechalEncodeAvcEncG9Skl;
203 using AvcFei = CodechalEncodeAvcEncFeiG9Skl;
204 #endif
205 #ifdef _AVC_ENCODE_VDENC_SUPPORTED
206 using AvcVdenc = CodechalVdencAvcStateG9Skl;
207 #endif
208 #ifdef _VP8_ENCODE_SUPPORTED
209 using Vp8 = CodechalEncodeVp8G9;
210 #endif
211 };
212
213 class CodechalInterfacesG9Skl : public CodechalDevice
214 {
215 public:
216 using Decode = CodechalDecodeInterfacesG9Skl;
217 using Encode = CodechalEncodeInterfacesG9Skl;
218 using Hw = CodechalHwInterfaceG9;
219
220 MOS_STATUS Initialize(
221 void *standardInfo,
222 void *settings,
223 MhwInterfaces *mhwInterfaces,
224 PMOS_INTERFACE osInterface) override;
225 };
226
227 class CMHalInterfacesG9Skl : public CMHalDevice
228 {
229 protected:
230 using CMHal = CM_HAL_G9_X;
231 MOS_STATUS Initialize(
232 CM_HAL_STATE *pCmState);
233 };
234
235 class VphalInterfacesG9Skl : public VphalDevice
236 {
237 public:
238 using VphalState = VphalStateG9;
239
240 MOS_STATUS Initialize(
241 PMOS_INTERFACE osInterface,
242 bool bInitVphalState,
243 MOS_STATUS *eStatus,
244 bool clearViewMode = false);
245 };
246
247 class RenderHalInterfacesG9Skl : public RenderHalDevice
248 {
249 protected:
250 using XRenderHal = XRenderHal_Interface_g9;
251 MOS_STATUS Initialize();
252 };
253
254 class DecodeHistogramDeviceG9Skl : public DecodeHistogramDevice
255 {
256 public:
257 using DecodeHistogramVebox = CodechalDecodeHistogramVeboxG9;
258
259 MOS_STATUS Initialize(
260 CodechalHwInterface *hwInterface,
261 PMOS_INTERFACE osInterface);
262 };
263
264 #endif // __MEDIA_INTERFACES_G9_SKL_H__