File: 0003-Disable-decoding.patch

package info (click to toggle)
intel-vaapi-driver 2.3.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 23,480 kB
  • sloc: ansic: 181,828; asm: 20,806; cpp: 15,306; pascal: 5,836; makefile: 1,857; python: 153; xml: 146; sh: 51
file content (303 lines) | stat: -rw-r--r-- 9,425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
From: Sebastian Ramacher <sebastian@ramacher.at>
Date: Thu, 30 Aug 2018 20:30:55 +0200
Subject: Disable decoding

---
 src/Makefile.sources   | 13 -------------
 src/gen8_mfc.c         |  8 ++++++++
 src/gen8_vme.c         |  8 ++++++++
 src/gen9_mfc.c         | 14 ++++++++++++--
 src/gen9_vme.c         | 17 +++++++++++++++++
 src/i965_device_info.c | 28 ----------------------------
 6 files changed, 45 insertions(+), 43 deletions(-)

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 99edfba..70505d8 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -9,16 +9,13 @@ source_c = \
 	gen7_mfd.c \
 	gen75_mfd.c \
 	gen75_mfc.c \
-	gen8_encoder_vp8.c \
 	gen8_mfc.c \
 	gen8_mfd.c \
 	gen8_vme.c \
-	gen9_encoder_vp8.c \
 	gen9_vme.c \
 	gen9_mfc.c \
 	gen9_mfc_hevc.c \
 	gen9_mfd.c \
-	gen9_vdenc.c \
 	gen75_picture_process.c \
 	gen75_vme.c \
 	gen75_vpp_gpe.c \
@@ -32,7 +29,6 @@ source_c = \
 	i965_drv_video.c \
 	i965_encoder.c \
 	i965_encoder_utils.c \
-	i965_encoder_vp8.c \
 	i965_media.c \
 	i965_media_h264.c \
 	i965_media_mpeg2.c \
@@ -53,21 +49,12 @@ source_c = \
 	vp8_probs.c \
 	vp9_probs.c \
 	vpx_quant.c \
-	gen9_vp9_encoder.c \
 	intel_common_vpp_internal.c \
 	i965_encoder_const_def.c \
-	i965_avc_const_def.c \
 	i965_avc_encoder_common.c \
-	i965_avc_encoder.c \
-	gen9_hevc_encoder.c \
 	gen9_hevc_enc_utils.c \
-	gen10_encoder_vp8.c \
 	gen10_hcp_common.c \
-	gen10_hevc_enc_common.c \
-	gen10_hevc_encoder.c \
 	gen10_huc_common.c \
-	gen10_vdenc_common.c \
-	gen10_vdenc_vp9.c \
 	$(NULL)
 
 source_h = \
diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c
index 5acdbf0..57bd886 100644
--- a/src/gen8_mfc.c
+++ b/src/gen8_mfc.c
@@ -4711,10 +4711,18 @@ Bool gen8_mfc_context_init(VADriverContextP ctx, struct intel_encoder_context *e
     struct gen6_mfc_context *mfc_context;
 
     if (IS_CHERRYVIEW(i965->intel.device_info) && encoder_context->codec == CODEC_VP8)
+#if 0
         return i965_encoder_vp8_pak_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     if (IS_GEN8(i965->intel.device_info) && (encoder_context->codec == CODEC_H264 ||
                                              encoder_context->codec == CODEC_H264_MVC)) {
+#if 0
         return gen9_avc_pak_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     }
     mfc_context = calloc(1, sizeof(struct gen6_mfc_context));
     assert(mfc_context);
diff --git a/src/gen8_vme.c b/src/gen8_vme.c
index 6fc27e6..194bd43 100644
--- a/src/gen8_vme.c
+++ b/src/gen8_vme.c
@@ -1339,11 +1339,19 @@ Bool gen8_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *e
     int i965_kernel_num;
 
     if (IS_CHERRYVIEW(i965->intel.device_info) && encoder_context->codec == CODEC_VP8) {
+#if 0
         return i965_encoder_vp8_vme_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     } else if (IS_GEN8(i965->intel.device_info) && (
                    encoder_context->codec == CODEC_H264 ||
                    encoder_context->codec == CODEC_H264_MVC)) {
+#if 0
         return gen9_avc_vme_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     }
     switch (encoder_context->codec) {
     case CODEC_H264:
diff --git a/src/gen9_mfc.c b/src/gen9_mfc.c
index 8a5e090..905c8e0 100644
--- a/src/gen9_mfc.c
+++ b/src/gen9_mfc.c
@@ -53,7 +53,11 @@ Bool gen9_mfc_context_init(VADriverContextP ctx, struct intel_encoder_context *e
 
     switch (encoder_context->codec) {
     case CODEC_VP8:
+#if 0
         return i965_encoder_vp8_pak_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
 
     case CODEC_MPEG2:
     case CODEC_JPEG:
@@ -61,23 +65,29 @@ Bool gen9_mfc_context_init(VADriverContextP ctx, struct intel_encoder_context *e
 
     case CODEC_H264:
     case CODEC_H264_MVC:
+#if 0
         if (encoder_context->low_power_mode)
             return gen9_vdenc_context_init(ctx, encoder_context);
         else
             return gen9_avc_pak_context_init(ctx, encoder_context);
-
+#endif
     case CODEC_HEVC:
+#if 0
         if (IS_GEN10(i965->intel.device_info))
             return gen10_hevc_pak_context_init(ctx, encoder_context);
         else
             return gen9_hevc_pak_context_init(ctx, encoder_context);
-
+#endif
     case CODEC_VP9:
+#if 0
         if (encoder_context->low_power_mode) {
             assert(IS_GEN10(i965->intel.device_info));
             return gen10_vdenc_vp9_context_init(ctx, encoder_context);
         } else
             return gen9_vp9_pak_context_init(ctx, encoder_context);
+#else
+            return False;
+#endif
     }
 
     /* Other profile/entrypoint pairs never get here, see gen9_enc_hw_context_init() */
diff --git a/src/gen9_vme.c b/src/gen9_vme.c
index 19a9097..e78113b 100644
--- a/src/gen9_vme.c
+++ b/src/gen9_vme.c
@@ -1992,17 +1992,34 @@ Bool gen9_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *e
     }
 
     if (encoder_context->codec == CODEC_VP9) {
+#if 0
         return gen9_vp9_vme_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     } else if (encoder_context->codec == CODEC_VP8) {
+#if 0
         return i965_encoder_vp8_vme_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     } else if (encoder_context->codec == CODEC_H264 ||
                encoder_context->codec == CODEC_H264_MVC) {
+#if 0
         return gen9_avc_vme_context_init(ctx, encoder_context);
+#else
+        return False;
+#endif
     } else if (encoder_context->codec == CODEC_HEVC) {
+#if 0
         if (IS_GEN10(i965->intel.device_info))
+            // requires gen10_media_hevc_kenerls
             return gen10_hevc_vme_context_init(ctx, encoder_context);
         else
             return gen9_hevc_vme_context_init(ctx, encoder_context);
+#else
+            return False;
+#endif
     }
 
     vme_context = calloc(1, sizeof(struct gen6_vme_context));
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index f4dfd4c..f523c4f 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -264,7 +264,6 @@ static struct hw_codec_info bdw_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_h264_mvc_encoding = 1,
 
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
 
@@ -309,8 +308,6 @@ static struct hw_codec_info chv_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
-    .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
 
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR,
@@ -362,10 +359,7 @@ static struct hw_codec_info skl_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
-    .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
     .has_lp_h264_encoding = 1,
     .has_fei_h264_encoding = 1,
     .has_h264_preenc = 1,
@@ -419,10 +413,7 @@ static struct hw_codec_info bxt_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
-    .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
     .has_lp_h264_encoding = 1,
@@ -479,14 +470,10 @@ static struct hw_codec_info kbl_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
     .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
-    .has_hevc10_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
-    .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
     .lp_h264_brc_mode = VA_RC_CQP,
@@ -545,14 +532,9 @@ static struct hw_codec_info glk_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
-    .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
     .has_hevc10_decoding = 1,
-    .has_hevc10_encoding = 1,
     .has_vp9_decoding = 1,
-    .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
     .lp_h264_brc_mode = VA_RC_CQP,
@@ -610,14 +592,9 @@ static struct hw_codec_info cfl_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
-    .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
-    .has_hevc10_encoding = 1,
     .has_hevc10_decoding = 1,
     .has_vp9_decoding = 1,
-    .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
 
     .lp_h264_brc_mode = VA_RC_CQP,
@@ -672,16 +649,11 @@ static struct hw_codec_info cnl_hw_codec_info = {
     .has_di_motion_adptive = 1,
     .has_di_motion_compensated = 1,
     .has_vp8_decoding = 1,
-    .has_vp8_encoding = 1,
     .has_h264_mvc_encoding = 1,
     .has_hevc_decoding = 1,
-    .has_hevc_encoding = 1,
     .has_hevc10_decoding = 1,
-    .has_hevc10_encoding = 1,
     .has_vp9_decoding = 1,
-    .has_vp9_encoding = 1,
     .has_lp_h264_encoding = 1,
-    .has_lp_vp9_encoding = 1,
 
     .lp_h264_brc_mode = VA_RC_CQP,
     .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB,