Debian Codegraph @

media_driver/media_interface/media_interfaces_m9_kbl/media_interfaces_g9_kbl.h

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