blob: 2ef115dd16cda8c01acee7ee0ca4e5ca7a2f7755 [file] [log] [blame]
hui su79718462015-07-19 15:02:56 -07001/*
2 * Copyright (c) 2015 The WebM project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "./vpx_config.h"
12#include "./vpx_dsp_rtcd.h"
13
14#include "vpx_dsp/vpx_dsp_common.h"
15#include "vpx_mem/vpx_mem.h"
16
17#define DST(x, y) dst[(x) + (y) * stride]
18#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)
19#define AVG2(a, b) (((a) + (b) + 1) >> 1)
20
21static INLINE void d207_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
22 const uint8_t *above, const uint8_t *left) {
23 int r, c;
24 (void) above;
25 // first column
26 for (r = 0; r < bs - 1; ++r)
27 dst[r * stride] = AVG2(left[r], left[r + 1]);
28 dst[(bs - 1) * stride] = left[bs - 1];
29 dst++;
30
31 // second column
32 for (r = 0; r < bs - 2; ++r)
33 dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]);
34 dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]);
35 dst[(bs - 1) * stride] = left[bs - 1];
36 dst++;
37
38 // rest of last row
39 for (c = 0; c < bs - 2; ++c)
40 dst[(bs - 1) * stride + c] = left[bs - 1];
41
42 for (r = bs - 2; r >= 0; --r)
43 for (c = 0; c < bs - 2; ++c)
44 dst[r * stride + c] = dst[(r + 1) * stride + c - 2];
45}
46
47static INLINE void d63_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
48 const uint8_t *above, const uint8_t *left) {
49 int r, c;
50 int size;
51 (void)left;
52 for (c = 0; c < bs; ++c) {
53 dst[c] = AVG2(above[c], above[c + 1]);
54 dst[stride + c] = AVG3(above[c], above[c + 1], above[c + 2]);
55 }
56 for (r = 2, size = bs - 2; r < bs; r += 2, --size) {
57 memcpy(dst + (r + 0) * stride, dst + (r >> 1), size);
58 memset(dst + (r + 0) * stride + size, above[bs - 1], bs - size);
59 memcpy(dst + (r + 1) * stride, dst + stride + (r >> 1), size);
60 memset(dst + (r + 1) * stride + size, above[bs - 1], bs - size);
61 }
62}
63
64static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
65 const uint8_t *above, const uint8_t *left) {
66 const uint8_t above_right = above[bs - 1];
67 const uint8_t *const dst_row0 = dst;
68 int x, size;
69 (void)left;
70
71 for (x = 0; x < bs - 1; ++x) {
72 dst[x] = AVG3(above[x], above[x + 1], above[x + 2]);
73 }
74 dst[bs - 1] = above_right;
75 dst += stride;
76 for (x = 1, size = bs - 2; x < bs; ++x, --size) {
77 memcpy(dst, dst_row0 + x, size);
78 memset(dst + size, above_right, x + 1);
79 dst += stride;
80 }
81}
82
83static INLINE void d117_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
84 const uint8_t *above, const uint8_t *left) {
85 int r, c;
86
87 // first row
88 for (c = 0; c < bs; c++)
89 dst[c] = AVG2(above[c - 1], above[c]);
90 dst += stride;
91
92 // second row
93 dst[0] = AVG3(left[0], above[-1], above[0]);
94 for (c = 1; c < bs; c++)
95 dst[c] = AVG3(above[c - 2], above[c - 1], above[c]);
96 dst += stride;
97
98 // the rest of first col
99 dst[0] = AVG3(above[-1], left[0], left[1]);
100 for (r = 3; r < bs; ++r)
101 dst[(r - 2) * stride] = AVG3(left[r - 3], left[r - 2], left[r - 1]);
102
103 // the rest of the block
104 for (r = 2; r < bs; ++r) {
105 for (c = 1; c < bs; c++)
106 dst[c] = dst[-2 * stride + c - 1];
107 dst += stride;
108 }
109}
110
111static INLINE void d135_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
112 const uint8_t *above, const uint8_t *left) {
113 int r, c;
114 dst[0] = AVG3(left[0], above[-1], above[0]);
115 for (c = 1; c < bs; c++)
116 dst[c] = AVG3(above[c - 2], above[c - 1], above[c]);
117
118 dst[stride] = AVG3(above[-1], left[0], left[1]);
119 for (r = 2; r < bs; ++r)
120 dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]);
121
122 dst += stride;
123 for (r = 1; r < bs; ++r) {
124 for (c = 1; c < bs; c++)
125 dst[c] = dst[-stride + c - 1];
126 dst += stride;
127 }
128}
129
130static INLINE void d153_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
131 const uint8_t *above, const uint8_t *left) {
132 int r, c;
133 dst[0] = AVG2(above[-1], left[0]);
134 for (r = 1; r < bs; r++)
135 dst[r * stride] = AVG2(left[r - 1], left[r]);
136 dst++;
137
138 dst[0] = AVG3(left[0], above[-1], above[0]);
139 dst[stride] = AVG3(above[-1], left[0], left[1]);
140 for (r = 2; r < bs; r++)
141 dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]);
142 dst++;
143
144 for (c = 0; c < bs - 2; c++)
145 dst[c] = AVG3(above[c - 1], above[c], above[c + 1]);
146 dst += stride;
147
148 for (r = 1; r < bs; ++r) {
149 for (c = 0; c < bs - 2; c++)
150 dst[c] = dst[-stride + c - 2];
151 dst += stride;
152 }
153}
154
155static INLINE void v_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
156 const uint8_t *above, const uint8_t *left) {
157 int r;
158 (void) left;
159
160 for (r = 0; r < bs; r++) {
161 memcpy(dst, above, bs);
162 dst += stride;
163 }
164}
165
166static INLINE void h_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
167 const uint8_t *above, const uint8_t *left) {
168 int r;
169 (void) above;
170
171 for (r = 0; r < bs; r++) {
172 memset(dst, left[r], bs);
173 dst += stride;
174 }
175}
176
177static INLINE void tm_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
178 const uint8_t *above, const uint8_t *left) {
179 int r, c;
180 int ytop_left = above[-1];
181
182 for (r = 0; r < bs; r++) {
183 for (c = 0; c < bs; c++)
184 dst[c] = clip_pixel(left[r] + above[c] - ytop_left);
185 dst += stride;
186 }
187}
188
189static INLINE void dc_128_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
190 const uint8_t *above, const uint8_t *left) {
191 int r;
192 (void) above;
193 (void) left;
194
195 for (r = 0; r < bs; r++) {
196 memset(dst, 128, bs);
197 dst += stride;
198 }
199}
200
201static INLINE void dc_left_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
202 const uint8_t *above,
203 const uint8_t *left) {
204 int i, r, expected_dc, sum = 0;
205 (void) above;
206
207 for (i = 0; i < bs; i++)
208 sum += left[i];
209 expected_dc = (sum + (bs >> 1)) / bs;
210
211 for (r = 0; r < bs; r++) {
212 memset(dst, expected_dc, bs);
213 dst += stride;
214 }
215}
216
217static INLINE void dc_top_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
218 const uint8_t *above, const uint8_t *left) {
219 int i, r, expected_dc, sum = 0;
220 (void) left;
221
222 for (i = 0; i < bs; i++)
223 sum += above[i];
224 expected_dc = (sum + (bs >> 1)) / bs;
225
226 for (r = 0; r < bs; r++) {
227 memset(dst, expected_dc, bs);
228 dst += stride;
229 }
230}
231
232static INLINE void dc_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
233 const uint8_t *above, const uint8_t *left) {
234 int i, r, expected_dc, sum = 0;
235 const int count = 2 * bs;
236
237 for (i = 0; i < bs; i++) {
238 sum += above[i];
239 sum += left[i];
240 }
241
242 expected_dc = (sum + (count >> 1)) / count;
243
244 for (r = 0; r < bs; r++) {
245 memset(dst, expected_dc, bs);
246 dst += stride;
247 }
248}
249
250void vp9_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
251 const uint8_t *above, const uint8_t *left) {
252 const int I = left[0];
253 const int J = left[1];
254 const int K = left[2];
255 const int L = left[3];
256 (void)above;
257 DST(0, 0) = AVG2(I, J);
258 DST(2, 0) = DST(0, 1) = AVG2(J, K);
259 DST(2, 1) = DST(0, 2) = AVG2(K, L);
260 DST(1, 0) = AVG3(I, J, K);
261 DST(3, 0) = DST(1, 1) = AVG3(J, K, L);
262 DST(3, 1) = DST(1, 2) = AVG3(K, L, L);
263 DST(3, 2) = DST(2, 2) =
264 DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L;
265}
266
267void vp9_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
268 const uint8_t *above, const uint8_t *left) {
269 const int A = above[0];
270 const int B = above[1];
271 const int C = above[2];
272 const int D = above[3];
273 const int E = above[4];
274 const int F = above[5];
275 const int G = above[6];
276 (void)left;
277 DST(0, 0) = AVG2(A, B);
278 DST(1, 0) = DST(0, 2) = AVG2(B, C);
279 DST(2, 0) = DST(1, 2) = AVG2(C, D);
280 DST(3, 0) = DST(2, 2) = AVG2(D, E);
281 DST(3, 2) = AVG2(E, F); // differs from vp8
282
283 DST(0, 1) = AVG3(A, B, C);
284 DST(1, 1) = DST(0, 3) = AVG3(B, C, D);
285 DST(2, 1) = DST(1, 3) = AVG3(C, D, E);
286 DST(3, 1) = DST(2, 3) = AVG3(D, E, F);
287 DST(3, 3) = AVG3(E, F, G); // differs from vp8
288}
289
290void vp9_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
291 const uint8_t *above, const uint8_t *left) {
292 const int A = above[0];
293 const int B = above[1];
294 const int C = above[2];
295 const int D = above[3];
296 const int E = above[4];
297 const int F = above[5];
298 const int G = above[6];
299 const int H = above[7];
300 (void)stride;
301 (void)left;
302 DST(0, 0) = AVG3(A, B, C);
303 DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
304 DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E);
305 DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F);
306 DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G);
307 DST(3, 2) = DST(2, 3) = AVG3(F, G, H);
308 DST(3, 3) = H; // differs from vp8
309}
310
311void vp9_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
312 const uint8_t *above, const uint8_t *left) {
313 const int I = left[0];
314 const int J = left[1];
315 const int K = left[2];
316 const int X = above[-1];
317 const int A = above[0];
318 const int B = above[1];
319 const int C = above[2];
320 const int D = above[3];
321 DST(0, 0) = DST(1, 2) = AVG2(X, A);
322 DST(1, 0) = DST(2, 2) = AVG2(A, B);
323 DST(2, 0) = DST(3, 2) = AVG2(B, C);
324 DST(3, 0) = AVG2(C, D);
325
326 DST(0, 3) = AVG3(K, J, I);
327 DST(0, 2) = AVG3(J, I, X);
328 DST(0, 1) = DST(1, 3) = AVG3(I, X, A);
329 DST(1, 1) = DST(2, 3) = AVG3(X, A, B);
330 DST(2, 1) = DST(3, 3) = AVG3(A, B, C);
331 DST(3, 1) = AVG3(B, C, D);
332}
333
334void vp9_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
335 const uint8_t *above, const uint8_t *left) {
336 const int I = left[0];
337 const int J = left[1];
338 const int K = left[2];
339 const int L = left[3];
340 const int X = above[-1];
341 const int A = above[0];
342 const int B = above[1];
343 const int C = above[2];
344 const int D = above[3];
345 (void)stride;
346 DST(0, 3) = AVG3(J, K, L);
347 DST(1, 3) = DST(0, 2) = AVG3(I, J, K);
348 DST(2, 3) = DST(1, 2) = DST(0, 1) = AVG3(X, I, J);
349 DST(3, 3) = DST(2, 2) = DST(1, 1) = DST(0, 0) = AVG3(A, X, I);
350 DST(3, 2) = DST(2, 1) = DST(1, 0) = AVG3(B, A, X);
351 DST(3, 1) = DST(2, 0) = AVG3(C, B, A);
352 DST(3, 0) = AVG3(D, C, B);
353}
354
355void vp9_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
356 const uint8_t *above, const uint8_t *left) {
357 const int I = left[0];
358 const int J = left[1];
359 const int K = left[2];
360 const int L = left[3];
361 const int X = above[-1];
362 const int A = above[0];
363 const int B = above[1];
364 const int C = above[2];
365
366 DST(0, 0) = DST(2, 1) = AVG2(I, X);
367 DST(0, 1) = DST(2, 2) = AVG2(J, I);
368 DST(0, 2) = DST(2, 3) = AVG2(K, J);
369 DST(0, 3) = AVG2(L, K);
370
371 DST(3, 0) = AVG3(A, B, C);
372 DST(2, 0) = AVG3(X, A, B);
373 DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
374 DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
375 DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
376 DST(1, 3) = AVG3(L, K, J);
377}
378
379#if CONFIG_VP9_HIGHBITDEPTH
380static INLINE void highbd_d207_predictor(uint16_t *dst, ptrdiff_t stride,
381 int bs, const uint16_t *above,
382 const uint16_t *left, int bd) {
383 int r, c;
384 (void) above;
385 (void) bd;
386
387 // First column.
388 for (r = 0; r < bs - 1; ++r) {
389 dst[r * stride] = AVG2(left[r], left[r + 1]);
390 }
391 dst[(bs - 1) * stride] = left[bs - 1];
392 dst++;
393
394 // Second column.
395 for (r = 0; r < bs - 2; ++r) {
396 dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]);
397 }
398 dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]);
399 dst[(bs - 1) * stride] = left[bs - 1];
400 dst++;
401
402 // Rest of last row.
403 for (c = 0; c < bs - 2; ++c)
404 dst[(bs - 1) * stride + c] = left[bs - 1];
405
406 for (r = bs - 2; r >= 0; --r) {
407 for (c = 0; c < bs - 2; ++c)
408 dst[r * stride + c] = dst[(r + 1) * stride + c - 2];
409 }
410}
411
412static INLINE void highbd_d63_predictor(uint16_t *dst, ptrdiff_t stride,
413 int bs, const uint16_t *above,
414 const uint16_t *left, int bd) {
415 int r, c;
416 (void) left;
417 (void) bd;
418 for (r = 0; r < bs; ++r) {
419 for (c = 0; c < bs; ++c) {
420 dst[c] = r & 1 ? AVG3(above[(r >> 1) + c], above[(r >> 1) + c + 1],
421 above[(r >> 1) + c + 2])
422 : AVG2(above[(r >> 1) + c], above[(r >> 1) + c + 1]);
423 }
424 dst += stride;
425 }
426}
427
428static INLINE void highbd_d45_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
429 const uint16_t *above,
430 const uint16_t *left, int bd) {
431 int r, c;
432 (void) left;
433 (void) bd;
434 for (r = 0; r < bs; ++r) {
435 for (c = 0; c < bs; ++c) {
436 dst[c] = r + c + 2 < bs * 2 ? AVG3(above[r + c], above[r + c + 1],
437 above[r + c + 2])
438 : above[bs * 2 - 1];
439 }
440 dst += stride;
441 }
442}
443
444static INLINE void highbd_d117_predictor(uint16_t *dst, ptrdiff_t stride,
445 int bs, const uint16_t *above,
446 const uint16_t *left, int bd) {
447 int r, c;
448 (void) bd;
449
450 // first row
451 for (c = 0; c < bs; c++)
452 dst[c] = AVG2(above[c - 1], above[c]);
453 dst += stride;
454
455 // second row
456 dst[0] = AVG3(left[0], above[-1], above[0]);
457 for (c = 1; c < bs; c++)
458 dst[c] = AVG3(above[c - 2], above[c - 1], above[c]);
459 dst += stride;
460
461 // the rest of first col
462 dst[0] = AVG3(above[-1], left[0], left[1]);
463 for (r = 3; r < bs; ++r)
464 dst[(r - 2) * stride] = AVG3(left[r - 3], left[r - 2], left[r - 1]);
465
466 // the rest of the block
467 for (r = 2; r < bs; ++r) {
468 for (c = 1; c < bs; c++)
469 dst[c] = dst[-2 * stride + c - 1];
470 dst += stride;
471 }
472}
473
474static INLINE void highbd_d135_predictor(uint16_t *dst, ptrdiff_t stride,
475 int bs, const uint16_t *above,
476 const uint16_t *left, int bd) {
477 int r, c;
478 (void) bd;
479 dst[0] = AVG3(left[0], above[-1], above[0]);
480 for (c = 1; c < bs; c++)
481 dst[c] = AVG3(above[c - 2], above[c - 1], above[c]);
482
483 dst[stride] = AVG3(above[-1], left[0], left[1]);
484 for (r = 2; r < bs; ++r)
485 dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]);
486
487 dst += stride;
488 for (r = 1; r < bs; ++r) {
489 for (c = 1; c < bs; c++)
490 dst[c] = dst[-stride + c - 1];
491 dst += stride;
492 }
493}
494
495static INLINE void highbd_d153_predictor(uint16_t *dst, ptrdiff_t stride,
496 int bs, const uint16_t *above,
497 const uint16_t *left, int bd) {
498 int r, c;
499 (void) bd;
500 dst[0] = AVG2(above[-1], left[0]);
501 for (r = 1; r < bs; r++)
502 dst[r * stride] = AVG2(left[r - 1], left[r]);
503 dst++;
504
505 dst[0] = AVG3(left[0], above[-1], above[0]);
506 dst[stride] = AVG3(above[-1], left[0], left[1]);
507 for (r = 2; r < bs; r++)
508 dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]);
509 dst++;
510
511 for (c = 0; c < bs - 2; c++)
512 dst[c] = AVG3(above[c - 1], above[c], above[c + 1]);
513 dst += stride;
514
515 for (r = 1; r < bs; ++r) {
516 for (c = 0; c < bs - 2; c++)
517 dst[c] = dst[-stride + c - 2];
518 dst += stride;
519 }
520}
521
522static INLINE void highbd_v_predictor(uint16_t *dst, ptrdiff_t stride,
523 int bs, const uint16_t *above,
524 const uint16_t *left, int bd) {
525 int r;
526 (void) left;
527 (void) bd;
528 for (r = 0; r < bs; r++) {
529 memcpy(dst, above, bs * sizeof(uint16_t));
530 dst += stride;
531 }
532}
533
534static INLINE void highbd_h_predictor(uint16_t *dst, ptrdiff_t stride,
535 int bs, const uint16_t *above,
536 const uint16_t *left, int bd) {
537 int r;
538 (void) above;
539 (void) bd;
540 for (r = 0; r < bs; r++) {
541 vpx_memset16(dst, left[r], bs);
542 dst += stride;
543 }
544}
545
546static INLINE void highbd_tm_predictor(uint16_t *dst, ptrdiff_t stride,
547 int bs, const uint16_t *above,
548 const uint16_t *left, int bd) {
549 int r, c;
550 int ytop_left = above[-1];
551 (void) bd;
552
553 for (r = 0; r < bs; r++) {
554 for (c = 0; c < bs; c++)
555 dst[c] = clip_pixel_highbd(left[r] + above[c] - ytop_left, bd);
556 dst += stride;
557 }
558}
559
560static INLINE void highbd_dc_128_predictor(uint16_t *dst, ptrdiff_t stride,
561 int bs, const uint16_t *above,
562 const uint16_t *left, int bd) {
563 int r;
564 (void) above;
565 (void) left;
566
567 for (r = 0; r < bs; r++) {
568 vpx_memset16(dst, 128 << (bd - 8), bs);
569 dst += stride;
570 }
571}
572
573static INLINE void highbd_dc_left_predictor(uint16_t *dst, ptrdiff_t stride,
574 int bs, const uint16_t *above,
575 const uint16_t *left, int bd) {
576 int i, r, expected_dc, sum = 0;
577 (void) above;
578 (void) bd;
579
580 for (i = 0; i < bs; i++)
581 sum += left[i];
582 expected_dc = (sum + (bs >> 1)) / bs;
583
584 for (r = 0; r < bs; r++) {
585 vpx_memset16(dst, expected_dc, bs);
586 dst += stride;
587 }
588}
589
590static INLINE void highbd_dc_top_predictor(uint16_t *dst, ptrdiff_t stride,
591 int bs, const uint16_t *above,
592 const uint16_t *left, int bd) {
593 int i, r, expected_dc, sum = 0;
594 (void) left;
595 (void) bd;
596
597 for (i = 0; i < bs; i++)
598 sum += above[i];
599 expected_dc = (sum + (bs >> 1)) / bs;
600
601 for (r = 0; r < bs; r++) {
602 vpx_memset16(dst, expected_dc, bs);
603 dst += stride;
604 }
605}
606
607static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride,
608 int bs, const uint16_t *above,
609 const uint16_t *left, int bd) {
610 int i, r, expected_dc, sum = 0;
611 const int count = 2 * bs;
612 (void) bd;
613
614 for (i = 0; i < bs; i++) {
615 sum += above[i];
616 sum += left[i];
617 }
618
619 expected_dc = (sum + (count >> 1)) / count;
620
621 for (r = 0; r < bs; r++) {
622 vpx_memset16(dst, expected_dc, bs);
623 dst += stride;
624 }
625}
626#endif // CONFIG_VP9_HIGHBITDEPTH
627
628// This serves as a wrapper function, so that all the prediction functions
629// can be unified and accessed as a pointer array. Note that the boundary
630// above and left are not necessarily used all the time.
631#define intra_pred_sized(type, size) \
632 void vp9_##type##_predictor_##size##x##size##_c(uint8_t *dst, \
633 ptrdiff_t stride, \
634 const uint8_t *above, \
635 const uint8_t *left) { \
636 type##_predictor(dst, stride, size, above, left); \
637 }
638
639#if CONFIG_VP9_HIGHBITDEPTH
640#define intra_pred_highbd_sized(type, size) \
641 void vp9_highbd_##type##_predictor_##size##x##size##_c( \
642 uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \
643 const uint16_t *left, int bd) { \
644 highbd_##type##_predictor(dst, stride, size, above, left, bd); \
645 }
646
647#define intra_pred_allsizes(type) \
648 intra_pred_sized(type, 4) \
649 intra_pred_sized(type, 8) \
650 intra_pred_sized(type, 16) \
651 intra_pred_sized(type, 32) \
652 intra_pred_highbd_sized(type, 4) \
653 intra_pred_highbd_sized(type, 8) \
654 intra_pred_highbd_sized(type, 16) \
655 intra_pred_highbd_sized(type, 32)
656
657#define intra_pred_no_4x4(type) \
658 intra_pred_sized(type, 8) \
659 intra_pred_sized(type, 16) \
660 intra_pred_sized(type, 32) \
661 intra_pred_highbd_sized(type, 4) \
662 intra_pred_highbd_sized(type, 8) \
663 intra_pred_highbd_sized(type, 16) \
664 intra_pred_highbd_sized(type, 32)
665
666#else
667#define intra_pred_allsizes(type) \
668 intra_pred_sized(type, 4) \
669 intra_pred_sized(type, 8) \
670 intra_pred_sized(type, 16) \
671 intra_pred_sized(type, 32)
672
673#define intra_pred_no_4x4(type) \
674 intra_pred_sized(type, 8) \
675 intra_pred_sized(type, 16) \
676 intra_pred_sized(type, 32)
677#endif // CONFIG_VP9_HIGHBITDEPTH
678
679intra_pred_no_4x4(d207)
680intra_pred_no_4x4(d63)
681intra_pred_no_4x4(d45)
682intra_pred_no_4x4(d117)
683intra_pred_no_4x4(d135)
684intra_pred_no_4x4(d153)
685intra_pred_allsizes(v)
686intra_pred_allsizes(h)
687intra_pred_allsizes(tm)
688intra_pred_allsizes(dc_128)
689intra_pred_allsizes(dc_left)
690intra_pred_allsizes(dc_top)
691intra_pred_allsizes(dc)
692#undef intra_pred_allsizes