History

checkasm: hevc_pel: Use helpers for checking for writes out of bounds

This allows catching whether the functions write outside of the designated rectangle, and if run with "checkasm -v", it also prints out on which side of the rectangle the overwrite was.

Martin Storsjö committed 1 year ago

Commit 4d4b3011 parent f6cd9bf1 file · +90 −67Browse files

Unified · Split

tests/checkasm/hevc_pel.c+90−67
@@ -44,9 +44,14 @@ static const int offsets[] = {0, 255, -1 }; · 43 unmodified lines
44 uint32_t r = rnd() & mask; \44 uint32_t r = rnd() & mask; \
45 AV_WN32A(buf0 + k, r); \45 AV_WN32A(buf0 + k, r); \
46 AV_WN32A(buf1 + k, r); \46 AV_WN32A(buf1 + k, r); \
47 if (k >= BUF_SIZE) \47 } \
48 continue; \48 } while (0)
49 r = rnd(); \49
50#define randomize_buffers_dst() \
51 do { \
52 int k; \
53 for (k = 0; k < BUF_SIZE; k += 4) { \
54 uint32_t r = rnd(); \
50 AV_WN32A(dst0 + k, r); \55 AV_WN32A(dst0 + k, r); \
51 AV_WN32A(dst1 + k, r); \56 AV_WN32A(dst1 + k, r); \
52 } \57 } \
@@ -100,6 +105,7 @@ static void checkasm_check_hevc_qpel(void) · 47 unmodified lines
100 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {105 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
101 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;106 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;
102 randomize_buffers();107 randomize_buffers();
108 randomize_buffers_dst();
103 call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);109 call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);
104 call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);110 call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);
105 checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t),111 checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t),
@@ -118,8 +124,8 @@ static void checkasm_check_hevc_qpel_uni(void) · 12 unmodified lines
118{124{
119 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);125 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);
120 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);126 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);
121 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);127 PIXEL_RECT(dst0, 64, 64);
122 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);128 PIXEL_RECT(dst1, 64, 64);
123 129
124 HEVCDSPContext h;130 HEVCDSPContext h;
125 int size, bit_depth, i, j;131 int size, bit_depth, i, j;
@@ -143,16 +149,18 @@ static void checkasm_check_hevc_qpel_uni(void) · 17 unmodified lines
143 if (check_func(h.put_hevc_qpel_uni[size][j][i],149 if (check_func(h.put_hevc_qpel_uni[size][j][i],
144 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {150 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
145 randomize_buffers();151 randomize_buffers();
146 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,152 CLEAR_PIXEL_RECT(dst0);
153 CLEAR_PIXEL_RECT(dst1);
154 call_ref(dst0, dst0_stride,
147 src0, sizes[size] * SIZEOF_PIXEL,155 src0, sizes[size] * SIZEOF_PIXEL,
148 sizes[size], i, j, sizes[size]);156 sizes[size], i, j, sizes[size]);
149 call_new(dst1, sizes[size] * SIZEOF_PIXEL,157 call_new(dst1, dst1_stride,
150 src1, sizes[size] * SIZEOF_PIXEL,158 src1, sizes[size] * SIZEOF_PIXEL,
151 sizes[size], i, j, sizes[size]);159 sizes[size], i, j, sizes[size]);
152 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,160 checkasm_check_pixel_padded(dst0, dst0_stride,
153 dst1, sizes[size] * SIZEOF_PIXEL,161 dst1, dst1_stride,
154 size[sizes], size[sizes], "dst");162 size[sizes], size[sizes], "dst");
155 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,163 bench_new(dst1, dst1_stride,
156 src1, sizes[size] * SIZEOF_PIXEL,164 src1, sizes[size] * SIZEOF_PIXEL,
157 sizes[size], i, j, sizes[size]);165 sizes[size], i, j, sizes[size]);
158 }166 }
@@ -167,8 +175,8 @@ static void checkasm_check_hevc_qpel_uni_w(void) · 8 unmodified lines
167{175{
168 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);176 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);
169 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);177 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);
170 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);178 PIXEL_RECT(dst0, 64, 64);
171 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);179 PIXEL_RECT(dst1, 64, 64);
172 180
173 HEVCDSPContext h;181 HEVCDSPContext h;
174 int size, bit_depth, i, j;182 int size, bit_depth, i, j;
@@ -196,16 +204,18 @@ static void checkasm_check_hevc_qpel_uni_w(void) · 21 unmodified lines
196 for (wx = weights; *wx >= 0; wx++) {204 for (wx = weights; *wx >= 0; wx++) {
197 for (ox = offsets; *ox >= 0; ox++) {205 for (ox = offsets; *ox >= 0; ox++) {
198 randomize_buffers();206 randomize_buffers();
199 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,207 CLEAR_PIXEL_RECT(dst0);
208 CLEAR_PIXEL_RECT(dst1);
209 call_ref(dst0, dst0_stride,
200 src0, sizes[size] * SIZEOF_PIXEL,210 src0, sizes[size] * SIZEOF_PIXEL,
201 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);211 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
202 call_new(dst1, sizes[size] * SIZEOF_PIXEL,212 call_new(dst1, dst1_stride,
203 src1, sizes[size] * SIZEOF_PIXEL,213 src1, sizes[size] * SIZEOF_PIXEL,
204 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);214 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
205 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,215 checkasm_check_pixel_padded(dst0, dst0_stride,
206 dst1, sizes[size] * SIZEOF_PIXEL,216 dst1, dst1_stride,
207 size[sizes], size[sizes], "dst");217 size[sizes], size[sizes], "dst");
208 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,218 bench_new(dst1, dst1_stride,
209 src1, sizes[size] * SIZEOF_PIXEL,219 src1, sizes[size] * SIZEOF_PIXEL,
210 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);220 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
211 }221 }
@@ -223,8 +233,8 @@ static void checkasm_check_hevc_qpel_bi(void) · 11 unmodified lines
223{233{
224 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);234 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);
225 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);235 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);
226 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);236 PIXEL_RECT(dst0, 64, 64);
227 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);237 PIXEL_RECT(dst1, 64, 64);
228 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);238 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);
229 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);239 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);
230 240
@@ -251,16 +261,18 @@ static void checkasm_check_hevc_qpel_bi(void) · 20 unmodified lines
251 if (check_func(h.put_hevc_qpel_bi[size][j][i],261 if (check_func(h.put_hevc_qpel_bi[size][j][i],
252 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {262 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
253 randomize_buffers_ref();263 randomize_buffers_ref();
254 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,264 CLEAR_PIXEL_RECT(dst0);
265 CLEAR_PIXEL_RECT(dst1);
266 call_ref(dst0, dst0_stride,
255 src0, sizes[size] * SIZEOF_PIXEL,267 src0, sizes[size] * SIZEOF_PIXEL,
256 ref0, sizes[size], i, j, sizes[size]);268 ref0, sizes[size], i, j, sizes[size]);
257 call_new(dst1, sizes[size] * SIZEOF_PIXEL,269 call_new(dst1, dst1_stride,
258 src1, sizes[size] * SIZEOF_PIXEL,270 src1, sizes[size] * SIZEOF_PIXEL,
259 ref1, sizes[size], i, j, sizes[size]);271 ref1, sizes[size], i, j, sizes[size]);
260 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,272 checkasm_check_pixel_padded(dst0, dst0_stride,
261 dst1, sizes[size] * SIZEOF_PIXEL,273 dst1, dst1_stride,
262 size[sizes], size[sizes], "dst");274 size[sizes], size[sizes], "dst");
263 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,275 bench_new(dst1, dst1_stride,
264 src1, sizes[size] * SIZEOF_PIXEL,276 src1, sizes[size] * SIZEOF_PIXEL,
265 ref1, sizes[size], i, j, sizes[size]);277 ref1, sizes[size], i, j, sizes[size]);
266 }278 }
@@ -275,8 +287,8 @@ static void checkasm_check_hevc_qpel_bi_w(void) · 8 unmodified lines
275{287{
276 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);288 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE + SRC_EXTRA]);
277 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);289 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE + SRC_EXTRA]);
278 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);290 PIXEL_RECT(dst0, 64, 64);
279 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);291 PIXEL_RECT(dst1, 64, 64);
280 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);292 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);
281 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);293 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);
282 294
@@ -308,16 +320,18 @@ static void checkasm_check_hevc_qpel_bi_w(void) · 25 unmodified lines
308 for (wx = weights; *wx >= 0; wx++) {320 for (wx = weights; *wx >= 0; wx++) {
309 for (ox = offsets; *ox >= 0; ox++) {321 for (ox = offsets; *ox >= 0; ox++) {
310 randomize_buffers_ref();322 randomize_buffers_ref();
311 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,323 CLEAR_PIXEL_RECT(dst0);
324 CLEAR_PIXEL_RECT(dst1);
325 call_ref(dst0, dst0_stride,
312 src0, sizes[size] * SIZEOF_PIXEL,326 src0, sizes[size] * SIZEOF_PIXEL,
313 ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);327 ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
314 call_new(dst1, sizes[size] * SIZEOF_PIXEL,328 call_new(dst1, dst1_stride,
315 src1, sizes[size] * SIZEOF_PIXEL,329 src1, sizes[size] * SIZEOF_PIXEL,
316 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);330 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
317 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,331 checkasm_check_pixel_padded(dst0, dst0_stride,
318 dst1, sizes[size] * SIZEOF_PIXEL,332 dst1, dst1_stride,
319 size[sizes], size[sizes], "dst");333 size[sizes], size[sizes], "dst");
320 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,334 bench_new(dst1, dst1_stride,
321 src1, sizes[size] * SIZEOF_PIXEL,335 src1, sizes[size] * SIZEOF_PIXEL,
322 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);336 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
323 }337 }
@@ -364,6 +378,7 @@ static void checkasm_check_hevc_epel(void) · 40 unmodified lines
364 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {378 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
365 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;379 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;
366 randomize_buffers();380 randomize_buffers();
381 randomize_buffers_dst();
367 call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);382 call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);
368 call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);383 call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]);
369 checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t),384 checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t),
@@ -382,8 +397,8 @@ static void checkasm_check_hevc_epel_uni(void) · 12 unmodified lines
382{397{
383 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);398 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);
384 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);399 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);
385 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);400 PIXEL_RECT(dst0, 64, 64);
386 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);401 PIXEL_RECT(dst1, 64, 64);
387 402
388 HEVCDSPContext h;403 HEVCDSPContext h;
389 int size, bit_depth, i, j;404 int size, bit_depth, i, j;
@@ -407,16 +422,18 @@ static void checkasm_check_hevc_epel_uni(void) · 17 unmodified lines
407 if (check_func(h.put_hevc_epel_uni[size][j][i],422 if (check_func(h.put_hevc_epel_uni[size][j][i],
408 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {423 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
409 randomize_buffers();424 randomize_buffers();
410 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,425 CLEAR_PIXEL_RECT(dst0);
426 CLEAR_PIXEL_RECT(dst1);
427 call_ref(dst0, dst0_stride,
411 src0, sizes[size] * SIZEOF_PIXEL,428 src0, sizes[size] * SIZEOF_PIXEL,
412 sizes[size], i, j, sizes[size]);429 sizes[size], i, j, sizes[size]);
413 call_new(dst1, sizes[size] * SIZEOF_PIXEL,430 call_new(dst1, dst1_stride,
414 src1, sizes[size] * SIZEOF_PIXEL,431 src1, sizes[size] * SIZEOF_PIXEL,
415 sizes[size], i, j, sizes[size]);432 sizes[size], i, j, sizes[size]);
416 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,433 checkasm_check_pixel_padded(dst0, dst0_stride,
417 dst1, sizes[size] * SIZEOF_PIXEL,434 dst1, dst1_stride,
418 size[sizes], size[sizes], "dst");435 size[sizes], size[sizes], "dst");
419 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,436 bench_new(dst1, dst1_stride,
420 src1, sizes[size] * SIZEOF_PIXEL,437 src1, sizes[size] * SIZEOF_PIXEL,
421 sizes[size], i, j, sizes[size]);438 sizes[size], i, j, sizes[size]);
422 }439 }
@@ -431,8 +448,8 @@ static void checkasm_check_hevc_epel_uni_w(void) · 8 unmodified lines
431{448{
432 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);449 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);
433 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);450 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);
434 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);451 PIXEL_RECT(dst0, 64, 64);
435 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);452 PIXEL_RECT(dst1, 64, 64);
436 453
437 HEVCDSPContext h;454 HEVCDSPContext h;
438 int size, bit_depth, i, j;455 int size, bit_depth, i, j;
@@ -460,16 +477,18 @@ static void checkasm_check_hevc_epel_uni_w(void) · 21 unmodified lines
460 for (wx = weights; *wx >= 0; wx++) {477 for (wx = weights; *wx >= 0; wx++) {
461 for (ox = offsets; *ox >= 0; ox++) {478 for (ox = offsets; *ox >= 0; ox++) {
462 randomize_buffers();479 randomize_buffers();
463 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,480 CLEAR_PIXEL_RECT(dst0);
481 CLEAR_PIXEL_RECT(dst1);
482 call_ref(dst0, dst0_stride,
464 src0, sizes[size] * SIZEOF_PIXEL,483 src0, sizes[size] * SIZEOF_PIXEL,
465 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);484 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
466 call_new(dst1, sizes[size] * SIZEOF_PIXEL,485 call_new(dst1, dst1_stride,
467 src1, sizes[size] * SIZEOF_PIXEL,486 src1, sizes[size] * SIZEOF_PIXEL,
468 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);487 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
469 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,488 checkasm_check_pixel_padded(dst0, dst0_stride,
470 dst1, sizes[size] * SIZEOF_PIXEL,489 dst1, dst1_stride,
471 size[sizes], size[sizes], "dst");490 size[sizes], size[sizes], "dst");
472 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,491 bench_new(dst1, dst1_stride,
473 src1, sizes[size] * SIZEOF_PIXEL,492 src1, sizes[size] * SIZEOF_PIXEL,
474 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);493 sizes[size], *denom, *wx, *ox, i, j, sizes[size]);
475 }494 }
@@ -487,8 +506,8 @@ static void checkasm_check_hevc_epel_bi(void) · 11 unmodified lines
487{506{
488 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);507 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);
489 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);508 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);
490 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);509 PIXEL_RECT(dst0, 64, 64);
491 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);510 PIXEL_RECT(dst1, 64, 64);
492 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);511 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);
493 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);512 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);
494 513
@@ -515,16 +534,18 @@ static void checkasm_check_hevc_epel_bi(void) · 20 unmodified lines
515 if (check_func(h.put_hevc_epel_bi[size][j][i],534 if (check_func(h.put_hevc_epel_bi[size][j][i],
516 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {535 "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) {
517 randomize_buffers_ref();536 randomize_buffers_ref();
518 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,537 CLEAR_PIXEL_RECT(dst0);
538 CLEAR_PIXEL_RECT(dst1);
539 call_ref(dst0, dst0_stride,
519 src0, sizes[size] * SIZEOF_PIXEL,540 src0, sizes[size] * SIZEOF_PIXEL,
520 ref0, sizes[size], i, j, sizes[size]);541 ref0, sizes[size], i, j, sizes[size]);
521 call_new(dst1, sizes[size] * SIZEOF_PIXEL,542 call_new(dst1, dst1_stride,
522 src1, sizes[size] * SIZEOF_PIXEL,543 src1, sizes[size] * SIZEOF_PIXEL,
523 ref1, sizes[size], i, j, sizes[size]);544 ref1, sizes[size], i, j, sizes[size]);
524 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,545 checkasm_check_pixel_padded(dst0, dst0_stride,
525 dst1, sizes[size] * SIZEOF_PIXEL,546 dst1, dst1_stride,
526 size[sizes], size[sizes], "dst");547 size[sizes], size[sizes], "dst");
527 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,548 bench_new(dst1, dst1_stride,
528 src1, sizes[size] * SIZEOF_PIXEL,549 src1, sizes[size] * SIZEOF_PIXEL,
529 ref1, sizes[size], i, j, sizes[size]);550 ref1, sizes[size], i, j, sizes[size]);
530 }551 }
@@ -539,8 +560,8 @@ static void checkasm_check_hevc_epel_bi_w(void) · 8 unmodified lines
539{560{
540 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);561 LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);
541 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);562 LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);
542 LOCAL_ALIGNED_32(uint8_t, dst0, [BUF_SIZE]);563 PIXEL_RECT(dst0, 64, 64);
543 LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]);564 PIXEL_RECT(dst1, 64, 64);
544 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);565 LOCAL_ALIGNED_32(int16_t, ref0, [BUF_SIZE]);
545 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);566 LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]);
546 567
@@ -572,16 +593,18 @@ static void checkasm_check_hevc_epel_bi_w(void) · 25 unmodified lines
572 for (wx = weights; *wx >= 0; wx++) {593 for (wx = weights; *wx >= 0; wx++) {
573 for (ox = offsets; *ox >= 0; ox++) {594 for (ox = offsets; *ox >= 0; ox++) {
574 randomize_buffers_ref();595 randomize_buffers_ref();
575 call_ref(dst0, sizes[size] * SIZEOF_PIXEL,596 CLEAR_PIXEL_RECT(dst0);
597 CLEAR_PIXEL_RECT(dst1);
598 call_ref(dst0, dst0_stride,
576 src0, sizes[size] * SIZEOF_PIXEL,599 src0, sizes[size] * SIZEOF_PIXEL,
577 ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);600 ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
578 call_new(dst1, sizes[size] * SIZEOF_PIXEL,601 call_new(dst1, dst1_stride,
579 src1, sizes[size] * SIZEOF_PIXEL,602 src1, sizes[size] * SIZEOF_PIXEL,
580 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);603 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
581 checkasm_check_pixel(dst0, sizes[size] * SIZEOF_PIXEL,604 checkasm_check_pixel_padded(dst0, dst0_stride,
582 dst1, sizes[size] * SIZEOF_PIXEL,605 dst1, dst1_stride,
583 size[sizes], size[sizes], "dst");606 size[sizes], size[sizes], "dst");
584 bench_new(dst1, sizes[size] * SIZEOF_PIXEL,607 bench_new(dst1, dst1_stride,
585 src1, sizes[size] * SIZEOF_PIXEL,608 src1, sizes[size] * SIZEOF_PIXEL,
586 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);609 ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]);
587 }610 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t