/src/libvpx/vpx_dsp/intrapred.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
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 | 1.57G | #define DST(x, y) dst[(x) + (y)*stride] |
18 | 1.04G | #define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2) |
19 | 253M | #define AVG2(a, b) (((a) + (b) + 1) >> 1) |
20 | | |
21 | | static INLINE void d207_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
22 | 0 | const uint8_t *above, const uint8_t *left) { |
23 | 0 | int r, c; |
24 | 0 | (void)above; |
25 | | // first column |
26 | 0 | for (r = 0; r < bs - 1; ++r) dst[r * stride] = AVG2(left[r], left[r + 1]); |
27 | 0 | dst[(bs - 1) * stride] = left[bs - 1]; |
28 | 0 | dst++; |
29 | | |
30 | | // second column |
31 | 0 | for (r = 0; r < bs - 2; ++r) |
32 | 0 | dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]); |
33 | 0 | dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]); |
34 | 0 | dst[(bs - 1) * stride] = left[bs - 1]; |
35 | 0 | dst++; |
36 | | |
37 | | // rest of last row |
38 | 0 | for (c = 0; c < bs - 2; ++c) dst[(bs - 1) * stride + c] = left[bs - 1]; |
39 | |
|
40 | 0 | for (r = bs - 2; r >= 0; --r) |
41 | 0 | for (c = 0; c < bs - 2; ++c) |
42 | 0 | dst[r * stride + c] = dst[(r + 1) * stride + c - 2]; |
43 | 0 | } |
44 | | |
45 | | static INLINE void d63_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
46 | 0 | const uint8_t *above, const uint8_t *left) { |
47 | 0 | int r, c; |
48 | 0 | int size; |
49 | 0 | (void)left; |
50 | 0 | for (c = 0; c < bs; ++c) { |
51 | 0 | dst[c] = AVG2(above[c], above[c + 1]); |
52 | 0 | dst[stride + c] = AVG3(above[c], above[c + 1], above[c + 2]); |
53 | 0 | } |
54 | 0 | for (r = 2, size = bs - 2; r < bs; r += 2, --size) { |
55 | 0 | memcpy(dst + (r + 0) * stride, dst + (r >> 1), size); |
56 | 0 | memset(dst + (r + 0) * stride + size, above[bs - 1], bs - size); |
57 | 0 | memcpy(dst + (r + 1) * stride, dst + stride + (r >> 1), size); |
58 | 0 | memset(dst + (r + 1) * stride + size, above[bs - 1], bs - size); |
59 | 0 | } |
60 | 0 | } |
61 | | |
62 | | static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
63 | 0 | const uint8_t *above, const uint8_t *left) { |
64 | 0 | const uint8_t above_right = above[bs - 1]; |
65 | 0 | const uint8_t *const dst_row0 = dst; |
66 | 0 | int x, size; |
67 | 0 | (void)left; |
68 | |
|
69 | 0 | for (x = 0; x < bs - 1; ++x) { |
70 | 0 | dst[x] = AVG3(above[x], above[x + 1], above[x + 2]); |
71 | 0 | } |
72 | 0 | dst[bs - 1] = above_right; |
73 | 0 | dst += stride; |
74 | 0 | for (x = 1, size = bs - 2; x < bs; ++x, --size) { |
75 | 0 | memcpy(dst, dst_row0 + x, size); |
76 | 0 | memset(dst + size, above_right, x + 1); |
77 | 0 | dst += stride; |
78 | 0 | } |
79 | 0 | } |
80 | | |
81 | | static INLINE void d117_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
82 | 5.86M | const uint8_t *above, const uint8_t *left) { |
83 | 5.86M | int r, c; |
84 | | |
85 | | // first row |
86 | 63.2M | for (c = 0; c < bs; c++) dst[c] = AVG2(above[c - 1], above[c]); |
87 | 5.86M | dst += stride; |
88 | | |
89 | | // second row |
90 | 5.86M | dst[0] = AVG3(left[0], above[-1], above[0]); |
91 | 57.4M | for (c = 1; c < bs; c++) dst[c] = AVG3(above[c - 2], above[c - 1], above[c]); |
92 | 5.86M | dst += stride; |
93 | | |
94 | | // the rest of first col |
95 | 5.86M | dst[0] = AVG3(above[-1], left[0], left[1]); |
96 | 45.6M | for (r = 3; r < bs; ++r) |
97 | 39.8M | dst[(r - 2) * stride] = AVG3(left[r - 3], left[r - 2], left[r - 1]); |
98 | | |
99 | | // the rest of the block |
100 | 51.5M | for (r = 2; r < bs; ++r) { |
101 | 578M | for (c = 1; c < bs; c++) dst[c] = dst[-2 * stride + c - 1]; |
102 | 45.6M | dst += stride; |
103 | 45.6M | } |
104 | 5.86M | } |
105 | | |
106 | | static INLINE void d135_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
107 | 5.87M | const uint8_t *above, const uint8_t *left) { |
108 | 5.87M | int i; |
109 | | #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 7 |
110 | | // silence a spurious -Warray-bounds warning, possibly related to: |
111 | | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 |
112 | | uint8_t border[69]; |
113 | | #else |
114 | 5.87M | uint8_t border[32 + 32 - 1]; // outer border from bottom-left to top-right |
115 | 5.87M | #endif |
116 | | |
117 | | // dst(bs, bs - 2)[0], i.e., border starting at bottom-left |
118 | 51.6M | for (i = 0; i < bs - 2; ++i) { |
119 | 45.7M | border[i] = AVG3(left[bs - 3 - i], left[bs - 2 - i], left[bs - 1 - i]); |
120 | 45.7M | } |
121 | 5.87M | border[bs - 2] = AVG3(above[-1], left[0], left[1]); |
122 | 5.87M | border[bs - 1] = AVG3(left[0], above[-1], above[0]); |
123 | 5.87M | border[bs - 0] = AVG3(above[-1], above[0], above[1]); |
124 | | // dst[0][2, size), i.e., remaining top border ascending |
125 | 51.6M | for (i = 0; i < bs - 2; ++i) { |
126 | 45.7M | border[bs + 1 + i] = AVG3(above[i], above[i + 1], above[i + 2]); |
127 | 45.7M | } |
128 | | |
129 | 63.3M | for (i = 0; i < bs; ++i) { |
130 | 57.5M | memcpy(dst + i * stride, border + bs - 1 - i, bs); |
131 | 57.5M | } |
132 | 5.87M | } |
133 | | |
134 | | static INLINE void d153_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
135 | 0 | const uint8_t *above, const uint8_t *left) { |
136 | 0 | int r, c; |
137 | 0 | dst[0] = AVG2(above[-1], left[0]); |
138 | 0 | for (r = 1; r < bs; r++) dst[r * stride] = AVG2(left[r - 1], left[r]); |
139 | 0 | dst++; |
140 | |
|
141 | 0 | dst[0] = AVG3(left[0], above[-1], above[0]); |
142 | 0 | dst[stride] = AVG3(above[-1], left[0], left[1]); |
143 | 0 | for (r = 2; r < bs; r++) |
144 | 0 | dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]); |
145 | 0 | dst++; |
146 | |
|
147 | 0 | for (c = 0; c < bs - 2; c++) |
148 | 0 | dst[c] = AVG3(above[c - 1], above[c], above[c + 1]); |
149 | 0 | dst += stride; |
150 | |
|
151 | 0 | for (r = 1; r < bs; ++r) { |
152 | 0 | for (c = 0; c < bs - 2; c++) dst[c] = dst[-stride + c - 2]; |
153 | 0 | dst += stride; |
154 | 0 | } |
155 | 0 | } |
156 | | |
157 | | static INLINE void v_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
158 | 0 | const uint8_t *above, const uint8_t *left) { |
159 | 0 | int r; |
160 | 0 | (void)left; |
161 | |
|
162 | 0 | for (r = 0; r < bs; r++) { |
163 | 0 | memcpy(dst, above, bs); |
164 | 0 | dst += stride; |
165 | 0 | } |
166 | 0 | } |
167 | | |
168 | | static INLINE void h_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
169 | 0 | const uint8_t *above, const uint8_t *left) { |
170 | 0 | int r; |
171 | 0 | (void)above; |
172 | |
|
173 | 0 | for (r = 0; r < bs; r++) { |
174 | 0 | memset(dst, left[r], bs); |
175 | 0 | dst += stride; |
176 | 0 | } |
177 | 0 | } |
178 | | |
179 | | static INLINE void tm_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
180 | 0 | const uint8_t *above, const uint8_t *left) { |
181 | 0 | int r, c; |
182 | 0 | int ytop_left = above[-1]; |
183 | |
|
184 | 0 | for (r = 0; r < bs; r++) { |
185 | 0 | for (c = 0; c < bs; c++) |
186 | 0 | dst[c] = clip_pixel(left[r] + above[c] - ytop_left); |
187 | 0 | dst += stride; |
188 | 0 | } |
189 | 0 | } |
190 | | |
191 | | static INLINE void dc_128_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
192 | 0 | const uint8_t *above, const uint8_t *left) { |
193 | 0 | int r; |
194 | 0 | (void)above; |
195 | 0 | (void)left; |
196 | |
|
197 | 0 | for (r = 0; r < bs; r++) { |
198 | 0 | memset(dst, 128, bs); |
199 | 0 | dst += stride; |
200 | 0 | } |
201 | 0 | } |
202 | | |
203 | | static INLINE void dc_left_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
204 | | const uint8_t *above, |
205 | 0 | const uint8_t *left) { |
206 | 0 | int i, r, expected_dc, sum = 0; |
207 | 0 | (void)above; |
208 | |
|
209 | 0 | for (i = 0; i < bs; i++) sum += left[i]; |
210 | 0 | expected_dc = (sum + (bs >> 1)) / bs; |
211 | |
|
212 | 0 | for (r = 0; r < bs; r++) { |
213 | 0 | memset(dst, expected_dc, bs); |
214 | 0 | dst += stride; |
215 | 0 | } |
216 | 0 | } |
217 | | |
218 | | static INLINE void dc_top_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
219 | 0 | const uint8_t *above, const uint8_t *left) { |
220 | 0 | int i, r, expected_dc, sum = 0; |
221 | 0 | (void)left; |
222 | |
|
223 | 0 | for (i = 0; i < bs; i++) sum += above[i]; |
224 | 0 | expected_dc = (sum + (bs >> 1)) / bs; |
225 | |
|
226 | 0 | for (r = 0; r < bs; r++) { |
227 | 0 | memset(dst, expected_dc, bs); |
228 | 0 | dst += stride; |
229 | 0 | } |
230 | 0 | } |
231 | | |
232 | | static INLINE void dc_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
233 | 0 | const uint8_t *above, const uint8_t *left) { |
234 | 0 | int i, r, expected_dc, sum = 0; |
235 | 0 | const int count = 2 * bs; |
236 | |
|
237 | 0 | for (i = 0; i < bs; i++) { |
238 | 0 | sum += above[i]; |
239 | 0 | sum += left[i]; |
240 | 0 | } |
241 | |
|
242 | 0 | expected_dc = (sum + (count >> 1)) / count; |
243 | |
|
244 | 0 | for (r = 0; r < bs; r++) { |
245 | 0 | memset(dst, expected_dc, bs); |
246 | 0 | dst += stride; |
247 | 0 | } |
248 | 0 | } |
249 | | |
250 | | void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
251 | 26.0M | const uint8_t *above, const uint8_t *left) { |
252 | 26.0M | const int H = above[-1]; |
253 | 26.0M | const int I = left[0]; |
254 | 26.0M | const int J = left[1]; |
255 | 26.0M | const int K = left[2]; |
256 | 26.0M | const int L = left[3]; |
257 | | |
258 | 26.0M | memset(dst + stride * 0, AVG3(H, I, J), 4); |
259 | 26.0M | memset(dst + stride * 1, AVG3(I, J, K), 4); |
260 | 26.0M | memset(dst + stride * 2, AVG3(J, K, L), 4); |
261 | 26.0M | memset(dst + stride * 3, AVG3(K, L, L), 4); |
262 | 26.0M | } |
263 | | |
264 | | void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
265 | 21.9M | const uint8_t *above, const uint8_t *left) { |
266 | 21.9M | const int H = above[-1]; |
267 | 21.9M | const int I = above[0]; |
268 | 21.9M | const int J = above[1]; |
269 | 21.9M | const int K = above[2]; |
270 | 21.9M | const int L = above[3]; |
271 | 21.9M | const int M = above[4]; |
272 | 21.9M | (void)left; |
273 | | |
274 | 21.9M | dst[0] = AVG3(H, I, J); |
275 | 21.9M | dst[1] = AVG3(I, J, K); |
276 | 21.9M | dst[2] = AVG3(J, K, L); |
277 | 21.9M | dst[3] = AVG3(K, L, M); |
278 | 21.9M | memcpy(dst + stride * 1, dst, 4); |
279 | 21.9M | memcpy(dst + stride * 2, dst, 4); |
280 | 21.9M | memcpy(dst + stride * 3, dst, 4); |
281 | 21.9M | } |
282 | | |
283 | | void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
284 | 0 | const uint8_t *above, const uint8_t *left) { |
285 | 0 | const int I = left[0]; |
286 | 0 | const int J = left[1]; |
287 | 0 | const int K = left[2]; |
288 | 0 | const int L = left[3]; |
289 | 0 | (void)above; |
290 | 0 | DST(0, 0) = AVG2(I, J); |
291 | 0 | DST(2, 0) = DST(0, 1) = AVG2(J, K); |
292 | 0 | DST(2, 1) = DST(0, 2) = AVG2(K, L); |
293 | 0 | DST(1, 0) = AVG3(I, J, K); |
294 | 0 | DST(3, 0) = DST(1, 1) = AVG3(J, K, L); |
295 | 0 | DST(3, 1) = DST(1, 2) = AVG3(K, L, L); |
296 | 0 | DST(3, 2) = DST(2, 2) = DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; |
297 | 0 | } |
298 | | |
299 | | void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
300 | 0 | const uint8_t *above, const uint8_t *left) { |
301 | 0 | const int A = above[0]; |
302 | 0 | const int B = above[1]; |
303 | 0 | const int C = above[2]; |
304 | 0 | const int D = above[3]; |
305 | 0 | const int E = above[4]; |
306 | 0 | const int F = above[5]; |
307 | 0 | const int G = above[6]; |
308 | 0 | (void)left; |
309 | 0 | DST(0, 0) = AVG2(A, B); |
310 | 0 | DST(1, 0) = DST(0, 2) = AVG2(B, C); |
311 | 0 | DST(2, 0) = DST(1, 2) = AVG2(C, D); |
312 | 0 | DST(3, 0) = DST(2, 2) = AVG2(D, E); |
313 | 0 | DST(3, 2) = AVG2(E, F); // differs from vp8 |
314 | |
|
315 | 0 | DST(0, 1) = AVG3(A, B, C); |
316 | 0 | DST(1, 1) = DST(0, 3) = AVG3(B, C, D); |
317 | 0 | DST(2, 1) = DST(1, 3) = AVG3(C, D, E); |
318 | 0 | DST(3, 1) = DST(2, 3) = AVG3(D, E, F); |
319 | 0 | DST(3, 3) = AVG3(E, F, G); // differs from vp8 |
320 | 0 | } |
321 | | |
322 | | void vpx_d63e_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
323 | 8.45M | const uint8_t *above, const uint8_t *left) { |
324 | 8.45M | const int A = above[0]; |
325 | 8.45M | const int B = above[1]; |
326 | 8.45M | const int C = above[2]; |
327 | 8.45M | const int D = above[3]; |
328 | 8.45M | const int E = above[4]; |
329 | 8.45M | const int F = above[5]; |
330 | 8.45M | const int G = above[6]; |
331 | 8.45M | const int H = above[7]; |
332 | 8.45M | (void)left; |
333 | 8.45M | DST(0, 0) = AVG2(A, B); |
334 | 8.45M | DST(1, 0) = DST(0, 2) = AVG2(B, C); |
335 | 8.45M | DST(2, 0) = DST(1, 2) = AVG2(C, D); |
336 | 8.45M | DST(3, 0) = DST(2, 2) = AVG2(D, E); |
337 | 8.45M | DST(3, 2) = AVG3(E, F, G); |
338 | | |
339 | 8.45M | DST(0, 1) = AVG3(A, B, C); |
340 | 8.45M | DST(1, 1) = DST(0, 3) = AVG3(B, C, D); |
341 | 8.45M | DST(2, 1) = DST(1, 3) = AVG3(C, D, E); |
342 | 8.45M | DST(3, 1) = DST(2, 3) = AVG3(D, E, F); |
343 | 8.45M | DST(3, 3) = AVG3(F, G, H); |
344 | 8.45M | } |
345 | | |
346 | | void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
347 | 0 | const uint8_t *above, const uint8_t *left) { |
348 | 0 | const int A = above[0]; |
349 | 0 | const int B = above[1]; |
350 | 0 | const int C = above[2]; |
351 | 0 | const int D = above[3]; |
352 | 0 | const int E = above[4]; |
353 | 0 | const int F = above[5]; |
354 | 0 | const int G = above[6]; |
355 | 0 | const int H = above[7]; |
356 | 0 | (void)stride; |
357 | 0 | (void)left; |
358 | 0 | DST(0, 0) = AVG3(A, B, C); |
359 | 0 | DST(1, 0) = DST(0, 1) = AVG3(B, C, D); |
360 | 0 | DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); |
361 | 0 | DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); |
362 | 0 | DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); |
363 | 0 | DST(3, 2) = DST(2, 3) = AVG3(F, G, H); |
364 | 0 | DST(3, 3) = H; // differs from vp8 |
365 | 0 | } |
366 | | |
367 | | void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
368 | 8.48M | const uint8_t *above, const uint8_t *left) { |
369 | 8.48M | const int A = above[0]; |
370 | 8.48M | const int B = above[1]; |
371 | 8.48M | const int C = above[2]; |
372 | 8.48M | const int D = above[3]; |
373 | 8.48M | const int E = above[4]; |
374 | 8.48M | const int F = above[5]; |
375 | 8.48M | const int G = above[6]; |
376 | 8.48M | const int H = above[7]; |
377 | 8.48M | (void)stride; |
378 | 8.48M | (void)left; |
379 | 8.48M | DST(0, 0) = AVG3(A, B, C); |
380 | 8.48M | DST(1, 0) = DST(0, 1) = AVG3(B, C, D); |
381 | 8.48M | DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); |
382 | 8.48M | DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); |
383 | 8.48M | DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); |
384 | 8.48M | DST(3, 2) = DST(2, 3) = AVG3(F, G, H); |
385 | 8.48M | DST(3, 3) = AVG3(G, H, H); |
386 | 8.48M | } |
387 | | |
388 | | void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
389 | 40.5M | const uint8_t *above, const uint8_t *left) { |
390 | 40.5M | const int I = left[0]; |
391 | 40.5M | const int J = left[1]; |
392 | 40.5M | const int K = left[2]; |
393 | 40.5M | const int X = above[-1]; |
394 | 40.5M | const int A = above[0]; |
395 | 40.5M | const int B = above[1]; |
396 | 40.5M | const int C = above[2]; |
397 | 40.5M | const int D = above[3]; |
398 | 40.5M | DST(0, 0) = DST(1, 2) = AVG2(X, A); |
399 | 40.5M | DST(1, 0) = DST(2, 2) = AVG2(A, B); |
400 | 40.5M | DST(2, 0) = DST(3, 2) = AVG2(B, C); |
401 | 40.5M | DST(3, 0) = AVG2(C, D); |
402 | | |
403 | 40.5M | DST(0, 3) = AVG3(K, J, I); |
404 | 40.5M | DST(0, 2) = AVG3(J, I, X); |
405 | 40.5M | DST(0, 1) = DST(1, 3) = AVG3(I, X, A); |
406 | 40.5M | DST(1, 1) = DST(2, 3) = AVG3(X, A, B); |
407 | 40.5M | DST(2, 1) = DST(3, 3) = AVG3(A, B, C); |
408 | 40.5M | DST(3, 1) = AVG3(B, C, D); |
409 | 40.5M | } |
410 | | |
411 | | void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
412 | 41.0M | const uint8_t *above, const uint8_t *left) { |
413 | 41.0M | const int I = left[0]; |
414 | 41.0M | const int J = left[1]; |
415 | 41.0M | const int K = left[2]; |
416 | 41.0M | const int L = left[3]; |
417 | 41.0M | const int X = above[-1]; |
418 | 41.0M | const int A = above[0]; |
419 | 41.0M | const int B = above[1]; |
420 | 41.0M | const int C = above[2]; |
421 | 41.0M | const int D = above[3]; |
422 | 41.0M | (void)stride; |
423 | 41.0M | DST(0, 3) = AVG3(J, K, L); |
424 | 41.0M | DST(1, 3) = DST(0, 2) = AVG3(I, J, K); |
425 | 41.0M | DST(2, 3) = DST(1, 2) = DST(0, 1) = AVG3(X, I, J); |
426 | 41.0M | DST(3, 3) = DST(2, 2) = DST(1, 1) = DST(0, 0) = AVG3(A, X, I); |
427 | 41.0M | DST(3, 2) = DST(2, 1) = DST(1, 0) = AVG3(B, A, X); |
428 | 41.0M | DST(3, 1) = DST(2, 0) = AVG3(C, B, A); |
429 | 41.0M | DST(3, 0) = AVG3(D, C, B); |
430 | 41.0M | } |
431 | | |
432 | | void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
433 | 0 | const uint8_t *above, const uint8_t *left) { |
434 | 0 | const int I = left[0]; |
435 | 0 | const int J = left[1]; |
436 | 0 | const int K = left[2]; |
437 | 0 | const int L = left[3]; |
438 | 0 | const int X = above[-1]; |
439 | 0 | const int A = above[0]; |
440 | 0 | const int B = above[1]; |
441 | 0 | const int C = above[2]; |
442 | |
|
443 | 0 | DST(0, 0) = DST(2, 1) = AVG2(I, X); |
444 | 0 | DST(0, 1) = DST(2, 2) = AVG2(J, I); |
445 | 0 | DST(0, 2) = DST(2, 3) = AVG2(K, J); |
446 | 0 | DST(0, 3) = AVG2(L, K); |
447 | |
|
448 | 0 | DST(3, 0) = AVG3(A, B, C); |
449 | 0 | DST(2, 0) = AVG3(X, A, B); |
450 | 0 | DST(1, 0) = DST(3, 1) = AVG3(I, X, A); |
451 | 0 | DST(1, 1) = DST(3, 2) = AVG3(J, I, X); |
452 | 0 | DST(1, 2) = DST(3, 3) = AVG3(K, J, I); |
453 | 0 | DST(1, 3) = AVG3(L, K, J); |
454 | 0 | } |
455 | | |
456 | | #if CONFIG_VP9_HIGHBITDEPTH |
457 | | static INLINE void highbd_d207_predictor(uint16_t *dst, ptrdiff_t stride, |
458 | | int bs, const uint16_t *above, |
459 | 0 | const uint16_t *left, int bd) { |
460 | 0 | int r, c; |
461 | 0 | (void)above; |
462 | 0 | (void)bd; |
463 | | |
464 | | // First column. |
465 | 0 | for (r = 0; r < bs - 1; ++r) { |
466 | 0 | dst[r * stride] = AVG2(left[r], left[r + 1]); |
467 | 0 | } |
468 | 0 | dst[(bs - 1) * stride] = left[bs - 1]; |
469 | 0 | dst++; |
470 | | |
471 | | // Second column. |
472 | 0 | for (r = 0; r < bs - 2; ++r) { |
473 | 0 | dst[r * stride] = AVG3(left[r], left[r + 1], left[r + 2]); |
474 | 0 | } |
475 | 0 | dst[(bs - 2) * stride] = AVG3(left[bs - 2], left[bs - 1], left[bs - 1]); |
476 | 0 | dst[(bs - 1) * stride] = left[bs - 1]; |
477 | 0 | dst++; |
478 | | |
479 | | // Rest of last row. |
480 | 0 | for (c = 0; c < bs - 2; ++c) dst[(bs - 1) * stride + c] = left[bs - 1]; |
481 | |
|
482 | 0 | for (r = bs - 2; r >= 0; --r) { |
483 | 0 | for (c = 0; c < bs - 2; ++c) |
484 | 0 | dst[r * stride + c] = dst[(r + 1) * stride + c - 2]; |
485 | 0 | } |
486 | 0 | } |
487 | | |
488 | | static INLINE void highbd_d63_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
489 | | const uint16_t *above, |
490 | 0 | const uint16_t *left, int bd) { |
491 | 0 | int r, c; |
492 | 0 | int size; |
493 | 0 | (void)left; |
494 | 0 | (void)bd; |
495 | 0 | for (c = 0; c < bs; ++c) { |
496 | 0 | dst[c] = AVG2(above[c], above[c + 1]); |
497 | 0 | dst[stride + c] = AVG3(above[c], above[c + 1], above[c + 2]); |
498 | 0 | } |
499 | 0 | for (r = 2, size = bs - 2; r < bs; r += 2, --size) { |
500 | 0 | memcpy(dst + (r + 0) * stride, dst + (r >> 1), size * sizeof(*dst)); |
501 | 0 | vpx_memset16(dst + (r + 0) * stride + size, above[bs - 1], bs - size); |
502 | 0 | memcpy(dst + (r + 1) * stride, dst + stride + (r >> 1), |
503 | 0 | size * sizeof(*dst)); |
504 | 0 | vpx_memset16(dst + (r + 1) * stride + size, above[bs - 1], bs - size); |
505 | 0 | } |
506 | 0 | } |
507 | | |
508 | | static INLINE void highbd_d45_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
509 | | const uint16_t *above, |
510 | 0 | const uint16_t *left, int bd) { |
511 | 0 | const uint16_t above_right = above[bs - 1]; |
512 | 0 | const uint16_t *const dst_row0 = dst; |
513 | 0 | int x, size; |
514 | 0 | (void)left; |
515 | 0 | (void)bd; |
516 | |
|
517 | 0 | for (x = 0; x < bs - 1; ++x) { |
518 | 0 | dst[x] = AVG3(above[x], above[x + 1], above[x + 2]); |
519 | 0 | } |
520 | 0 | dst[bs - 1] = above_right; |
521 | 0 | dst += stride; |
522 | 0 | for (x = 1, size = bs - 2; x < bs; ++x, --size) { |
523 | 0 | memcpy(dst, dst_row0 + x, size * sizeof(*dst)); |
524 | 0 | vpx_memset16(dst + size, above_right, x + 1); |
525 | 0 | dst += stride; |
526 | 0 | } |
527 | 0 | } |
528 | | |
529 | | static INLINE void highbd_d117_predictor(uint16_t *dst, ptrdiff_t stride, |
530 | | int bs, const uint16_t *above, |
531 | 0 | const uint16_t *left, int bd) { |
532 | 0 | int r, c; |
533 | 0 | (void)bd; |
534 | | |
535 | | // first row |
536 | 0 | for (c = 0; c < bs; c++) dst[c] = AVG2(above[c - 1], above[c]); |
537 | 0 | dst += stride; |
538 | | |
539 | | // second row |
540 | 0 | dst[0] = AVG3(left[0], above[-1], above[0]); |
541 | 0 | for (c = 1; c < bs; c++) dst[c] = AVG3(above[c - 2], above[c - 1], above[c]); |
542 | 0 | dst += stride; |
543 | | |
544 | | // the rest of first col |
545 | 0 | dst[0] = AVG3(above[-1], left[0], left[1]); |
546 | 0 | for (r = 3; r < bs; ++r) |
547 | 0 | dst[(r - 2) * stride] = AVG3(left[r - 3], left[r - 2], left[r - 1]); |
548 | | |
549 | | // the rest of the block |
550 | 0 | for (r = 2; r < bs; ++r) { |
551 | 0 | for (c = 1; c < bs; c++) dst[c] = dst[-2 * stride + c - 1]; |
552 | 0 | dst += stride; |
553 | 0 | } |
554 | 0 | } |
555 | | |
556 | | static INLINE void highbd_d135_predictor(uint16_t *dst, ptrdiff_t stride, |
557 | | int bs, const uint16_t *above, |
558 | 0 | const uint16_t *left, int bd) { |
559 | 0 | int i; |
560 | | #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 7 |
561 | | // silence a spurious -Warray-bounds warning, possibly related to: |
562 | | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 |
563 | | uint16_t border[69]; |
564 | | #else |
565 | 0 | uint16_t border[32 + 32 - 1]; // outer border from bottom-left to top-right |
566 | 0 | #endif |
567 | 0 | (void)bd; |
568 | | |
569 | | // dst(bs, bs - 2)[0], i.e., border starting at bottom-left |
570 | 0 | for (i = 0; i < bs - 2; ++i) { |
571 | 0 | border[i] = AVG3(left[bs - 3 - i], left[bs - 2 - i], left[bs - 1 - i]); |
572 | 0 | } |
573 | 0 | border[bs - 2] = AVG3(above[-1], left[0], left[1]); |
574 | 0 | border[bs - 1] = AVG3(left[0], above[-1], above[0]); |
575 | 0 | border[bs - 0] = AVG3(above[-1], above[0], above[1]); |
576 | | // dst[0][2, size), i.e., remaining top border ascending |
577 | 0 | for (i = 0; i < bs - 2; ++i) { |
578 | 0 | border[bs + 1 + i] = AVG3(above[i], above[i + 1], above[i + 2]); |
579 | 0 | } |
580 | |
|
581 | 0 | for (i = 0; i < bs; ++i) { |
582 | 0 | memcpy(dst + i * stride, border + bs - 1 - i, bs * sizeof(dst[0])); |
583 | 0 | } |
584 | 0 | } |
585 | | |
586 | | static INLINE void highbd_d153_predictor(uint16_t *dst, ptrdiff_t stride, |
587 | | int bs, const uint16_t *above, |
588 | 0 | const uint16_t *left, int bd) { |
589 | 0 | int r, c; |
590 | 0 | (void)bd; |
591 | 0 | dst[0] = AVG2(above[-1], left[0]); |
592 | 0 | for (r = 1; r < bs; r++) dst[r * stride] = AVG2(left[r - 1], left[r]); |
593 | 0 | dst++; |
594 | |
|
595 | 0 | dst[0] = AVG3(left[0], above[-1], above[0]); |
596 | 0 | dst[stride] = AVG3(above[-1], left[0], left[1]); |
597 | 0 | for (r = 2; r < bs; r++) |
598 | 0 | dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]); |
599 | 0 | dst++; |
600 | |
|
601 | 0 | for (c = 0; c < bs - 2; c++) |
602 | 0 | dst[c] = AVG3(above[c - 1], above[c], above[c + 1]); |
603 | 0 | dst += stride; |
604 | |
|
605 | 0 | for (r = 1; r < bs; ++r) { |
606 | 0 | for (c = 0; c < bs - 2; c++) dst[c] = dst[-stride + c - 2]; |
607 | 0 | dst += stride; |
608 | 0 | } |
609 | 0 | } |
610 | | |
611 | | static INLINE void highbd_v_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
612 | | const uint16_t *above, |
613 | 0 | const uint16_t *left, int bd) { |
614 | 0 | int r; |
615 | 0 | (void)left; |
616 | 0 | (void)bd; |
617 | 0 | for (r = 0; r < bs; r++) { |
618 | 0 | memcpy(dst, above, bs * sizeof(uint16_t)); |
619 | 0 | dst += stride; |
620 | 0 | } |
621 | 0 | } |
622 | | |
623 | | static INLINE void highbd_h_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
624 | | const uint16_t *above, |
625 | 0 | const uint16_t *left, int bd) { |
626 | 0 | int r; |
627 | 0 | (void)above; |
628 | 0 | (void)bd; |
629 | 0 | for (r = 0; r < bs; r++) { |
630 | 0 | vpx_memset16(dst, left[r], bs); |
631 | 0 | dst += stride; |
632 | 0 | } |
633 | 0 | } |
634 | | |
635 | | static INLINE void highbd_tm_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
636 | | const uint16_t *above, |
637 | 0 | const uint16_t *left, int bd) { |
638 | 0 | int r, c; |
639 | 0 | int ytop_left = above[-1]; |
640 | 0 | (void)bd; |
641 | |
|
642 | 0 | for (r = 0; r < bs; r++) { |
643 | 0 | for (c = 0; c < bs; c++) |
644 | 0 | dst[c] = clip_pixel_highbd(left[r] + above[c] - ytop_left, bd); |
645 | 0 | dst += stride; |
646 | 0 | } |
647 | 0 | } |
648 | | |
649 | | static INLINE void highbd_dc_128_predictor(uint16_t *dst, ptrdiff_t stride, |
650 | | int bs, const uint16_t *above, |
651 | 0 | const uint16_t *left, int bd) { |
652 | 0 | int r; |
653 | 0 | (void)above; |
654 | 0 | (void)left; |
655 | |
|
656 | 0 | for (r = 0; r < bs; r++) { |
657 | 0 | vpx_memset16(dst, 128 << (bd - 8), bs); |
658 | 0 | dst += stride; |
659 | 0 | } |
660 | 0 | } |
661 | | |
662 | | static INLINE void highbd_dc_left_predictor(uint16_t *dst, ptrdiff_t stride, |
663 | | int bs, const uint16_t *above, |
664 | 0 | const uint16_t *left, int bd) { |
665 | 0 | int i, r, expected_dc, sum = 0; |
666 | 0 | (void)above; |
667 | 0 | (void)bd; |
668 | |
|
669 | 0 | for (i = 0; i < bs; i++) sum += left[i]; |
670 | 0 | expected_dc = (sum + (bs >> 1)) / bs; |
671 | |
|
672 | 0 | for (r = 0; r < bs; r++) { |
673 | 0 | vpx_memset16(dst, expected_dc, bs); |
674 | 0 | dst += stride; |
675 | 0 | } |
676 | 0 | } |
677 | | |
678 | | static INLINE void highbd_dc_top_predictor(uint16_t *dst, ptrdiff_t stride, |
679 | | int bs, const uint16_t *above, |
680 | 0 | const uint16_t *left, int bd) { |
681 | 0 | int i, r, expected_dc, sum = 0; |
682 | 0 | (void)left; |
683 | 0 | (void)bd; |
684 | |
|
685 | 0 | for (i = 0; i < bs; i++) sum += above[i]; |
686 | 0 | expected_dc = (sum + (bs >> 1)) / bs; |
687 | |
|
688 | 0 | for (r = 0; r < bs; r++) { |
689 | 0 | vpx_memset16(dst, expected_dc, bs); |
690 | 0 | dst += stride; |
691 | 0 | } |
692 | 0 | } |
693 | | |
694 | | static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs, |
695 | | const uint16_t *above, |
696 | 0 | const uint16_t *left, int bd) { |
697 | 0 | int i, r, expected_dc, sum = 0; |
698 | 0 | const int count = 2 * bs; |
699 | 0 | (void)bd; |
700 | |
|
701 | 0 | for (i = 0; i < bs; i++) { |
702 | 0 | sum += above[i]; |
703 | 0 | sum += left[i]; |
704 | 0 | } |
705 | |
|
706 | 0 | expected_dc = (sum + (count >> 1)) / count; |
707 | |
|
708 | 0 | for (r = 0; r < bs; r++) { |
709 | 0 | vpx_memset16(dst, expected_dc, bs); |
710 | 0 | dst += stride; |
711 | 0 | } |
712 | 0 | } |
713 | | |
714 | | void vpx_highbd_d207_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
715 | | const uint16_t *above, |
716 | 0 | const uint16_t *left, int bd) { |
717 | 0 | const int I = left[0]; |
718 | 0 | const int J = left[1]; |
719 | 0 | const int K = left[2]; |
720 | 0 | const int L = left[3]; |
721 | 0 | (void)above; |
722 | 0 | (void)bd; |
723 | 0 | DST(0, 0) = AVG2(I, J); |
724 | 0 | DST(2, 0) = DST(0, 1) = AVG2(J, K); |
725 | 0 | DST(2, 1) = DST(0, 2) = AVG2(K, L); |
726 | 0 | DST(1, 0) = AVG3(I, J, K); |
727 | 0 | DST(3, 0) = DST(1, 1) = AVG3(J, K, L); |
728 | 0 | DST(3, 1) = DST(1, 2) = AVG3(K, L, L); |
729 | 0 | DST(3, 2) = DST(2, 2) = DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; |
730 | 0 | } |
731 | | |
732 | | void vpx_highbd_d63_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
733 | | const uint16_t *above, const uint16_t *left, |
734 | 0 | int bd) { |
735 | 0 | const int A = above[0]; |
736 | 0 | const int B = above[1]; |
737 | 0 | const int C = above[2]; |
738 | 0 | const int D = above[3]; |
739 | 0 | const int E = above[4]; |
740 | 0 | const int F = above[5]; |
741 | 0 | const int G = above[6]; |
742 | 0 | (void)left; |
743 | 0 | (void)bd; |
744 | 0 | DST(0, 0) = AVG2(A, B); |
745 | 0 | DST(1, 0) = DST(0, 2) = AVG2(B, C); |
746 | 0 | DST(2, 0) = DST(1, 2) = AVG2(C, D); |
747 | 0 | DST(3, 0) = DST(2, 2) = AVG2(D, E); |
748 | 0 | DST(3, 2) = AVG2(E, F); // differs from vp8 |
749 | |
|
750 | 0 | DST(0, 1) = AVG3(A, B, C); |
751 | 0 | DST(1, 1) = DST(0, 3) = AVG3(B, C, D); |
752 | 0 | DST(2, 1) = DST(1, 3) = AVG3(C, D, E); |
753 | 0 | DST(3, 1) = DST(2, 3) = AVG3(D, E, F); |
754 | 0 | DST(3, 3) = AVG3(E, F, G); // differs from vp8 |
755 | 0 | } |
756 | | |
757 | | void vpx_highbd_d45_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
758 | | const uint16_t *above, const uint16_t *left, |
759 | 0 | int bd) { |
760 | 0 | const int A = above[0]; |
761 | 0 | const int B = above[1]; |
762 | 0 | const int C = above[2]; |
763 | 0 | const int D = above[3]; |
764 | 0 | const int E = above[4]; |
765 | 0 | const int F = above[5]; |
766 | 0 | const int G = above[6]; |
767 | 0 | const int H = above[7]; |
768 | 0 | (void)left; |
769 | 0 | (void)bd; |
770 | 0 | DST(0, 0) = AVG3(A, B, C); |
771 | 0 | DST(1, 0) = DST(0, 1) = AVG3(B, C, D); |
772 | 0 | DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); |
773 | 0 | DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); |
774 | 0 | DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); |
775 | 0 | DST(3, 2) = DST(2, 3) = AVG3(F, G, H); |
776 | 0 | DST(3, 3) = H; // differs from vp8 |
777 | 0 | } |
778 | | |
779 | | void vpx_highbd_d117_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
780 | | const uint16_t *above, |
781 | 0 | const uint16_t *left, int bd) { |
782 | 0 | const int I = left[0]; |
783 | 0 | const int J = left[1]; |
784 | 0 | const int K = left[2]; |
785 | 0 | const int X = above[-1]; |
786 | 0 | const int A = above[0]; |
787 | 0 | const int B = above[1]; |
788 | 0 | const int C = above[2]; |
789 | 0 | const int D = above[3]; |
790 | 0 | (void)bd; |
791 | 0 | DST(0, 0) = DST(1, 2) = AVG2(X, A); |
792 | 0 | DST(1, 0) = DST(2, 2) = AVG2(A, B); |
793 | 0 | DST(2, 0) = DST(3, 2) = AVG2(B, C); |
794 | 0 | DST(3, 0) = AVG2(C, D); |
795 | |
|
796 | 0 | DST(0, 3) = AVG3(K, J, I); |
797 | 0 | DST(0, 2) = AVG3(J, I, X); |
798 | 0 | DST(0, 1) = DST(1, 3) = AVG3(I, X, A); |
799 | 0 | DST(1, 1) = DST(2, 3) = AVG3(X, A, B); |
800 | 0 | DST(2, 1) = DST(3, 3) = AVG3(A, B, C); |
801 | 0 | DST(3, 1) = AVG3(B, C, D); |
802 | 0 | } |
803 | | |
804 | | void vpx_highbd_d135_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
805 | | const uint16_t *above, |
806 | 0 | const uint16_t *left, int bd) { |
807 | 0 | const int I = left[0]; |
808 | 0 | const int J = left[1]; |
809 | 0 | const int K = left[2]; |
810 | 0 | const int L = left[3]; |
811 | 0 | const int X = above[-1]; |
812 | 0 | const int A = above[0]; |
813 | 0 | const int B = above[1]; |
814 | 0 | const int C = above[2]; |
815 | 0 | const int D = above[3]; |
816 | 0 | (void)bd; |
817 | 0 | DST(0, 3) = AVG3(J, K, L); |
818 | 0 | DST(1, 3) = DST(0, 2) = AVG3(I, J, K); |
819 | 0 | DST(2, 3) = DST(1, 2) = DST(0, 1) = AVG3(X, I, J); |
820 | 0 | DST(3, 3) = DST(2, 2) = DST(1, 1) = DST(0, 0) = AVG3(A, X, I); |
821 | 0 | DST(3, 2) = DST(2, 1) = DST(1, 0) = AVG3(B, A, X); |
822 | 0 | DST(3, 1) = DST(2, 0) = AVG3(C, B, A); |
823 | 0 | DST(3, 0) = AVG3(D, C, B); |
824 | 0 | } |
825 | | |
826 | | void vpx_highbd_d153_predictor_4x4_c(uint16_t *dst, ptrdiff_t stride, |
827 | | const uint16_t *above, |
828 | 0 | const uint16_t *left, int bd) { |
829 | 0 | const int I = left[0]; |
830 | 0 | const int J = left[1]; |
831 | 0 | const int K = left[2]; |
832 | 0 | const int L = left[3]; |
833 | 0 | const int X = above[-1]; |
834 | 0 | const int A = above[0]; |
835 | 0 | const int B = above[1]; |
836 | 0 | const int C = above[2]; |
837 | 0 | (void)bd; |
838 | |
|
839 | 0 | DST(0, 0) = DST(2, 1) = AVG2(I, X); |
840 | 0 | DST(0, 1) = DST(2, 2) = AVG2(J, I); |
841 | 0 | DST(0, 2) = DST(2, 3) = AVG2(K, J); |
842 | 0 | DST(0, 3) = AVG2(L, K); |
843 | |
|
844 | 0 | DST(3, 0) = AVG3(A, B, C); |
845 | 0 | DST(2, 0) = AVG3(X, A, B); |
846 | 0 | DST(1, 0) = DST(3, 1) = AVG3(I, X, A); |
847 | 0 | DST(1, 1) = DST(3, 2) = AVG3(J, I, X); |
848 | 0 | DST(1, 2) = DST(3, 3) = AVG3(K, J, I); |
849 | 0 | DST(1, 3) = AVG3(L, K, J); |
850 | 0 | } |
851 | | #endif // CONFIG_VP9_HIGHBITDEPTH |
852 | | |
853 | | // This serves as a wrapper function, so that all the prediction functions |
854 | | // can be unified and accessed as a pointer array. Note that the boundary |
855 | | // above and left are not necessarily used all the time. |
856 | | #define intra_pred_sized(type, size) \ |
857 | | void vpx_##type##_predictor_##size##x##size##_c( \ |
858 | | uint8_t *dst, ptrdiff_t stride, const uint8_t *above, \ |
859 | 11.7M | const uint8_t *left) { \ |
860 | 11.7M | type##_predictor(dst, stride, size, above, left); \ |
861 | 11.7M | } Unexecuted instantiation: vpx_d207_predictor_8x8_c Unexecuted instantiation: vpx_d207_predictor_16x16_c Unexecuted instantiation: vpx_d207_predictor_32x32_c Unexecuted instantiation: vpx_d63_predictor_8x8_c Unexecuted instantiation: vpx_d63_predictor_16x16_c Unexecuted instantiation: vpx_d63_predictor_32x32_c Unexecuted instantiation: vpx_d45_predictor_8x8_c Unexecuted instantiation: vpx_d45_predictor_16x16_c Unexecuted instantiation: vpx_d45_predictor_32x32_c Line | Count | Source | 859 | 4.89M | const uint8_t *left) { \ | 860 | 4.89M | type##_predictor(dst, stride, size, above, left); \ | 861 | 4.89M | } |
vpx_d117_predictor_16x16_c Line | Count | Source | 859 | 794k | const uint8_t *left) { \ | 860 | 794k | type##_predictor(dst, stride, size, above, left); \ | 861 | 794k | } |
vpx_d117_predictor_32x32_c Line | Count | Source | 859 | 172k | const uint8_t *left) { \ | 860 | 172k | type##_predictor(dst, stride, size, above, left); \ | 861 | 172k | } |
Line | Count | Source | 859 | 4.91M | const uint8_t *left) { \ | 860 | 4.91M | type##_predictor(dst, stride, size, above, left); \ | 861 | 4.91M | } |
vpx_d135_predictor_16x16_c Line | Count | Source | 859 | 792k | const uint8_t *left) { \ | 860 | 792k | type##_predictor(dst, stride, size, above, left); \ | 861 | 792k | } |
vpx_d135_predictor_32x32_c Line | Count | Source | 859 | 172k | const uint8_t *left) { \ | 860 | 172k | type##_predictor(dst, stride, size, above, left); \ | 861 | 172k | } |
Unexecuted instantiation: vpx_d153_predictor_8x8_c Unexecuted instantiation: vpx_d153_predictor_16x16_c Unexecuted instantiation: vpx_d153_predictor_32x32_c Unexecuted instantiation: vpx_v_predictor_4x4_c Unexecuted instantiation: vpx_v_predictor_8x8_c Unexecuted instantiation: vpx_v_predictor_16x16_c Unexecuted instantiation: vpx_v_predictor_32x32_c Unexecuted instantiation: vpx_h_predictor_4x4_c Unexecuted instantiation: vpx_h_predictor_8x8_c Unexecuted instantiation: vpx_h_predictor_16x16_c Unexecuted instantiation: vpx_h_predictor_32x32_c Unexecuted instantiation: vpx_tm_predictor_4x4_c Unexecuted instantiation: vpx_tm_predictor_8x8_c Unexecuted instantiation: vpx_tm_predictor_16x16_c Unexecuted instantiation: vpx_tm_predictor_32x32_c Unexecuted instantiation: vpx_dc_128_predictor_4x4_c Unexecuted instantiation: vpx_dc_128_predictor_8x8_c Unexecuted instantiation: vpx_dc_128_predictor_16x16_c Unexecuted instantiation: vpx_dc_128_predictor_32x32_c Unexecuted instantiation: vpx_dc_left_predictor_4x4_c Unexecuted instantiation: vpx_dc_left_predictor_8x8_c Unexecuted instantiation: vpx_dc_left_predictor_16x16_c Unexecuted instantiation: vpx_dc_left_predictor_32x32_c Unexecuted instantiation: vpx_dc_top_predictor_4x4_c Unexecuted instantiation: vpx_dc_top_predictor_8x8_c Unexecuted instantiation: vpx_dc_top_predictor_16x16_c Unexecuted instantiation: vpx_dc_top_predictor_32x32_c Unexecuted instantiation: vpx_dc_predictor_4x4_c Unexecuted instantiation: vpx_dc_predictor_8x8_c Unexecuted instantiation: vpx_dc_predictor_16x16_c Unexecuted instantiation: vpx_dc_predictor_32x32_c |
862 | | |
863 | | #if CONFIG_VP9_HIGHBITDEPTH |
864 | | #define intra_pred_highbd_sized(type, size) \ |
865 | | void vpx_highbd_##type##_predictor_##size##x##size##_c( \ |
866 | | uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \ |
867 | 0 | const uint16_t *left, int bd) { \ |
868 | 0 | highbd_##type##_predictor(dst, stride, size, above, left, bd); \ |
869 | 0 | } Unexecuted instantiation: vpx_highbd_d207_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d207_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d207_predictor_32x32_c Unexecuted instantiation: vpx_highbd_d63_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d63_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d63_predictor_32x32_c Unexecuted instantiation: vpx_highbd_d45_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d45_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d45_predictor_32x32_c Unexecuted instantiation: vpx_highbd_d117_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d117_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d117_predictor_32x32_c Unexecuted instantiation: vpx_highbd_d135_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d135_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d135_predictor_32x32_c Unexecuted instantiation: vpx_highbd_d153_predictor_8x8_c Unexecuted instantiation: vpx_highbd_d153_predictor_16x16_c Unexecuted instantiation: vpx_highbd_d153_predictor_32x32_c Unexecuted instantiation: vpx_highbd_v_predictor_4x4_c Unexecuted instantiation: vpx_highbd_v_predictor_8x8_c Unexecuted instantiation: vpx_highbd_v_predictor_16x16_c Unexecuted instantiation: vpx_highbd_v_predictor_32x32_c Unexecuted instantiation: vpx_highbd_h_predictor_4x4_c Unexecuted instantiation: vpx_highbd_h_predictor_8x8_c Unexecuted instantiation: vpx_highbd_h_predictor_16x16_c Unexecuted instantiation: vpx_highbd_h_predictor_32x32_c Unexecuted instantiation: vpx_highbd_tm_predictor_4x4_c Unexecuted instantiation: vpx_highbd_tm_predictor_8x8_c Unexecuted instantiation: vpx_highbd_tm_predictor_16x16_c Unexecuted instantiation: vpx_highbd_tm_predictor_32x32_c Unexecuted instantiation: vpx_highbd_dc_128_predictor_4x4_c Unexecuted instantiation: vpx_highbd_dc_128_predictor_8x8_c Unexecuted instantiation: vpx_highbd_dc_128_predictor_16x16_c Unexecuted instantiation: vpx_highbd_dc_128_predictor_32x32_c Unexecuted instantiation: vpx_highbd_dc_left_predictor_4x4_c Unexecuted instantiation: vpx_highbd_dc_left_predictor_8x8_c Unexecuted instantiation: vpx_highbd_dc_left_predictor_16x16_c Unexecuted instantiation: vpx_highbd_dc_left_predictor_32x32_c Unexecuted instantiation: vpx_highbd_dc_top_predictor_4x4_c Unexecuted instantiation: vpx_highbd_dc_top_predictor_8x8_c Unexecuted instantiation: vpx_highbd_dc_top_predictor_16x16_c Unexecuted instantiation: vpx_highbd_dc_top_predictor_32x32_c Unexecuted instantiation: vpx_highbd_dc_predictor_4x4_c Unexecuted instantiation: vpx_highbd_dc_predictor_8x8_c Unexecuted instantiation: vpx_highbd_dc_predictor_16x16_c Unexecuted instantiation: vpx_highbd_dc_predictor_32x32_c |
870 | | |
871 | | /* clang-format off */ |
872 | | #define intra_pred_allsizes(type) \ |
873 | | intra_pred_sized(type, 4) \ |
874 | | intra_pred_sized(type, 8) \ |
875 | | intra_pred_sized(type, 16) \ |
876 | | intra_pred_sized(type, 32) \ |
877 | | intra_pred_highbd_sized(type, 4) \ |
878 | | intra_pred_highbd_sized(type, 8) \ |
879 | | intra_pred_highbd_sized(type, 16) \ |
880 | | intra_pred_highbd_sized(type, 32) |
881 | | |
882 | | #define intra_pred_no_4x4(type) \ |
883 | | intra_pred_sized(type, 8) \ |
884 | | intra_pred_sized(type, 16) \ |
885 | | intra_pred_sized(type, 32) \ |
886 | | intra_pred_highbd_sized(type, 8) \ |
887 | | intra_pred_highbd_sized(type, 16) \ |
888 | | intra_pred_highbd_sized(type, 32) |
889 | | |
890 | | #else |
891 | | #define intra_pred_allsizes(type) \ |
892 | | intra_pred_sized(type, 4) \ |
893 | | intra_pred_sized(type, 8) \ |
894 | | intra_pred_sized(type, 16) \ |
895 | | intra_pred_sized(type, 32) |
896 | | |
897 | | #define intra_pred_no_4x4(type) \ |
898 | | intra_pred_sized(type, 8) \ |
899 | | intra_pred_sized(type, 16) \ |
900 | | intra_pred_sized(type, 32) |
901 | | #endif // CONFIG_VP9_HIGHBITDEPTH |
902 | | |
903 | | intra_pred_no_4x4(d207) |
904 | | intra_pred_no_4x4(d63) |
905 | | intra_pred_no_4x4(d45) |
906 | | intra_pred_no_4x4(d117) |
907 | | intra_pred_no_4x4(d135) |
908 | | intra_pred_no_4x4(d153) |
909 | | intra_pred_allsizes(v) |
910 | | intra_pred_allsizes(h) |
911 | | intra_pred_allsizes(tm) |
912 | | intra_pred_allsizes(dc_128) |
913 | | intra_pred_allsizes(dc_left) |
914 | | intra_pred_allsizes(dc_top) |
915 | | intra_pred_allsizes(dc) |
916 | | /* clang-format on */ |
917 | | #undef intra_pred_allsizes |