ref: 578489df717aebdd941989c96c73eea933b58020
parent: 764e8ea1a1b21bfe936d9eb960df92d55c88ca6e
author: Martin Storsjö <martin@martin.st>
date: Sat Jun 29 19:39:49 EDT 2019
checkasm: loopfilter: Use checkasm_check*
--- a/tests/checkasm/loopfilter.c
+++ b/tests/checkasm/loopfilter.c
@@ -104,17 +104,21 @@
pixel *a_dst, *c_dst;
ptrdiff_t stride, b4_stride;
+ int w, h;
if (dir) {
a_dst = a_dst_mem + 128 * 8;
c_dst = c_dst_mem + 128 * 8;
- stride = 128 * sizeof(pixel);
+ w = 128;
+ h = 16;
b4_stride = 32;
} else {
a_dst = a_dst_mem + 8;
c_dst = c_dst_mem + 8;
- stride = 16 * sizeof(pixel);
+ w = 16;
+ h = 128;
b4_stride = 2;
}
+ stride = w * sizeof(pixel);
Av1FilterLUT lut;
const int sharp = rnd() & 7;
@@ -177,8 +181,9 @@
call_new(a_dst, stride,
vmask, (const uint8_t(*)[4]) &l[dir ? 32 : 1][lf_idx], b4_stride,
&lut, n_blks HIGHBD_TAIL_SUFFIX);
- if (memcmp(c_dst_mem, a_dst_mem, 128 * 16 * sizeof(*a_dst))) fail();
+ checkasm_check_pixel(c_dst_mem, stride, a_dst_mem, stride,
+ w, h, "dst");
bench_new(a_dst, stride,
vmask, (const uint8_t(*)[4]) &l[dir ? 32 : 1][lf_idx], b4_stride,
&lut, n_blks HIGHBD_TAIL_SUFFIX);