-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathedge264_unit_tests.c
377 lines (352 loc) · 106 KB
/
edge264_unit_tests.c
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
/**
* This file contains a few independent programs that were used to validate
* decoding routines. Don't expect to compile it directly since the definitions
* may have changed since. However the code may be salvaged and repurposed.
*/
// Remains from precomputed 16-bit unit tests
#define test(str, ...) intra_test(4, 4, 0, 1, str, #str , (uint16_t[]){__VA_ARGS__})
test(VERTICAL_4x4_16_BIT, 16322, 16326, 16330, 16334, 16322, 16326, 16330, 16334, 16322, 16326, 16330, 16334, 16322, 16326, 16330, 16334);
test(HORIZONTAL_4x4_16_BIT, 16314, 16314, 16314, 16314, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302);
test(DC_4x4_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_4x4_A_16_BIT, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328, 16328);
test(DC_4x4_B_16_BIT, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308);
test(DC_4x4_AB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(DIAGONAL_DOWN_LEFT_4x4_16_BIT, 16326, 16330, 16334, 16338, 16330, 16334, 16338, 16342, 16334, 16338, 16342, 16346, 16338, 16342, 16346, 16349);
test(DIAGONAL_DOWN_LEFT_4x4_C_16_BIT, 16326, 16330, 16333, 16334, 16330, 16333, 16334, 16334, 16333, 16334, 16334, 16334, 16334, 16334, 16334, 16334);
test(DIAGONAL_DOWN_RIGHT_4x4_16_BIT, 16318, 16322, 16326, 16330, 16314, 16318, 16322, 16326, 16310, 16314, 16318, 16322, 16306, 16310, 16314, 16318);
test(VERTICAL_RIGHT_4x4_16_BIT, 16320, 16324, 16328, 16332, 16318, 16322, 16326, 16330, 16314, 16320, 16324, 16328, 16310, 16318, 16322, 16326);
test(HORIZONTAL_DOWN_4x4_16_BIT, 16316, 16318, 16322, 16326, 16312, 16314, 16316, 16318, 16308, 16310, 16312, 16314, 16304, 16306, 16308, 16310);
test(VERTICAL_LEFT_4x4_16_BIT, 16324, 16328, 16332, 16336, 16326, 16330, 16334, 16338, 16328, 16332, 16336, 16340, 16330, 16334, 16338, 16342);
test(VERTICAL_LEFT_4x4_C_16_BIT, 16324, 16328, 16332, 16334, 16326, 16330, 16333, 16334, 16328, 16332, 16334, 16334, 16330, 16333, 16334, 16334);
test(HORIZONTAL_UP_4x4_16_BIT, 16312, 16310, 16308, 16306, 16308, 16306, 16304, 16303, 16304, 16303, 16302, 16302, 16302, 16302, 16302, 16302);
putchar('\n');
#undef test
#define test(str, ...) intra_test(8, 8, 0, 1, str, #str , (uint16_t[]){__VA_ARGS__})
test(VERTICAL_8x8_16_BIT, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350);
test(VERTICAL_8x8_C_16_BIT, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16349);
test(VERTICAL_8x8_D_16_BIT, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16350);
test(VERTICAL_8x8_CD_16_BIT, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16323, 16326, 16330, 16334, 16338, 16342, 16346, 16349);
test(HORIZONTAL_8x8_16_BIT, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287);
test(HORIZONTAL_8x8_D_16_BIT, 16313, 16313, 16313, 16313, 16313, 16313, 16313, 16313, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287);
test(DC_8x8_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_8x8_C_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_8x8_D_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_8x8_CD_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_8x8_A_16_BIT, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336);
test(DC_8x8_AC_16_BIT, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336);
test(DC_8x8_AD_16_BIT, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336);
test(DC_8x8_ACD_16_BIT, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336, 16336);
test(DC_8x8_B_16_BIT, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300);
test(DC_8x8_BD_16_BIT, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300, 16300);
test(DC_8x8_AB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(DIAGONAL_DOWN_LEFT_8x8_16_BIT, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16380);
test(DIAGONAL_DOWN_LEFT_8x8_C_16_BIT, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16350, 16342, 16346, 16349, 16350, 16350, 16350, 16350, 16350, 16346, 16349, 16350, 16350, 16350, 16350, 16350, 16350, 16349, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350);
test(DIAGONAL_DOWN_LEFT_8x8_D_16_BIT, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16380);
test(DIAGONAL_DOWN_LEFT_8x8_CD_16_BIT, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16350, 16342, 16346, 16349, 16350, 16350, 16350, 16350, 16350, 16346, 16349, 16350, 16350, 16350, 16350, 16350, 16350, 16349, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350, 16350);
test(DIAGONAL_DOWN_RIGHT_8x8_16_BIT, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318);
test(DIAGONAL_DOWN_RIGHT_8x8_C_16_BIT, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318);
test(VERTICAL_RIGHT_8x8_16_BIT, 16320, 16324, 16328, 16332, 16336, 16340, 16344, 16348, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16320, 16324, 16328, 16332, 16336, 16340, 16344, 16310, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16306, 16314, 16320, 16324, 16328, 16332, 16336, 16340, 16302, 16310, 16318, 16322, 16326, 16330, 16334, 16338, 16298, 16306, 16314, 16320, 16324, 16328, 16332, 16336, 16294, 16302, 16310, 16318, 16322, 16326, 16330, 16334);
test(VERTICAL_RIGHT_8x8_C_16_BIT, 16320, 16324, 16328, 16332, 16336, 16340, 16344, 16348, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16320, 16324, 16328, 16332, 16336, 16340, 16344, 16310, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16306, 16314, 16320, 16324, 16328, 16332, 16336, 16340, 16302, 16310, 16318, 16322, 16326, 16330, 16334, 16338, 16298, 16306, 16314, 16320, 16324, 16328, 16332, 16336, 16294, 16302, 16310, 16318, 16322, 16326, 16330, 16334);
test(HORIZONTAL_DOWN_8x8_16_BIT, 16316, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16312, 16314, 16316, 16318, 16322, 16326, 16330, 16334, 16308, 16310, 16312, 16314, 16316, 16318, 16322, 16326, 16304, 16306, 16308, 16310, 16312, 16314, 16316, 16318, 16300, 16302, 16304, 16306, 16308, 16310, 16312, 16314, 16296, 16298, 16300, 16302, 16304, 16306, 16308, 16310, 16292, 16294, 16296, 16298, 16300, 16302, 16304, 16306, 16289, 16290, 16292, 16294, 16296, 16298, 16300, 16302);
test(VERTICAL_LEFT_8x8_16_BIT, 16324, 16328, 16332, 16336, 16340, 16344, 16348, 16352, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16328, 16332, 16336, 16340, 16344, 16348, 16352, 16356, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16332, 16336, 16340, 16344, 16348, 16352, 16356, 16360, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16336, 16340, 16344, 16348, 16352, 16356, 16360, 16364, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366);
test(VERTICAL_LEFT_8x8_C_16_BIT, 16324, 16328, 16332, 16336, 16340, 16344, 16348, 16350, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16328, 16332, 16336, 16340, 16344, 16348, 16350, 16350, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16332, 16336, 16340, 16344, 16348, 16350, 16350, 16350, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16336, 16340, 16344, 16348, 16350, 16350, 16350, 16350, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16350);
test(VERTICAL_LEFT_8x8_D_16_BIT, 16325, 16328, 16332, 16336, 16340, 16344, 16348, 16352, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16328, 16332, 16336, 16340, 16344, 16348, 16352, 16356, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16332, 16336, 16340, 16344, 16348, 16352, 16356, 16360, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16336, 16340, 16344, 16348, 16352, 16356, 16360, 16364, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366);
test(VERTICAL_LEFT_8x8_CD_16_BIT, 16325, 16328, 16332, 16336, 16340, 16344, 16348, 16350, 16326, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16328, 16332, 16336, 16340, 16344, 16348, 16350, 16350, 16330, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16332, 16336, 16340, 16344, 16348, 16350, 16350, 16350, 16334, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16336, 16340, 16344, 16348, 16350, 16350, 16350, 16350, 16338, 16342, 16346, 16349, 16350, 16350, 16350, 16350);
test(HORIZONTAL_UP_8x8_16_BIT, 16312, 16310, 16308, 16306, 16304, 16302, 16300, 16298, 16308, 16306, 16304, 16302, 16300, 16298, 16296, 16294, 16304, 16302, 16300, 16298, 16296, 16294, 16292, 16290, 16300, 16298, 16296, 16294, 16292, 16290, 16289, 16288, 16296, 16294, 16292, 16290, 16289, 16288, 16287, 16287, 16292, 16290, 16289, 16288, 16287, 16287, 16287, 16287, 16289, 16288, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287, 16287);
putchar('\n');
#undef test
#define test(str, ...) intra_test(16, 16, 1, 1, str, #str , (uint16_t[]){__VA_ARGS__})
test(VERTICAL_16x16_16_BIT, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16382);
test(HORIZONTAL_16x16_16_BIT, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254);
test(DC_16x16_16_BIT, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318, 16318);
test(DC_16x16_A_16_BIT, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352);
test(DC_16x16_B_16_BIT, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284, 16284);
test(DC_16x16_AB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(PLANE_16x16_16_BIT, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16378, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16374, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16370, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16366, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16362, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16358, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16354, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16266, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16262, 16266, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16258, 16262, 16266, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318);
putchar('\n');
#undef test
#define test(str, ...) intra_test(8, 8, 1, 1, str, #str , (uint16_t[]){__VA_ARGS__})
test(DC_CHROMA_8x8_16_BIT, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318);
test(DC_CHROMA_8x8_Ab_16_BIT, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344);
test(DC_CHROMA_8x8_At_16_BIT, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318);
test(DC_CHROMA_8x8_A_16_BIT, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344);
test(DC_CHROMA_8x8_B_16_BIT, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292);
test(DC_CHROMA_8x8_AbB_16_BIT, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(DC_CHROMA_8x8_AtB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292);
test(DC_CHROMA_8x8_AB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(VERTICAL_CHROMA_8x8_16_BIT, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350);
test(HORIZONTAL_CHROMA_8x8_16_BIT, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286);
test(PLANE_CHROMA_8x8_16_BIT, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318);
putchar('\n');
#undef test
#define test(str, ...) intra_test(8, 16, 1, 1, str, #str , (uint16_t[]){__VA_ARGS__})
ctx->plane_offsets_v[1] = ctx->plane_offsets_v[2];
test(DC_CHROMA_8x16_16_BIT, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302);
test(DC_CHROMA_8x16_Ab_16_BIT, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16318, 16318, 16318, 16318, 16344, 16344, 16344, 16344, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16292, 16292, 16292, 16292, 16318, 16318, 16318, 16318, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344);
test(DC_CHROMA_8x16_At_16_BIT, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16276, 16276, 16276, 16276, 16310, 16310, 16310, 16310, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302, 16260, 16260, 16260, 16260, 16302, 16302, 16302, 16302);
test(DC_CHROMA_8x16_A_16_BIT, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344, 16328, 16328, 16328, 16328, 16344, 16344, 16344, 16344);
test(DC_CHROMA_8x16_B_16_BIT, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260);
test(DC_CHROMA_8x16_AbB_16_BIT, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16308, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 16292, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(DC_CHROMA_8x16_AtB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16276, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260, 16260);
test(DC_CHROMA_8x16_AB_16_BIT, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192);
test(VERTICAL_CHROMA_8x16_16_BIT, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16350);
test(HORIZONTAL_CHROMA_8x16_16_BIT, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16314, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16310, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16306, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16302, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16298, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16294, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16290, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16286, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16282, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16278, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16274, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16270, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16266, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16262, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16258, 16254, 16254, 16254, 16254, 16254, 16254, 16254, 16254);
test(PLANE_CHROMA_8x16_16_BIT, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16346, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16342, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16338, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16334, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16330, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16326, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16322, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16318, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16314, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16310, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16306, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16302, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16298, 16266, 16270, 16274, 16278, 16282, 16286, 16290, 16294, 16262, 16266, 16270, 16274, 16278, 16282, 16286, 16290, 16258, 16262, 16266, 16270, 16274, 16278, 16282, 16286);
putchar('\n');
#undef test
// Testing NEON Intra (nov 2024)
static void test_intra4x4_8bit(int mode, const char *name, uint8_t *p, const uint8_t *result) {
test_decode_intra4x4(mode, p, 32, (i16x8){255, 255, 255, 255, 255, 255, 255, 255});
int pass = 1;
for (int y = 0; y < 4; y++) {
for (int x = 0; x < 4; x++)
pass &= result[y * 4 + x] == p[y * 32 + x];
}
printf("%s: %s\n", name, pass ? GREEN "PASS" RESET : RED "FAIL" RESET);
if (!pass) {
for (int y = -1; y < 4; y++) {
for (int x = -1; x < 4; x++)
printf("%3d ", p[y * 32 + x]);
putchar('\n');
}
exit(0);
}
}
static void test_intra8x8_8bit(int mode, const char *name, uint8_t *p, const uint8_t *result) {
test_decode_intra8x8(mode, p, 32, (i16x8){255, 255, 255, 255, 255, 255, 255, 255});
int pass = 1;
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++)
pass &= result[y * 8 + x] == p[y * 32 + x];
}
printf("%s: %s\n", name, pass ? GREEN "PASS" RESET : RED "FAIL" RESET);
if (!pass) {
for (int y = -1; y < 8; y++) {
for (int x = -1; x < 8; x++)
printf("%3d ", p[y * 32 + x]);
putchar('\n');
}
exit(0);
}
}
static void test_intra16x16_8bit(int mode, const char *name, uint8_t *p, const uint8_t *result) {
test_decode_intra16x16(mode, p, 32, (i16x8){255, 255, 255, 255, 255, 255, 255, 255});
int pass = 1;
for (int y = 0; y < 16; y++) {
for (int x = 0; x < 16; x++)
pass &= result[y * 16 + x] == p[y * 32 + x];
}
printf("%s: %s\n", name, pass ? GREEN "PASS" RESET : RED "FAIL" RESET);
if (!pass) {
for (int y = -1; y < 16; y++) {
for (int x = -1; x < 16; x++)
printf("%3d ", p[y * 32 + x]);
putchar('\n');
}
exit(0);
}
}
static void test_intraChroma_8bit(int mode, const char *name, uint8_t *p, const uint8_t *result) {
test_decode_intraChroma(mode, p, 32, (i8x16){255, 255, 255, 255, 255, 255, 255, 255});
int pass = 1;
for (int y = 0; y < 16; y++) {
for (int x = 0; x < 8; x++)
pass &= result[y * 8 + x] == p[y * 32 + x];
}
printf("%s: %s\n", name, pass ? GREEN "PASS" RESET : RED "FAIL" RESET);
if (!pass) {
for (int y = -2; y < 16; y++) {
for (int x = -1; x < 8; x++)
printf("%3d ", p[y * 32 + x]);
putchar('\n');
}
exit(0);
}
}
int main() {
uint8_t *p = malloc(32 * 18) + 80;
for (int x = -1; x < 16; x++) {
p[x - 32] = 194 + x * 4;
p[x - 64] = 198 + x * 4;
}
for (int y = 0; y < 16; y++)
p[y * 32 - 1] = 186 - y * 4;
#define test(str, ...) test_intra4x4_8bit(str, #str , p, (uint8_t[]){__VA_ARGS__})
test(I4x4_V_8, 194, 198, 202, 206, 194, 198, 202, 206, 194, 198, 202, 206, 194, 198, 202, 206);
test(I4x4_H_8, 186, 186, 186, 186, 182, 182, 182, 182, 178, 178, 178, 178, 174, 174, 174, 174);
test(I4x4_DC_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I4x4_DCA_8, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200);
test(I4x4_DCB_8, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180);
test(I4x4_DCAB_8, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128);
test(I4x4_DDL_8, 198, 202, 206, 210, 202, 206, 210, 214, 206, 210, 214, 218, 210, 214, 218, 221);
test(I4x4_DDLC_8, 198, 202, 205, 206, 202, 205, 206, 206, 205, 206, 206, 206, 206, 206, 206, 206);
test(I4x4_DDR_8, 190, 194, 198, 202, 186, 190, 194, 198, 182, 186, 190, 194, 178, 182, 186, 190);
test(I4x4_VR_8, 192, 196, 200, 204, 190, 194, 198, 202, 186, 192, 196, 200, 182, 190, 194, 198);
test(I4x4_HD_8, 188, 190, 194, 198, 184, 186, 188, 190, 180, 182, 184, 186, 176, 178, 180, 182);
test(I4x4_VL_8, 196, 200, 204, 208, 198, 202, 206, 210, 200, 204, 208, 212, 202, 206, 210, 214);
test(I4x4_VLC_8, 196, 200, 204, 206, 198, 202, 205, 206, 200, 204, 206, 206, 202, 205, 206, 206);
test(I4x4_HU_8, 184, 182, 180, 178, 180, 178, 176, 175, 176, 175, 174, 174, 174, 174, 174, 174);
putchar('\n');
#undef test
#define test(str, ...) test_intra8x8_8bit(str, #str , p, (uint8_t[]){__VA_ARGS__})
test(I8x8_V_8, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222, 194, 198, 202, 206, 210, 214, 218, 222);
test(I8x8_V_C_8, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221, 194, 198, 202, 206, 210, 214, 218, 221);
test(I8x8_V_D_8, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222, 195, 198, 202, 206, 210, 214, 218, 222);
test(I8x8_V_CD_8, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221, 195, 198, 202, 206, 210, 214, 218, 221);
test(I8x8_H_8, 186, 186, 186, 186, 186, 186, 186, 186, 182, 182, 182, 182, 182, 182, 182, 182, 178, 178, 178, 178, 178, 178, 178, 178, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 166, 166, 166, 166, 166, 166, 166, 166, 162, 162, 162, 162, 162, 162, 162, 162, 159, 159, 159, 159, 159, 159, 159, 159);
test(I8x8_H_D_8, 185, 185, 185, 185, 185, 185, 185, 185, 182, 182, 182, 182, 182, 182, 182, 182, 178, 178, 178, 178, 178, 178, 178, 178, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 166, 166, 166, 166, 166, 166, 166, 166, 162, 162, 162, 162, 162, 162, 162, 162, 159, 159, 159, 159, 159, 159, 159, 159);
test(I8x8_DC_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I8x8_DC_C_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I8x8_DC_D_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I8x8_DC_CD_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I8x8_DC_A_8, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208);
test(I8x8_DC_AC_8, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208);
test(I8x8_DC_AD_8, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208);
test(I8x8_DC_ACD_8, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208);
test(I8x8_DC_B_8, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172);
test(I8x8_DC_BD_8, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172);
test(I8x8_DC_AB_8, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128);
test(I8x8_DDL_8, 198, 202, 206, 210, 214, 218, 222, 226, 202, 206, 210, 214, 218, 222, 226, 230, 206, 210, 214, 218, 222, 226, 230, 234, 210, 214, 218, 222, 226, 230, 234, 238, 214, 218, 222, 226, 230, 234, 238, 242, 218, 222, 226, 230, 234, 238, 242, 246, 222, 226, 230, 234, 238, 242, 246, 250, 226, 230, 234, 238, 242, 246, 250, 252);
test(I8x8_DDL_C_8, 198, 202, 206, 210, 214, 218, 221, 222, 202, 206, 210, 214, 218, 221, 222, 222, 206, 210, 214, 218, 221, 222, 222, 222, 210, 214, 218, 221, 222, 222, 222, 222, 214, 218, 221, 222, 222, 222, 222, 222, 218, 221, 222, 222, 222, 222, 222, 222, 221, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222);
test(I8x8_DDL_D_8, 198, 202, 206, 210, 214, 218, 222, 226, 202, 206, 210, 214, 218, 222, 226, 230, 206, 210, 214, 218, 222, 226, 230, 234, 210, 214, 218, 222, 226, 230, 234, 238, 214, 218, 222, 226, 230, 234, 238, 242, 218, 222, 226, 230, 234, 238, 242, 246, 222, 226, 230, 234, 238, 242, 246, 250, 226, 230, 234, 238, 242, 246, 250, 252);
test(I8x8_DDL_CD_8, 198, 202, 206, 210, 214, 218, 221, 222, 202, 206, 210, 214, 218, 221, 222, 222, 206, 210, 214, 218, 221, 222, 222, 222, 210, 214, 218, 221, 222, 222, 222, 222, 214, 218, 221, 222, 222, 222, 222, 222, 218, 221, 222, 222, 222, 222, 222, 222, 221, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222);
test(I8x8_DDR_8, 190, 194, 198, 202, 206, 210, 214, 218, 186, 190, 194, 198, 202, 206, 210, 214, 182, 186, 190, 194, 198, 202, 206, 210, 178, 182, 186, 190, 194, 198, 202, 206, 174, 178, 182, 186, 190, 194, 198, 202, 170, 174, 178, 182, 186, 190, 194, 198, 166, 170, 174, 178, 182, 186, 190, 194, 162, 166, 170, 174, 178, 182, 186, 190);
test(I8x8_DDR_C_8, 190, 194, 198, 202, 206, 210, 214, 218, 186, 190, 194, 198, 202, 206, 210, 214, 182, 186, 190, 194, 198, 202, 206, 210, 178, 182, 186, 190, 194, 198, 202, 206, 174, 178, 182, 186, 190, 194, 198, 202, 170, 174, 178, 182, 186, 190, 194, 198, 166, 170, 174, 178, 182, 186, 190, 194, 162, 166, 170, 174, 178, 182, 186, 190);
test(I8x8_VR_8, 192, 196, 200, 204, 208, 212, 216, 220, 190, 194, 198, 202, 206, 210, 214, 218, 186, 192, 196, 200, 204, 208, 212, 216, 182, 190, 194, 198, 202, 206, 210, 214, 178, 186, 192, 196, 200, 204, 208, 212, 174, 182, 190, 194, 198, 202, 206, 210, 170, 178, 186, 192, 196, 200, 204, 208, 166, 174, 182, 190, 194, 198, 202, 206);
test(I8x8_VR_C_8, 192, 196, 200, 204, 208, 212, 216, 220, 190, 194, 198, 202, 206, 210, 214, 218, 186, 192, 196, 200, 204, 208, 212, 216, 182, 190, 194, 198, 202, 206, 210, 214, 178, 186, 192, 196, 200, 204, 208, 212, 174, 182, 190, 194, 198, 202, 206, 210, 170, 178, 186, 192, 196, 200, 204, 208, 166, 174, 182, 190, 194, 198, 202, 206);
test(I8x8_HD_8, 188, 190, 194, 198, 202, 206, 210, 214, 184, 186, 188, 190, 194, 198, 202, 206, 180, 182, 184, 186, 188, 190, 194, 198, 176, 178, 180, 182, 184, 186, 188, 190, 172, 174, 176, 178, 180, 182, 184, 186, 168, 170, 172, 174, 176, 178, 180, 182, 164, 166, 168, 170, 172, 174, 176, 178, 161, 162, 164, 166, 168, 170, 172, 174);
test(I8x8_VL_8, 196, 200, 204, 208, 212, 216, 220, 224, 198, 202, 206, 210, 214, 218, 222, 226, 200, 204, 208, 212, 216, 220, 224, 228, 202, 206, 210, 214, 218, 222, 226, 230, 204, 208, 212, 216, 220, 224, 228, 232, 206, 210, 214, 218, 222, 226, 230, 234, 208, 212, 216, 220, 224, 228, 232, 236, 210, 214, 218, 222, 226, 230, 234, 238);
test(I8x8_VL_C_8, 196, 200, 204, 208, 212, 216, 220, 222, 198, 202, 206, 210, 214, 218, 221, 222, 200, 204, 208, 212, 216, 220, 222, 222, 202, 206, 210, 214, 218, 221, 222, 222, 204, 208, 212, 216, 220, 222, 222, 222, 206, 210, 214, 218, 221, 222, 222, 222, 208, 212, 216, 220, 222, 222, 222, 222, 210, 214, 218, 221, 222, 222, 222, 222);
test(I8x8_VL_D_8, 197, 200, 204, 208, 212, 216, 220, 224, 198, 202, 206, 210, 214, 218, 222, 226, 200, 204, 208, 212, 216, 220, 224, 228, 202, 206, 210, 214, 218, 222, 226, 230, 204, 208, 212, 216, 220, 224, 228, 232, 206, 210, 214, 218, 222, 226, 230, 234, 208, 212, 216, 220, 224, 228, 232, 236, 210, 214, 218, 222, 226, 230, 234, 238);
test(I8x8_VL_CD_8, 197, 200, 204, 208, 212, 216, 220, 222, 198, 202, 206, 210, 214, 218, 221, 222, 200, 204, 208, 212, 216, 220, 222, 222, 202, 206, 210, 214, 218, 221, 222, 222, 204, 208, 212, 216, 220, 222, 222, 222, 206, 210, 214, 218, 221, 222, 222, 222, 208, 212, 216, 220, 222, 222, 222, 222, 210, 214, 218, 221, 222, 222, 222, 222);
test(I8x8_HU_8, 184, 182, 180, 178, 176, 174, 172, 170, 180, 178, 176, 174, 172, 170, 168, 166, 176, 174, 172, 170, 168, 166, 164, 162, 172, 170, 168, 166, 164, 162, 161, 160, 168, 166, 164, 162, 161, 160, 159, 159, 164, 162, 161, 160, 159, 159, 159, 159, 161, 160, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159);
putchar('\n');
#undef test
#define test(str, ...) test_intra16x16_8bit(str, #str , p, (uint8_t[]){__VA_ARGS__})
test(I16x16_V_8, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254);
test(I16x16_H_8, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126);
test(I16x16_DC_8, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
test(I16x16_DCA_8, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224);
test(I16x16_DCB_8, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156);
test(I16x16_DCAB_8, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128);
test(I16x16_P_8, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190);
putchar('\n');
#undef test
#define test(str, ...) test_intraChroma_8bit(str, #str , p, (uint8_t[]){__VA_ARGS__})
test(IC8x8_DC_8, 189, 189, 189, 189, 220, 220, 220, 220, 185, 185, 185, 185, 216, 216, 216, 216, 189, 189, 189, 189, 220, 220, 220, 220, 185, 185, 185, 185, 216, 216, 216, 216, 189, 189, 189, 189, 220, 220, 220, 220, 185, 185, 185, 185, 216, 216, 216, 216, 189, 189, 189, 189, 220, 220, 220, 220, 185, 185, 185, 185, 216, 216, 216, 216, 142, 142, 142, 142, 181, 181, 181, 181, 138, 138, 138, 138, 177, 177, 177, 177, 142, 142, 142, 142, 181, 181, 181, 181, 138, 138, 138, 138, 177, 177, 177, 177, 142, 142, 142, 142, 181, 181, 181, 181, 138, 138, 138, 138, 177, 177, 177, 177, 142, 142, 142, 142, 181, 181, 181, 181, 138, 138, 138, 138, 177, 177, 177, 177);
test(IC8x8_DCA_8, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216, 204, 204, 204, 204, 220, 220, 220, 220, 200, 200, 200, 200, 216, 216, 216, 216);
test(IC8x8_DCB_8, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138);
test(IC8x8_DCAB_8, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128);
test(IC8x8_H_8, 186, 186, 186, 186, 186, 186, 186, 186, 182, 182, 182, 182, 182, 182, 182, 182, 178, 178, 178, 178, 178, 178, 178, 178, 174, 174, 174, 174, 174, 174, 174, 174, 170, 170, 170, 170, 170, 170, 170, 170, 166, 166, 166, 166, 166, 166, 166, 166, 162, 162, 162, 162, 162, 162, 162, 162, 158, 158, 158, 158, 158, 158, 158, 158, 154, 154, 154, 154, 154, 154, 154, 154, 150, 150, 150, 150, 150, 150, 150, 150, 146, 146, 146, 146, 146, 146, 146, 146, 142, 142, 142, 142, 142, 142, 142, 142, 138, 138, 138, 138, 138, 138, 138, 138, 134, 134, 134, 134, 134, 134, 134, 134, 130, 130, 130, 130, 130, 130, 130, 130, 126, 126, 126, 126, 126, 126, 126, 126);
test(IC8x8_V_8, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222, 198, 202, 206, 210, 214, 218, 222, 226, 194, 198, 202, 206, 210, 214, 218, 222);
test(IC8x8_P_8, 190, 194, 198, 202, 206, 210, 214, 218, 186, 190, 194, 198, 202, 206, 210, 214, 182, 186, 190, 194, 198, 202, 206, 210, 178, 182, 186, 190, 194, 198, 202, 206, 174, 178, 182, 186, 190, 194, 198, 202, 170, 174, 178, 182, 186, 190, 194, 198, 166, 170, 174, 178, 182, 186, 190, 194, 162, 166, 170, 174, 178, 182, 186, 190, 158, 162, 166, 170, 174, 178, 182, 186, 154, 158, 162, 166, 170, 174, 178, 182, 150, 154, 158, 162, 166, 170, 174, 178, 146, 150, 154, 158, 162, 166, 170, 174, 142, 146, 150, 154, 158, 162, 166, 170, 138, 142, 146, 150, 154, 158, 162, 166, 134, 138, 142, 146, 150, 154, 158, 162, 130, 134, 138, 142, 146, 150, 154, 158);
putchar('\n');
#undef test
return 0;
}
// Testing NEON Inter (dec 2024)
void test_luma(int mode, const char *name, int w, int h, const uint8_t *expect) {
uint8_t src[441], dst[256] = {};
for (int i = 0; i < 21; i++) {
for (int j = 0; j < 21; j++)
src[i * 21 + j] = (i * 21 + j) * 37;
}
decode_inter_luma(mode, h, 21, src + 44, 16, dst, (i8x16){0, 1});
for (int y = 0; y < h; y++) {
if (memcmp(dst + y * 16, expect + y * w, w)) {
printf("%s: " RED "FAIL" RESET "\n", name);
for (int r = 0; r < h; r++) {
for (int c = 0; c < w; c++)
printf(dst[r*16+c]==expect[r*w+c] ? "%3u " : RED"%3u "RESET, dst[r*16+c]);
putchar('\t');
for (int c = 0; c < w; c++)
printf("%3u ", expect[r*w+c]);
putchar('\n');
}
exit(0);
}
}
printf("%s: " GREEN "PASS" RESET "\n", name);
}
void test_chroma(int w, int h, const uint8_t *expect) {
uint8_t src[441], dst[256] = {};
for (int i = 0; i < 21; i++) {
for (int j = 0; j < 21; j++)
src[i * 21 + j] = (i * 21 + j) * 37;
}
decode_inter_chroma(w, h, 16, dst, 21, src + 44, (i8x16){3, 21, 5, 35}, (i8x16){0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
for (int y = 0; y < h; y++) {
if (memcmp(dst + y * 16, expect + y * w / 2, w / 2)) {
printf("chroma_%dx%d: " RED "FAIL" RESET "\n", w, h);
for (int r = 0; r < h; r++) {
for (int c = 0; c < w / 2; c++)
printf(dst[r*16+c]==expect[r*w/2+c] ? "%3u " : RED"%3u "RESET, dst[r*16+c]);
putchar('\t');
for (int c = 0; c < w/2; c++)
printf("%3u ", expect[r*w/2+c]);
putchar('\n');
}
exit(0);
}
}
printf("chroma_%dx%d: " GREEN "PASS" RESET "\n", w, h);
}
int main() {
#define test(mode, ...) test_luma(mode, #mode, 4, 8, (uint8_t[]){__VA_ARGS__})
test(INTER_4xH_QPEL_00, 92, 129, 166, 203, 101, 138, 175, 212, 110, 147, 184, 221, 119, 156, 193, 230, 128, 165, 202, 239, 137, 174, 211, 248, 146, 183, 220, 1, 155, 192, 229, 10);
test(INTER_4xH_QPEL_20, 111, 148, 177, 254, 120, 157, 186, 255, 129, 158, 235, 112, 138, 167, 244, 121, 147, 176, 253, 130, 156, 185, 255, 139, 157, 234, 111, 0, 166, 243, 120, 0);
test(INTER_4xH_QPEL_10, 102, 139, 172, 229, 111, 148, 181, 234, 120, 153, 210, 167, 129, 162, 219, 176, 138, 171, 228, 185, 147, 180, 233, 194, 152, 209, 166, 1, 161, 218, 175, 5);
test(INTER_4xH_QPEL_30, 120, 157, 190, 247, 129, 166, 199, 252, 138, 171, 228, 57, 147, 180, 237, 66, 156, 189, 246, 75, 165, 198, 252, 84, 170, 227, 56, 19, 179, 236, 65, 24);
test(INTER_4xH_QPEL_02, 97, 134, 171, 208, 106, 143, 180, 217, 115, 152, 189, 226, 124, 161, 198, 227, 133, 170, 207, 255, 142, 179, 216, 125, 151, 188, 225, 0, 160, 197, 226, 23);
test(INTER_4xH_QPEL_01, 95, 132, 169, 206, 104, 141, 178, 215, 113, 150, 187, 224, 122, 159, 196, 229, 131, 168, 205, 247, 140, 177, 214, 187, 149, 186, 223, 1, 158, 195, 228, 17);
test(INTER_4xH_QPEL_03, 99, 136, 173, 210, 108, 145, 182, 219, 117, 154, 191, 228, 126, 163, 200, 233, 135, 172, 209, 252, 144, 181, 218, 63, 153, 190, 227, 5, 162, 199, 232, 21);
test(INTER_4xH_QPEL_11, 104, 141, 174, 231, 113, 150, 183, 236, 122, 155, 212, 169, 131, 164, 221, 174, 140, 173, 230, 193, 149, 182, 236, 132, 154, 211, 168, 0, 163, 220, 173, 12);
test(INTER_4xH_QPEL_31, 123, 160, 193, 255, 132, 169, 202, 191, 141, 174, 231, 56, 150, 183, 236, 73, 159, 192, 254, 78, 168, 201, 190, 87, 173, 230, 56, 22, 182, 235, 72, 26);
test(INTER_4xH_QPEL_13, 109, 146, 179, 232, 118, 151, 208, 165, 127, 160, 217, 174, 136, 169, 226, 179, 145, 178, 231, 197, 150, 207, 164, 63, 159, 216, 173, 0, 168, 225, 178, 15);
test(INTER_4xH_QPEL_33, 127, 164, 197, 255, 136, 169, 226, 119, 145, 178, 235, 61, 154, 187, 240, 77, 163, 196, 255, 82, 168, 225, 118, 17, 177, 234, 60, 22, 186, 239, 76, 29);
test(INTER_4xH_QPEL_12, 106, 144, 174, 232, 115, 150, 195, 202, 124, 157, 217, 161, 133, 167, 220, 176, 143, 173, 231, 205, 149, 194, 201, 94, 156, 216, 160, 0, 166, 219, 175, 15);
test(INTER_4xH_QPEL_32, 125, 162, 192, 255, 134, 169, 214, 157, 143, 175, 235, 48, 152, 186, 235, 75, 161, 191, 255, 90, 168, 213, 156, 49, 174, 234, 48, 22, 185, 234, 74, 30);
test(INTER_4xH_QPEL_22, 115, 153, 176, 255, 124, 157, 210, 187, 133, 161, 244, 96, 142, 173, 242, 125, 152, 175, 255, 154, 156, 209, 186, 63, 160, 243, 95, 0, 172, 241, 124, 7);
test(INTER_4xH_QPEL_21, 113, 151, 177, 255, 122, 157, 198, 221, 131, 160, 240, 104, 140, 170, 243, 123, 150, 176, 254, 142, 156, 197, 221, 101, 159, 239, 103, 0, 169, 242, 122, 4);
test(INTER_4xH_QPEL_23, 118, 155, 181, 255, 127, 158, 223, 150, 136, 164, 244, 109, 145, 175, 248, 128, 154, 180, 255, 147, 157, 222, 149, 32, 163, 243, 108, 0, 174, 247, 127, 7);
#undef test
#define test(mode, ...) test_luma(mode, #mode, 8, 16, (uint8_t[]){__VA_ARGS__})
test(INTER_8xH_QPEL_00, 92, 129, 166, 203, 240, 21, 58, 95, 101, 138, 175, 212, 249, 30, 67, 104, 110, 147, 184, 221, 2, 39, 76, 113, 119, 156, 193, 230, 11, 48, 85, 122, 128, 165, 202, 239, 20, 57, 94, 131, 137, 174, 211, 248, 29, 66, 103, 140, 146, 183, 220, 1, 38, 75, 112, 149, 155, 192, 229, 10, 47, 84, 121, 158, 164, 201, 238, 19, 56, 93, 130, 167, 173, 210, 247, 28, 65, 102, 139, 176, 182, 219, 0, 37, 74, 111, 148, 185, 191, 228, 9, 46, 83, 120, 157, 194, 200, 237, 18, 55, 92, 129, 166, 203, 209, 246, 27, 64, 101, 138, 175, 212, 218, 255, 36, 73, 110, 147, 184, 221, 227, 8, 45, 82, 119, 156, 193, 230);
test(INTER_8xH_QPEL_20, 111, 148, 177, 254, 131, 8, 85, 114, 120, 157, 186, 255, 140, 17, 94, 123, 129, 158, 235, 112, 0, 66, 95, 132, 138, 167, 244, 121, 0, 75, 104, 141, 147, 176, 253, 130, 7, 84, 113, 150, 156, 185, 255, 139, 16, 93, 122, 159, 157, 234, 111, 0, 65, 94, 131, 160, 166, 243, 120, 0, 74, 103, 140, 169, 175, 252, 129, 6, 83, 112, 149, 178, 184, 255, 138, 15, 92, 121, 158, 187, 233, 110, 0, 64, 93, 130, 159, 236, 242, 119, 0, 73, 102, 139, 168, 245, 251, 128, 5, 82, 111, 148, 177, 254, 255, 137, 14, 91, 120, 157, 186, 255, 255, 146, 23, 100, 129, 158, 235, 112, 118, 0, 72, 101, 138, 167, 244, 121);
test(INTER_8xH_QPEL_10, 102, 139, 172, 229, 186, 15, 72, 105, 111, 148, 181, 234, 195, 24, 81, 114, 120, 153, 210, 167, 1, 53, 86, 123, 129, 162, 219, 176, 6, 62, 95, 132, 138, 171, 228, 185, 14, 71, 104, 141, 147, 180, 233, 194, 23, 80, 113, 150, 152, 209, 166, 1, 52, 85, 122, 155, 161, 218, 175, 5, 61, 94, 131, 164, 170, 227, 184, 13, 70, 103, 140, 173, 179, 233, 193, 22, 79, 112, 149, 182, 208, 165, 0, 51, 84, 121, 154, 211, 217, 174, 5, 60, 93, 130, 163, 220, 226, 183, 12, 69, 102, 139, 172, 229, 232, 192, 21, 78, 111, 148, 181, 234, 237, 201, 30, 87, 120, 153, 210, 167, 173, 4, 59, 92, 129, 162, 219, 176);
test(INTER_8xH_QPEL_30, 120, 157, 190, 247, 76, 33, 90, 123, 129, 166, 199, 252, 85, 42, 99, 132, 138, 171, 228, 57, 20, 71, 104, 141, 147, 180, 237, 66, 24, 80, 113, 150, 156, 189, 246, 75, 32, 89, 122, 159, 165, 198, 252, 84, 41, 98, 131, 168, 170, 227, 56, 19, 70, 103, 140, 173, 179, 236, 65, 24, 79, 112, 149, 182, 188, 245, 74, 31, 88, 121, 158, 191, 197, 251, 83, 40, 97, 130, 167, 200, 226, 55, 19, 69, 102, 139, 172, 229, 235, 64, 23, 78, 111, 148, 181, 238, 244, 73, 30, 87, 120, 157, 190, 247, 251, 82, 39, 96, 129, 166, 199, 252, 255, 91, 48, 105, 138, 171, 228, 57, 63, 23, 77, 110, 147, 180, 237, 66);
test(INTER_8xH_QPEL_02, 97, 134, 171, 208, 255, 26, 63, 100, 106, 143, 180, 217, 126, 35, 72, 109, 115, 152, 189, 226, 0, 44, 81, 118, 124, 161, 198, 227, 24, 53, 90, 127, 133, 170, 207, 255, 25, 62, 99, 136, 142, 179, 216, 125, 34, 71, 108, 145, 151, 188, 225, 0, 43, 80, 117, 154, 160, 197, 226, 23, 52, 89, 126, 163, 169, 206, 255, 24, 61, 98, 135, 172, 178, 215, 124, 33, 70, 107, 144, 181, 187, 224, 0, 42, 79, 116, 153, 190, 196, 233, 22, 51, 88, 125, 162, 199, 205, 234, 23, 60, 97, 134, 171, 208, 214, 255, 32, 69, 106, 143, 180, 217, 223, 132, 41, 78, 115, 152, 189, 226, 232, 0, 50, 87, 124, 161, 198, 227);
test(INTER_8xH_QPEL_01, 95, 132, 169, 206, 248, 24, 61, 98, 104, 141, 178, 215, 188, 33, 70, 107, 113, 150, 187, 224, 1, 42, 79, 116, 122, 159, 196, 229, 18, 51, 88, 125, 131, 168, 205, 247, 23, 60, 97, 134, 140, 177, 214, 187, 32, 69, 106, 143, 149, 186, 223, 1, 41, 78, 115, 152, 158, 195, 228, 17, 50, 87, 124, 161, 167, 204, 247, 22, 59, 96, 133, 170, 176, 213, 186, 31, 68, 105, 142, 179, 185, 222, 0, 40, 77, 114, 151, 188, 194, 231, 16, 49, 86, 123, 160, 197, 203, 236, 21, 58, 95, 132, 169, 206, 212, 251, 30, 67, 104, 141, 178, 215, 221, 194, 39, 76, 113, 150, 187, 224, 230, 4, 48, 85, 122, 159, 196, 229);
test(INTER_8xH_QPEL_03, 99, 136, 173, 210, 252, 28, 65, 102, 108, 145, 182, 219, 64, 37, 74, 111, 117, 154, 191, 228, 6, 46, 83, 120, 126, 163, 200, 233, 22, 55, 92, 129, 135, 172, 209, 252, 27, 64, 101, 138, 144, 181, 218, 63, 36, 73, 110, 147, 153, 190, 227, 5, 45, 82, 119, 156, 162, 199, 232, 21, 54, 91, 128, 165, 171, 208, 251, 26, 63, 100, 137, 174, 180, 217, 62, 35, 72, 109, 146, 183, 189, 226, 5, 44, 81, 118, 155, 192, 198, 235, 20, 53, 90, 127, 164, 201, 207, 240, 25, 62, 99, 136, 173, 210, 216, 255, 34, 71, 108, 145, 182, 219, 225, 70, 43, 80, 117, 154, 191, 228, 234, 9, 52, 89, 126, 163, 200, 233);
test(INTER_8xH_QPEL_11, 104, 141, 174, 231, 193, 17, 74, 107, 113, 150, 183, 236, 133, 26, 83, 116, 122, 155, 212, 169, 0, 55, 88, 125, 131, 164, 221, 174, 12, 64, 97, 134, 140, 173, 230, 193, 16, 73, 106, 143, 149, 182, 236, 132, 25, 82, 115, 152, 154, 211, 168, 0, 54, 87, 124, 157, 163, 220, 173, 12, 63, 96, 133, 166, 172, 229, 192, 15, 72, 105, 142, 175, 181, 235, 131, 24, 81, 114, 151, 184, 210, 167, 0, 53, 86, 123, 156, 213, 219, 176, 11, 62, 95, 132, 165, 222, 228, 181, 14, 71, 104, 141, 174, 231, 235, 196, 23, 80, 113, 150, 183, 236, 239, 139, 32, 89, 122, 155, 212, 169, 175, 0, 61, 94, 131, 164, 221, 174);
test(INTER_8xH_QPEL_31, 123, 160, 193, 255, 79, 36, 93, 126, 132, 169, 202, 191, 88, 45, 102, 135, 141, 174, 231, 56, 22, 74, 107, 144, 150, 183, 236, 73, 27, 83, 116, 153, 159, 192, 254, 78, 35, 92, 125, 162, 168, 201, 190, 87, 44, 101, 134, 171, 173, 230, 56, 22, 73, 106, 143, 176, 182, 235, 72, 26, 82, 115, 152, 185, 191, 254, 77, 34, 91, 124, 161, 194, 200, 190, 86, 43, 100, 133, 170, 203, 229, 55, 21, 72, 105, 142, 175, 232, 238, 71, 26, 81, 114, 151, 184, 237, 243, 76, 33, 90, 123, 160, 193, 255, 255, 85, 42, 99, 132, 169, 202, 191, 194, 94, 51, 108, 141, 174, 231, 56, 59, 25, 80, 113, 150, 183, 236, 73);
test(INTER_8xH_QPEL_13, 109, 146, 179, 232, 198, 22, 79, 112, 118, 151, 208, 165, 63, 51, 84, 121, 127, 160, 217, 174, 0, 60, 93, 130, 136, 169, 226, 179, 16, 69, 102, 139, 145, 178, 231, 197, 21, 78, 111, 148, 150, 207, 164, 63, 50, 83, 120, 153, 159, 216, 173, 0, 59, 92, 129, 162, 168, 225, 178, 15, 68, 101, 138, 171, 177, 231, 197, 20, 77, 110, 147, 180, 206, 163, 62, 49, 82, 119, 152, 209, 215, 172, 0, 58, 91, 128, 161, 218, 224, 181, 14, 67, 100, 137, 170, 227, 230, 186, 19, 76, 109, 146, 179, 232, 235, 201, 28, 85, 118, 151, 208, 165, 171, 66, 57, 90, 127, 160, 217, 174, 180, 2, 66, 99, 136, 169, 226, 179);
test(INTER_8xH_QPEL_33, 127, 164, 197, 255, 83, 40, 97, 130, 136, 169, 226, 119, 18, 69, 102, 139, 145, 178, 235, 61, 22, 78, 111, 148, 154, 187, 240, 77, 30, 87, 120, 157, 163, 196, 255, 82, 39, 96, 129, 166, 168, 225, 118, 17, 68, 101, 138, 171, 177, 234, 60, 22, 77, 110, 147, 180, 186, 239, 76, 29, 86, 119, 156, 189, 195, 255, 81, 38, 95, 128, 165, 198, 224, 117, 17, 67, 100, 137, 170, 227, 233, 60, 21, 76, 109, 146, 179, 236, 242, 75, 28, 85, 118, 155, 188, 241, 245, 80, 37, 94, 127, 164, 197, 255, 255, 89, 46, 103, 136, 169, 226, 119, 125, 21, 75, 108, 145, 178, 235, 61, 64, 27, 84, 117, 154, 187, 240, 77);
test(INTER_8xH_QPEL_12, 106, 144, 174, 232, 205, 17, 77, 109, 115, 150, 195, 202, 95, 38, 83, 118, 124, 157, 217, 161, 0, 60, 90, 127, 133, 167, 220, 176, 16, 66, 99, 136, 143, 173, 231, 205, 16, 76, 108, 146, 149, 194, 201, 94, 37, 82, 117, 152, 156, 216, 160, 0, 59, 89, 126, 159, 166, 219, 175, 15, 65, 98, 135, 169, 172, 231, 204, 15, 75, 107, 145, 175, 193, 200, 93, 36, 81, 116, 151, 196, 215, 159, 0, 58, 88, 125, 158, 218, 221, 181, 14, 64, 97, 134, 168, 221, 228, 181, 17, 73, 106, 144, 174, 232, 235, 208, 23, 83, 115, 150, 195, 202, 208, 101, 44, 89, 124, 157, 217, 161, 167, 0, 66, 96, 133, 167, 220, 176);
test(INTER_8xH_QPEL_32, 125, 162, 192, 255, 91, 35, 95, 128, 134, 169, 214, 157, 50, 57, 102, 137, 143, 175, 235, 48, 22, 78, 108, 146, 152, 186, 235, 75, 31, 84, 118, 155, 161, 191, 255, 90, 34, 94, 127, 164, 168, 213, 156, 49, 56, 101, 136, 171, 174, 234, 48, 22, 77, 107, 145, 177, 185, 234, 74, 30, 83, 117, 154, 188, 190, 255, 89, 33, 93, 126, 163, 193, 212, 155, 48, 55, 100, 135, 170, 215, 233, 47, 21, 76, 106, 144, 176, 236, 239, 75, 28, 82, 116, 153, 187, 236, 242, 75, 35, 92, 125, 162, 192, 255, 255, 97, 41, 101, 134, 169, 214, 157, 163, 56, 63, 108, 143, 175, 235, 48, 51, 25, 84, 114, 152, 186, 235, 75);
test(INTER_8xH_QPEL_22, 115, 153, 176, 255, 155, 7, 90, 118, 124, 157, 210, 187, 64, 41, 94, 127, 133, 161, 244, 96, 0, 75, 98, 136, 142, 173, 242, 125, 8, 78, 108, 145, 152, 175, 255, 154, 6, 89, 117, 155, 156, 209, 186, 63, 40, 93, 126, 159, 160, 243, 95, 0, 74, 97, 135, 163, 172, 241, 124, 7, 77, 107, 144, 175, 174, 255, 153, 5, 88, 116, 154, 177, 208, 185, 62, 39, 92, 125, 158, 211, 242, 94, 0, 73, 96, 134, 162, 245, 245, 128, 5, 76, 106, 143, 174, 243, 250, 127, 10, 86, 115, 153, 176, 255, 255, 161, 13, 96, 124, 157, 210, 187, 193, 70, 47, 100, 133, 161, 244, 96, 102, 0, 81, 104, 142, 173, 242, 125);
test(INTER_8xH_QPEL_21, 113, 151, 177, 255, 143, 8, 88, 116, 122, 157, 198, 221, 102, 29, 94, 125, 131, 160, 240, 104, 0, 71, 97, 134, 140, 170, 243, 123, 4, 77, 106, 143, 150, 176, 254, 142, 7, 87, 115, 153, 156, 197, 221, 101, 28, 93, 124, 159, 159, 239, 103, 0, 70, 96, 133, 162, 169, 242, 122, 4, 76, 105, 142, 172, 175, 254, 141, 6, 86, 114, 152, 178, 196, 220, 100, 27, 92, 123, 158, 199, 238, 102, 0, 69, 95, 132, 161, 241, 244, 124, 3, 75, 104, 141, 171, 244, 251, 128, 8, 84, 113, 151, 177, 255, 255, 149, 14, 94, 122, 157, 198, 221, 224, 108, 35, 100, 131, 160, 240, 104, 110, 0, 77, 103, 140, 170, 243, 123);
test(INTER_8xH_QPEL_23, 118, 155, 181, 255, 148, 12, 92, 121, 127, 158, 223, 150, 32, 54, 95, 130, 136, 164, 244, 109, 0, 75, 101, 139, 145, 175, 248, 128, 8, 81, 111, 148, 154, 180, 255, 147, 11, 91, 120, 157, 157, 222, 149, 32, 53, 94, 129, 160, 163, 243, 108, 0, 74, 100, 138, 166, 174, 247, 127, 7, 80, 110, 147, 177, 179, 255, 146, 10, 90, 119, 156, 182, 221, 148, 31, 52, 93, 128, 159, 224, 242, 107, 0, 73, 99, 137, 165, 245, 248, 128, 5, 79, 109, 146, 176, 249, 253, 132, 12, 89, 118, 155, 181, 255, 255, 154, 18, 98, 127, 158, 223, 150, 156, 35, 60, 101, 136, 164, 244, 109, 115, 2, 81, 107, 145, 175, 248, 128);
#undef test
#define test(mode, ...) test_luma(mode, #mode, 16, 16, (uint8_t[]){__VA_ARGS__})
test(INTER_16xH_QPEL_00, 92, 129, 166, 203, 240, 21, 58, 95, 132, 169, 206, 243, 24, 61, 98, 135, 101, 138, 175, 212, 249, 30, 67, 104, 141, 178, 215, 252, 33, 70, 107, 144, 110, 147, 184, 221, 2, 39, 76, 113, 150, 187, 224, 5, 42, 79, 116, 153, 119, 156, 193, 230, 11, 48, 85, 122, 159, 196, 233, 14, 51, 88, 125, 162, 128, 165, 202, 239, 20, 57, 94, 131, 168, 205, 242, 23, 60, 97, 134, 171, 137, 174, 211, 248, 29, 66, 103, 140, 177, 214, 251, 32, 69, 106, 143, 180, 146, 183, 220, 1, 38, 75, 112, 149, 186, 223, 4, 41, 78, 115, 152, 189, 155, 192, 229, 10, 47, 84, 121, 158, 195, 232, 13, 50, 87, 124, 161, 198, 164, 201, 238, 19, 56, 93, 130, 167, 204, 241, 22, 59, 96, 133, 170, 207, 173, 210, 247, 28, 65, 102, 139, 176, 213, 250, 31, 68, 105, 142, 179, 216, 182, 219, 0, 37, 74, 111, 148, 185, 222, 3, 40, 77, 114, 151, 188, 225, 191, 228, 9, 46, 83, 120, 157, 194, 231, 12, 49, 86, 123, 160, 197, 234, 200, 237, 18, 55, 92, 129, 166, 203, 240, 21, 58, 95, 132, 169, 206, 243, 209, 246, 27, 64, 101, 138, 175, 212, 249, 30, 67, 104, 141, 178, 215, 252, 218, 255, 36, 73, 110, 147, 184, 221, 2, 39, 76, 113, 150, 187, 224, 5, 227, 8, 45, 82, 119, 156, 193, 230, 11, 48, 85, 122, 159, 196, 233, 14);
test(INTER_16xH_QPEL_20, 111, 148, 177, 254, 131, 8, 85, 114, 151, 180, 255, 134, 11, 88, 117, 154, 120, 157, 186, 255, 140, 17, 94, 123, 160, 189, 255, 143, 20, 97, 126, 163, 129, 158, 235, 112, 0, 66, 95, 132, 161, 238, 115, 0, 69, 98, 135, 164, 138, 167, 244, 121, 0, 75, 104, 141, 170, 247, 124, 1, 78, 107, 144, 173, 147, 176, 253, 130, 7, 84, 113, 150, 179, 255, 133, 10, 87, 116, 153, 182, 156, 185, 255, 139, 16, 93, 122, 159, 188, 255, 142, 19, 96, 125, 162, 191, 157, 234, 111, 0, 65, 94, 131, 160, 237, 114, 0, 68, 97, 134, 163, 240, 166, 243, 120, 0, 74, 103, 140, 169, 246, 123, 0, 77, 106, 143, 172, 249, 175, 252, 129, 6, 83, 112, 149, 178, 255, 132, 9, 86, 115, 152, 181, 255, 184, 255, 138, 15, 92, 121, 158, 187, 255, 141, 18, 95, 124, 161, 190, 255, 233, 110, 0, 64, 93, 130, 159, 236, 113, 0, 67, 96, 133, 162, 239, 116, 242, 119, 0, 73, 102, 139, 168, 245, 122, 0, 76, 105, 142, 171, 248, 125, 251, 128, 5, 82, 111, 148, 177, 254, 131, 8, 85, 114, 151, 180, 255, 134, 255, 137, 14, 91, 120, 157, 186, 255, 140, 17, 94, 123, 160, 189, 255, 143, 255, 146, 23, 100, 129, 158, 235, 112, 0, 66, 95, 132, 161, 238, 115, 0, 118, 0, 72, 101, 138, 167, 244, 121, 0, 75, 104, 141, 170, 247, 124, 1);
test(INTER_16xH_QPEL_10, 102, 139, 172, 229, 186, 15, 72, 105, 142, 175, 231, 189, 18, 75, 108, 145, 111, 148, 181, 234, 195, 24, 81, 114, 151, 184, 235, 198, 27, 84, 117, 154, 120, 153, 210, 167, 1, 53, 86, 123, 156, 213, 170, 3, 56, 89, 126, 159, 129, 162, 219, 176, 6, 62, 95, 132, 165, 222, 179, 8, 65, 98, 135, 168, 138, 171, 228, 185, 14, 71, 104, 141, 174, 230, 188, 17, 74, 107, 144, 177, 147, 180, 233, 194, 23, 80, 113, 150, 183, 235, 197, 26, 83, 116, 153, 186, 152, 209, 166, 1, 52, 85, 122, 155, 212, 169, 2, 55, 88, 125, 158, 215, 161, 218, 175, 5, 61, 94, 131, 164, 221, 178, 7, 64, 97, 134, 167, 224, 170, 227, 184, 13, 70, 103, 140, 173, 230, 187, 16, 73, 106, 143, 176, 231, 179, 233, 193, 22, 79, 112, 149, 182, 234, 196, 25, 82, 115, 152, 185, 236, 208, 165, 0, 51, 84, 121, 154, 211, 168, 2, 54, 87, 124, 157, 214, 171, 217, 174, 5, 60, 93, 130, 163, 220, 177, 6, 63, 96, 133, 166, 223, 180, 226, 183, 12, 69, 102, 139, 172, 229, 186, 15, 72, 105, 142, 175, 231, 189, 232, 192, 21, 78, 111, 148, 181, 234, 195, 24, 81, 114, 151, 184, 235, 198, 237, 201, 30, 87, 120, 153, 210, 167, 1, 53, 86, 123, 156, 213, 170, 3, 173, 4, 59, 92, 129, 162, 219, 176, 6, 62, 95, 132, 165, 222, 179, 8);
test(INTER_16xH_QPEL_30, 120, 157, 190, 247, 76, 33, 90, 123, 160, 193, 249, 79, 36, 93, 126, 163, 129, 166, 199, 252, 85, 42, 99, 132, 169, 202, 254, 88, 45, 102, 135, 172, 138, 171, 228, 57, 20, 71, 104, 141, 174, 231, 60, 21, 74, 107, 144, 177, 147, 180, 237, 66, 24, 80, 113, 150, 183, 240, 69, 26, 83, 116, 153, 186, 156, 189, 246, 75, 32, 89, 122, 159, 192, 249, 78, 35, 92, 125, 162, 195, 165, 198, 252, 84, 41, 98, 131, 168, 201, 253, 87, 44, 101, 134, 171, 204, 170, 227, 56, 19, 70, 103, 140, 173, 230, 59, 21, 73, 106, 143, 176, 233, 179, 236, 65, 24, 79, 112, 149, 182, 239, 68, 25, 82, 115, 152, 185, 242, 188, 245, 74, 31, 88, 121, 158, 191, 248, 77, 34, 91, 124, 161, 194, 250, 197, 251, 83, 40, 97, 130, 167, 200, 253, 86, 43, 100, 133, 170, 203, 254, 226, 55, 19, 69, 102, 139, 172, 229, 58, 20, 72, 105, 142, 175, 232, 61, 235, 64, 23, 78, 111, 148, 181, 238, 67, 25, 81, 114, 151, 184, 241, 70, 244, 73, 30, 87, 120, 157, 190, 247, 76, 33, 90, 123, 160, 193, 249, 79, 251, 82, 39, 96, 129, 166, 199, 252, 85, 42, 99, 132, 169, 202, 254, 88, 255, 91, 48, 105, 138, 171, 228, 57, 20, 71, 104, 141, 174, 231, 60, 21, 63, 23, 77, 110, 147, 180, 237, 66, 24, 80, 113, 150, 183, 240, 69, 26);
test(INTER_16xH_QPEL_02, 97, 134, 171, 208, 255, 26, 63, 100, 137, 174, 211, 255, 29, 66, 103, 140, 106, 143, 180, 217, 126, 35, 72, 109, 146, 183, 220, 129, 38, 75, 112, 149, 115, 152, 189, 226, 0, 44, 81, 118, 155, 192, 229, 0, 47, 84, 121, 158, 124, 161, 198, 227, 24, 53, 90, 127, 164, 201, 230, 27, 56, 93, 130, 167, 133, 170, 207, 255, 25, 62, 99, 136, 173, 210, 255, 28, 65, 102, 139, 176, 142, 179, 216, 125, 34, 71, 108, 145, 182, 219, 128, 37, 74, 111, 148, 185, 151, 188, 225, 0, 43, 80, 117, 154, 191, 228, 0, 46, 83, 120, 157, 194, 160, 197, 226, 23, 52, 89, 126, 163, 200, 229, 26, 55, 92, 129, 166, 203, 169, 206, 255, 24, 61, 98, 135, 172, 209, 255, 27, 64, 101, 138, 175, 212, 178, 215, 124, 33, 70, 107, 144, 181, 218, 127, 36, 73, 110, 147, 184, 221, 187, 224, 0, 42, 79, 116, 153, 190, 227, 0, 45, 82, 119, 156, 193, 230, 196, 233, 22, 51, 88, 125, 162, 199, 228, 25, 54, 91, 128, 165, 202, 231, 205, 234, 23, 60, 97, 134, 171, 208, 255, 26, 63, 100, 137, 174, 211, 255, 214, 255, 32, 69, 106, 143, 180, 217, 126, 35, 72, 109, 146, 183, 220, 129, 223, 132, 41, 78, 115, 152, 189, 226, 0, 44, 81, 118, 155, 192, 229, 0, 232, 0, 50, 87, 124, 161, 198, 227, 24, 53, 90, 127, 164, 201, 230, 27);
test(INTER_16xH_QPEL_01, 95, 132, 169, 206, 248, 24, 61, 98, 135, 172, 209, 249, 27, 64, 101, 138, 104, 141, 178, 215, 188, 33, 70, 107, 144, 181, 218, 191, 36, 73, 110, 147, 113, 150, 187, 224, 1, 42, 79, 116, 153, 190, 227, 3, 45, 82, 119, 156, 122, 159, 196, 229, 18, 51, 88, 125, 162, 199, 232, 21, 54, 91, 128, 165, 131, 168, 205, 247, 23, 60, 97, 134, 171, 208, 249, 26, 63, 100, 137, 174, 140, 177, 214, 187, 32, 69, 106, 143, 180, 217, 190, 35, 72, 109, 146, 183, 149, 186, 223, 1, 41, 78, 115, 152, 189, 226, 2, 44, 81, 118, 155, 192, 158, 195, 228, 17, 50, 87, 124, 161, 198, 231, 20, 53, 90, 127, 164, 201, 167, 204, 247, 22, 59, 96, 133, 170, 207, 248, 25, 62, 99, 136, 173, 210, 176, 213, 186, 31, 68, 105, 142, 179, 216, 189, 34, 71, 108, 145, 182, 219, 185, 222, 0, 40, 77, 114, 151, 188, 225, 2, 43, 80, 117, 154, 191, 228, 194, 231, 16, 49, 86, 123, 160, 197, 230, 19, 52, 89, 126, 163, 200, 233, 203, 236, 21, 58, 95, 132, 169, 206, 248, 24, 61, 98, 135, 172, 209, 249, 212, 251, 30, 67, 104, 141, 178, 215, 188, 33, 70, 107, 144, 181, 218, 191, 221, 194, 39, 76, 113, 150, 187, 224, 1, 42, 79, 116, 153, 190, 227, 3, 230, 4, 48, 85, 122, 159, 196, 229, 18, 51, 88, 125, 162, 199, 232, 21);
test(INTER_16xH_QPEL_03, 99, 136, 173, 210, 252, 28, 65, 102, 139, 176, 213, 254, 31, 68, 105, 142, 108, 145, 182, 219, 64, 37, 74, 111, 148, 185, 222, 67, 40, 77, 114, 151, 117, 154, 191, 228, 6, 46, 83, 120, 157, 194, 231, 7, 49, 86, 123, 160, 126, 163, 200, 233, 22, 55, 92, 129, 166, 203, 236, 25, 58, 95, 132, 169, 135, 172, 209, 252, 27, 64, 101, 138, 175, 212, 253, 30, 67, 104, 141, 178, 144, 181, 218, 63, 36, 73, 110, 147, 184, 221, 66, 39, 76, 113, 150, 187, 153, 190, 227, 5, 45, 82, 119, 156, 193, 230, 7, 48, 85, 122, 159, 196, 162, 199, 232, 21, 54, 91, 128, 165, 202, 235, 24, 57, 94, 131, 168, 205, 171, 208, 251, 26, 63, 100, 137, 174, 211, 253, 29, 66, 103, 140, 177, 214, 180, 217, 62, 35, 72, 109, 146, 183, 220, 65, 38, 75, 112, 149, 186, 223, 189, 226, 5, 44, 81, 118, 155, 192, 229, 6, 47, 84, 121, 158, 195, 232, 198, 235, 20, 53, 90, 127, 164, 201, 234, 23, 56, 93, 130, 167, 204, 237, 207, 240, 25, 62, 99, 136, 173, 210, 252, 28, 65, 102, 139, 176, 213, 254, 216, 255, 34, 71, 108, 145, 182, 219, 64, 37, 74, 111, 148, 185, 222, 67, 225, 70, 43, 80, 117, 154, 191, 228, 6, 46, 83, 120, 157, 194, 231, 7, 234, 9, 52, 89, 126, 163, 200, 233, 22, 55, 92, 129, 166, 203, 236, 25);
test(INTER_16xH_QPEL_11, 104, 141, 174, 231, 193, 17, 74, 107, 144, 177, 233, 195, 20, 77, 110, 147, 113, 150, 183, 236, 133, 26, 83, 116, 153, 186, 238, 136, 29, 86, 119, 156, 122, 155, 212, 169, 0, 55, 88, 125, 158, 215, 172, 0, 58, 91, 128, 161, 131, 164, 221, 174, 12, 64, 97, 134, 167, 224, 177, 14, 67, 100, 137, 170, 140, 173, 230, 193, 16, 73, 106, 143, 176, 233, 194, 19, 76, 109, 146, 179, 149, 182, 236, 132, 25, 82, 115, 152, 185, 237, 135, 28, 85, 118, 155, 188, 154, 211, 168, 0, 54, 87, 124, 157, 214, 171, 0, 57, 90, 127, 160, 217, 163, 220, 173, 12, 63, 96, 133, 166, 223, 176, 13, 66, 99, 136, 169, 226, 172, 229, 192, 15, 72, 105, 142, 175, 232, 194, 18, 75, 108, 145, 178, 234, 181, 235, 131, 24, 81, 114, 151, 184, 237, 134, 27, 84, 117, 154, 187, 238, 210, 167, 0, 53, 86, 123, 156, 213, 170, 0, 56, 89, 126, 159, 216, 173, 219, 176, 11, 62, 95, 132, 165, 222, 175, 13, 65, 98, 135, 168, 225, 178, 228, 181, 14, 71, 104, 141, 174, 231, 193, 17, 74, 107, 144, 177, 233, 195, 235, 196, 23, 80, 113, 150, 183, 236, 133, 26, 83, 116, 153, 186, 238, 136, 239, 139, 32, 89, 122, 155, 212, 169, 0, 55, 88, 125, 158, 215, 172, 0, 175, 0, 61, 94, 131, 164, 221, 174, 12, 64, 97, 134, 167, 224, 177, 14);
test(INTER_16xH_QPEL_31, 123, 160, 193, 255, 79, 36, 93, 126, 163, 196, 255, 82, 39, 96, 129, 166, 132, 169, 202, 191, 88, 45, 102, 135, 172, 205, 192, 91, 48, 105, 138, 175, 141, 174, 231, 56, 22, 74, 107, 144, 177, 234, 58, 24, 77, 110, 147, 180, 150, 183, 236, 73, 27, 83, 116, 153, 186, 239, 76, 29, 86, 119, 156, 189, 159, 192, 254, 78, 35, 92, 125, 162, 195, 255, 81, 38, 95, 128, 165, 198, 168, 201, 190, 87, 44, 101, 134, 171, 204, 192, 90, 47, 104, 137, 174, 207, 173, 230, 56, 22, 73, 106, 143, 176, 233, 57, 23, 76, 109, 146, 179, 236, 182, 235, 72, 26, 82, 115, 152, 185, 238, 75, 28, 85, 118, 155, 188, 241, 191, 254, 77, 34, 91, 124, 161, 194, 255, 80, 37, 94, 127, 164, 197, 255, 200, 190, 86, 43, 100, 133, 170, 203, 191, 89, 46, 103, 136, 173, 206, 193, 229, 55, 21, 72, 105, 142, 175, 232, 57, 23, 75, 108, 145, 178, 235, 58, 238, 71, 26, 81, 114, 151, 184, 237, 74, 27, 84, 117, 154, 187, 240, 77, 243, 76, 33, 90, 123, 160, 193, 255, 79, 36, 93, 126, 163, 196, 255, 82, 255, 85, 42, 99, 132, 169, 202, 191, 88, 45, 102, 135, 172, 205, 192, 91, 194, 94, 51, 108, 141, 174, 231, 56, 22, 74, 107, 144, 177, 234, 58, 24, 59, 25, 80, 113, 150, 183, 236, 73, 27, 83, 116, 153, 186, 239, 76, 29);
test(INTER_16xH_QPEL_13, 109, 146, 179, 232, 198, 22, 79, 112, 149, 182, 233, 199, 25, 82, 115, 152, 118, 151, 208, 165, 63, 51, 84, 121, 154, 211, 168, 65, 54, 87, 124, 157, 127, 160, 217, 174, 0, 60, 93, 130, 163, 220, 177, 1, 63, 96, 133, 166, 136, 169, 226, 179, 16, 69, 102, 139, 172, 228, 182, 19, 72, 105, 142, 175, 145, 178, 231, 197, 21, 78, 111, 148, 181, 233, 199, 24, 81, 114, 151, 184, 150, 207, 164, 63, 50, 83, 120, 153, 210, 167, 64, 53, 86, 123, 156, 213, 159, 216, 173, 0, 59, 92, 129, 162, 219, 176, 0, 62, 95, 132, 165, 222, 168, 225, 178, 15, 68, 101, 138, 171, 228, 181, 18, 71, 104, 141, 174, 229, 177, 231, 197, 20, 77, 110, 147, 180, 232, 198, 23, 80, 113, 150, 183, 234, 206, 163, 62, 49, 82, 119, 152, 209, 166, 64, 52, 85, 122, 155, 212, 169, 215, 172, 0, 58, 91, 128, 161, 218, 175, 0, 61, 94, 131, 164, 221, 178, 224, 181, 14, 67, 100, 137, 170, 227, 180, 17, 70, 103, 140, 173, 229, 183, 230, 186, 19, 76, 109, 146, 179, 232, 198, 22, 79, 112, 149, 182, 233, 199, 235, 201, 28, 85, 118, 151, 208, 165, 63, 51, 84, 121, 154, 211, 168, 65, 171, 66, 57, 90, 127, 160, 217, 174, 0, 60, 93, 130, 163, 220, 177, 1, 180, 2, 66, 99, 136, 169, 226, 179, 16, 69, 102, 139, 172, 228, 182, 19);
test(INTER_16xH_QPEL_33, 127, 164, 197, 255, 83, 40, 97, 130, 167, 200, 255, 86, 43, 100, 133, 170, 136, 169, 226, 119, 18, 69, 102, 139, 172, 229, 122, 19, 72, 105, 142, 175, 145, 178, 235, 61, 22, 78, 111, 148, 181, 238, 62, 24, 81, 114, 151, 184, 154, 187, 240, 77, 30, 87, 120, 157, 190, 243, 80, 33, 90, 123, 160, 193, 163, 196, 255, 82, 39, 96, 129, 166, 199, 255, 85, 42, 99, 132, 169, 202, 168, 225, 118, 17, 68, 101, 138, 171, 228, 121, 19, 71, 104, 141, 174, 231, 177, 234, 60, 22, 77, 110, 147, 180, 237, 62, 23, 80, 113, 150, 183, 240, 186, 239, 76, 29, 86, 119, 156, 189, 242, 79, 32, 89, 122, 159, 192, 244, 195, 255, 81, 38, 95, 128, 165, 198, 255, 84, 41, 98, 131, 168, 201, 255, 224, 117, 17, 67, 100, 137, 170, 227, 120, 18, 70, 103, 140, 173, 230, 123, 233, 60, 21, 76, 109, 146, 179, 236, 61, 23, 79, 112, 149, 182, 239, 63, 242, 75, 28, 85, 118, 155, 188, 241, 78, 31, 88, 121, 158, 191, 243, 81, 245, 80, 37, 94, 127, 164, 197, 255, 83, 40, 97, 130, 167, 200, 255, 86, 255, 89, 46, 103, 136, 169, 226, 119, 18, 69, 102, 139, 172, 229, 122, 19, 125, 21, 75, 108, 145, 178, 235, 61, 22, 78, 111, 148, 181, 238, 62, 24, 64, 27, 84, 117, 154, 187, 240, 77, 30, 87, 120, 157, 190, 243, 80, 33);
test(INTER_16xH_QPEL_12, 106, 144, 174, 232, 205, 17, 77, 109, 147, 177, 233, 207, 20, 80, 112, 150, 115, 150, 195, 202, 95, 38, 83, 118, 153, 198, 205, 98, 41, 86, 121, 156, 124, 157, 217, 161, 0, 60, 90, 127, 160, 220, 164, 0, 63, 93, 130, 163, 133, 167, 220, 176, 16, 66, 99, 136, 170, 223, 179, 19, 69, 102, 139, 173, 143, 173, 231, 205, 16, 76, 108, 146, 176, 233, 206, 19, 79, 111, 149, 179, 149, 194, 201, 94, 37, 82, 117, 152, 197, 204, 97, 40, 85, 120, 155, 200, 156, 216, 160, 0, 59, 89, 126, 159, 219, 163, 0, 62, 92, 129, 162, 222, 166, 219, 175, 15, 65, 98, 135, 169, 222, 178, 18, 68, 101, 138, 172, 225, 172, 231, 204, 15, 75, 107, 145, 175, 232, 206, 18, 78, 110, 148, 178, 234, 193, 200, 93, 36, 81, 116, 151, 196, 203, 96, 39, 84, 119, 154, 199, 206, 215, 159, 0, 58, 88, 125, 158, 218, 162, 0, 61, 91, 128, 161, 221, 165, 221, 181, 14, 64, 97, 134, 168, 221, 177, 17, 67, 100, 137, 171, 224, 180, 228, 181, 17, 73, 106, 144, 174, 232, 205, 17, 77, 109, 147, 177, 233, 207, 235, 208, 23, 83, 115, 150, 195, 202, 95, 38, 83, 118, 153, 198, 205, 98, 208, 101, 44, 89, 124, 157, 217, 161, 0, 60, 90, 127, 160, 220, 164, 0, 167, 0, 66, 96, 133, 167, 220, 176, 16, 66, 99, 136, 170, 223, 179, 19);
test(INTER_16xH_QPEL_32, 125, 162, 192, 255, 91, 35, 95, 128, 165, 195, 255, 94, 38, 98, 131, 168, 134, 169, 214, 157, 50, 57, 102, 137, 172, 217, 160, 53, 60, 105, 140, 175, 143, 175, 235, 48, 22, 78, 108, 146, 178, 238, 50, 24, 81, 111, 149, 181, 152, 186, 235, 75, 31, 84, 118, 155, 189, 238, 78, 34, 87, 121, 158, 192, 161, 191, 255, 90, 34, 94, 127, 164, 194, 255, 93, 37, 97, 130, 167, 197, 168, 213, 156, 49, 56, 101, 136, 171, 216, 159, 52, 59, 104, 139, 174, 219, 174, 234, 48, 22, 77, 107, 145, 177, 237, 49, 23, 80, 110, 148, 180, 240, 185, 234, 74, 30, 83, 117, 154, 188, 237, 77, 33, 86, 120, 157, 191, 240, 190, 255, 89, 33, 93, 126, 163, 193, 255, 92, 36, 96, 129, 166, 196, 255, 212, 155, 48, 55, 100, 135, 170, 215, 158, 51, 58, 103, 138, 173, 218, 161, 233, 47, 21, 76, 106, 144, 176, 236, 49, 23, 79, 109, 147, 179, 239, 50, 239, 75, 28, 82, 116, 153, 187, 236, 76, 32, 85, 119, 156, 190, 239, 79, 242, 75, 35, 92, 125, 162, 192, 255, 91, 35, 95, 128, 165, 195, 255, 94, 255, 97, 41, 101, 134, 169, 214, 157, 50, 57, 102, 137, 172, 217, 160, 53, 163, 56, 63, 108, 143, 175, 235, 48, 22, 78, 108, 146, 178, 238, 50, 24, 51, 25, 84, 114, 152, 186, 235, 75, 31, 84, 118, 155, 189, 238, 78, 34);
test(INTER_16xH_QPEL_22, 115, 153, 176, 255, 155, 7, 90, 118, 156, 179, 255, 158, 10, 93, 121, 159, 124, 157, 210, 187, 64, 41, 94, 127, 160, 213, 190, 67, 44, 97, 130, 163, 133, 161, 244, 96, 0, 75, 98, 136, 164, 247, 99, 0, 78, 101, 139, 167, 142, 173, 242, 125, 8, 78, 108, 145, 176, 245, 128, 11, 81, 111, 148, 179, 152, 175, 255, 154, 6, 89, 117, 155, 178, 255, 157, 9, 92, 120, 158, 181, 156, 209, 186, 63, 40, 93, 126, 159, 212, 189, 66, 43, 96, 129, 162, 215, 160, 243, 95, 0, 74, 97, 135, 163, 246, 98, 0, 77, 100, 138, 166, 249, 172, 241, 124, 7, 77, 107, 144, 175, 244, 127, 10, 80, 110, 147, 178, 247, 174, 255, 153, 5, 88, 116, 154, 177, 255, 156, 8, 91, 119, 157, 180, 255, 208, 185, 62, 39, 92, 125, 158, 211, 188, 65, 42, 95, 128, 161, 214, 191, 242, 94, 0, 73, 96, 134, 162, 245, 97, 0, 76, 99, 137, 165, 248, 100, 245, 128, 5, 76, 106, 143, 174, 243, 126, 9, 79, 109, 146, 177, 246, 129, 250, 127, 10, 86, 115, 153, 176, 255, 155, 7, 90, 118, 156, 179, 255, 158, 255, 161, 13, 96, 124, 157, 210, 187, 64, 41, 94, 127, 160, 213, 190, 67, 193, 70, 47, 100, 133, 161, 244, 96, 0, 75, 98, 136, 164, 247, 99, 0, 102, 0, 81, 104, 142, 173, 242, 125, 8, 78, 108, 145, 176, 245, 128, 11);
test(INTER_16xH_QPEL_21, 113, 151, 177, 255, 143, 8, 88, 116, 154, 180, 255, 146, 11, 91, 119, 157, 122, 157, 198, 221, 102, 29, 94, 125, 160, 201, 223, 105, 32, 97, 128, 163, 131, 160, 240, 104, 0, 71, 97, 134, 163, 243, 107, 0, 74, 100, 137, 166, 140, 170, 243, 123, 4, 77, 106, 143, 173, 246, 126, 6, 80, 109, 146, 176, 150, 176, 254, 142, 7, 87, 115, 153, 179, 255, 145, 10, 90, 118, 156, 182, 156, 197, 221, 101, 28, 93, 124, 159, 200, 222, 104, 31, 96, 127, 162, 203, 159, 239, 103, 0, 70, 96, 133, 162, 242, 106, 0, 73, 99, 136, 165, 245, 169, 242, 122, 4, 76, 105, 142, 172, 245, 125, 5, 79, 108, 145, 175, 248, 175, 254, 141, 6, 86, 114, 152, 178, 255, 144, 9, 89, 117, 155, 181, 255, 196, 220, 100, 27, 92, 123, 158, 199, 222, 103, 30, 95, 126, 161, 202, 223, 238, 102, 0, 69, 95, 132, 161, 241, 105, 0, 72, 98, 135, 164, 244, 108, 244, 124, 3, 75, 104, 141, 171, 244, 124, 5, 78, 107, 144, 174, 247, 127, 251, 128, 8, 84, 113, 151, 177, 255, 143, 8, 88, 116, 154, 180, 255, 146, 255, 149, 14, 94, 122, 157, 198, 221, 102, 29, 94, 125, 160, 201, 223, 105, 224, 108, 35, 100, 131, 160, 240, 104, 0, 71, 97, 134, 163, 243, 107, 0, 110, 0, 77, 103, 140, 170, 243, 123, 4, 77, 106, 143, 173, 246, 126, 6);
test(INTER_16xH_QPEL_23, 118, 155, 181, 255, 148, 12, 92, 121, 158, 184, 255, 151, 15, 95, 124, 161, 127, 158, 223, 150, 32, 54, 95, 130, 161, 226, 153, 34, 57, 98, 133, 164, 136, 164, 244, 109, 0, 75, 101, 139, 167, 247, 112, 1, 78, 104, 142, 170, 145, 175, 248, 128, 8, 81, 111, 148, 178, 250, 131, 11, 84, 114, 151, 181, 154, 180, 255, 147, 11, 91, 120, 157, 183, 255, 150, 14, 94, 123, 160, 186, 157, 222, 149, 32, 53, 94, 129, 160, 225, 152, 33, 56, 97, 132, 163, 228, 163, 243, 108, 0, 74, 100, 138, 166, 246, 111, 0, 77, 103, 141, 169, 249, 174, 247, 127, 7, 80, 110, 147, 177, 250, 130, 10, 83, 113, 150, 180, 251, 179, 255, 146, 10, 90, 119, 156, 182, 255, 149, 13, 93, 122, 159, 185, 255, 221, 148, 31, 52, 93, 128, 159, 224, 151, 33, 55, 96, 131, 162, 227, 154, 242, 107, 0, 73, 99, 137, 165, 245, 110, 0, 76, 102, 140, 168, 248, 113, 248, 128, 5, 79, 109, 146, 176, 249, 129, 9, 82, 112, 149, 179, 251, 132, 253, 132, 12, 89, 118, 155, 181, 255, 148, 12, 92, 121, 158, 184, 255, 151, 255, 154, 18, 98, 127, 158, 223, 150, 32, 54, 95, 130, 161, 226, 153, 34, 156, 35, 60, 101, 136, 164, 244, 109, 0, 75, 101, 139, 167, 247, 112, 1, 115, 2, 81, 107, 145, 175, 248, 128, 8, 81, 111, 148, 178, 250, 131, 11);
#undef test
test_chroma(16, 16, (uint8_t[]){136, 173, 210, 107, 40, 65, 102, 139, 145, 182, 219, 116, 49, 74, 111, 148, 154, 191, 228, 41, 46, 83, 120, 157, 163, 200, 237, 50, 55, 92, 129, 166, 172, 209, 106, 39, 64, 101, 138, 175, 181, 218, 115, 48, 73, 110, 147, 184, 190, 227, 40, 45, 82, 119, 156, 193, 199, 236, 49, 54, 91, 128, 165, 202, 208, 105, 38, 63, 100, 137, 174, 211, 217, 114, 47, 72, 109, 146, 183, 220, 226, 39, 44, 81, 118, 155, 192, 229, 235, 48, 53, 90, 127, 164, 201, 238, 244, 57, 62, 99, 136, 173, 210, 107, 113, 46, 71, 108, 145, 182, 219, 116, 122, 55, 80, 117, 154, 191, 228, 41, 47, 52, 89, 126, 163, 200, 237, 50});
test_chroma(8, 16, (uint8_t[]){136, 173, 210, 107, 145, 182, 219, 116, 154, 191, 228, 41, 163, 200, 237, 50, 172, 209, 106, 39, 181, 218, 115, 48, 190, 227, 40, 45, 199, 236, 49, 54, 208, 105, 38, 63, 217, 114, 47, 72, 226, 39, 44, 81, 235, 48, 53, 90, 244, 57, 62, 99, 113, 46, 71, 108, 122, 55, 80, 117, 47, 52, 89, 126});
test_chroma(4, 8, (uint8_t[]){136, 173, 145, 182, 154, 191, 163, 200, 172, 209, 181, 218, 190, 227, 199, 236});
}