Debian Codegraph @

media_driver/media_interface/media_interfaces_m8_bdw/media_interfaces_g8_bdw.h

raw
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_g8_bdw.h
24 //! \brief All interfaces used for BDW that require factory creation
25 //!
26
27 #ifndef __MEDIA_INTERFACES_G8_BDW_H__
28 #define __MEDIA_INTERFACES_G8_BDW_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
37 #include "mhw_cp_interface.h"
38 #include "mhw_mi_g8_X.h"
39 #include "mhw_render_g8_X.h"
40 #include "mhw_state_heap_g8.h"
41 #include "mhw_vebox_g8_X.h"
42 #include "mhw_vdbox_mfx_g8_bdw.h"
43
44 #include "codechal_hw_g8_bdw.h"
45
46 #ifdef _AVC_DECODE_SUPPORTED
47 #include "codechal_decode_avc.h"
48 #endif
49
50 #ifdef _HEVC_DECODE_SUPPORTED
51 #include "codechal_decode_hevc.h"
52 #endif
53
54 #ifdef _JPEG_DECODE_SUPPORTED
55 #include "codechal_decode_jpeg.h"
56 #endif
57
58 #ifdef _MPEG2_DECODE_SUPPORTED
59 #include "codechal_decode_mpeg2.h"
60 #endif
61
62 #ifdef _VC1_DECODE_SUPPORTED
63 #include "codechal_decode_vc1_g8.h"
64 #endif
65
66 #ifdef _VP8_DECODE_SUPPORTED
67 #include "codechal_decode_vp8.h"
68 #endif
69
70 #ifdef _VP9_DECODE_SUPPORTED
71 #include "codechal_decode_vp9.h"
72 #endif
73
74 #ifdef _JPEG_ENCODE_SUPPORTED
75 #include "codechal_encode_jpeg.h"
76 #endif
77
78 #ifdef _MPEG2_ENCODE_VME_SUPPORTED
79 #include "codechal_encode_mpeg2_g8.h"
80 #endif
81 #include "codechal_encode_csc_ds_g8.h"
82 #ifdef _AVC_ENCODE_VME_SUPPORTED
83 #include "codechal_encode_avc_g8.h"
84 #include "codechal_fei_avc_g8.h"
85 #endif
86 #include "cm_hal_g8.h"
87 #include "vphal_g8.h"
88
89 #include "renderhal_g8_bdw.h"
90
91 class MhwInterfacesG8Bdw : public MhwInterfaces
92 {
93 public:
94 using Mi = MhwMiInterfaceG8;
95 using Cp = MhwCpInterface;
96 using Render = MhwRenderInterfaceG8;
97 using StateHeap = MHW_STATE_HEAP_INTERFACE_G8_X;
98 using Mfx = MhwVdboxMfxInterfaceG8Bdw;
99 using Vebox = MhwVeboxInterfaceG8;
100
101 MOS_STATUS Initialize(
102 CreateParams params,
103 PMOS_INTERFACE osInterface);
104 };
105
106 class CodechalDecodeInterfacesG8Bdw
107 {
108 public:
109 #ifdef _AVC_DECODE_SUPPORTED
110 using Avc = CodechalDecodeAvc;
111 #endif
112 #ifdef _HEVC_DECODE_SUPPORTED
113 using Hevc = CodechalDecodeHevc;
114 #endif
115 #ifdef _JPEG_DECODE_SUPPORTED
116 using Jpeg = CodechalDecodeJpeg;
117 #endif
118 #ifdef _MPEG2_DECODE_SUPPORTED
119 using Mpeg2 = CodechalDecodeMpeg2;
120 #endif
121 #ifdef _VC1_DECODE_SUPPORTED
122 using Vc1 = CodechalDecodeVc1G8;
123 #endif
124 #ifdef _VP8_DECODE_SUPPORTED
125 using Vp8 = CodechalDecodeVp8;
126 #endif
127 #ifdef _VP9_DECODE_SUPPORTED
128 using Vp9 = CodechalDecodeVp9;
129 #endif
130 };
131
132 class CodechalEncodeInterfacesG8Bdw
133 {
134 public:
135 #ifdef _JPEG_ENCODE_SUPPORTED
136 using Jpeg = CodechalEncodeJpegState;
137 #endif
138 #ifdef _MPEG2_ENCODE_VME_SUPPORTED
139 using Mpeg2 = CodechalEncodeMpeg2G8;
140 #endif
141 using CscDs = CodechalEncodeCscDsG8;
142 #ifdef _AVC_ENCODE_VME_SUPPORTED
143 using AvcEnc = CodechalEncodeAvcEncG8;
144 using AvcFei = CodechalEncodeAvcEncFeiG8;
145 #endif
146 };
147
148 class CodechalInterfacesG8Bdw : public CodechalDevice
149 {
150 public:
151 using Decode = CodechalDecodeInterfacesG8Bdw;
152 using Encode = CodechalEncodeInterfacesG8Bdw;
153 using Hw = CodechalHwInterfaceG8Bdw;
154
155 MOS_STATUS Initialize(
156 void *standardInfo,
157 void *settings,
158 MhwInterfaces *mhwInterfaces,
159 PMOS_INTERFACE osInterface) override;
160 };
161
162 class CMHalInterfacesG8Bdw : public CMHalDevice
163 {
164 protected:
165 using CMHal = CM_HAL_G8_X;
166 MOS_STATUS Initialize(
167 CM_HAL_STATE *pCmState);
168 };
169
170 class VphalInterfacesG8Bdw : public VphalDevice
171 {
172 public:
173 using VphalState = VphalStateG8;
174
175 MOS_STATUS Initialize(
176 PMOS_INTERFACE osInterface,
177 bool bInitVphalState,
178 MOS_STATUS *eStatus,
179 bool clearViewMode = false);
180 };
181
182 class RenderHalInterfacesG8Bdw : public RenderHalDevice
183 {
184 protected:
185 using XRenderHal = XRenderHal_Interface_g8_bdw;
186 MOS_STATUS Initialize();
187 };
188
189 #endif // __MEDIA_INTERFACES_G8_BDW_H__