28 #define randomize_buffers(buf0, buf1, size) \
30 char *b0 = (char*)buf0, *b1 = (char*)buf1; \
31 for (size_t k = 0; k < (size & ~3); k += 4) { \
33 AV_WN32A(b0 + k, r); \
34 AV_WN32A(b1 + k, r); \
36 for (size_t k = size & ~3; k < size; ++k) \
37 b0[k] = b1[k] = rnd(); \
50 const uint8_t *
a,
const uint8_t *
b,
63 const uint8_t *
src0 = src0_buf + src0_offset, *
src1 = src1_buf + src1_offset;
64 uint8_t *dst_new = dstbuf_new, *dst_ref = dstbuf_ref;
80 if (memcmp(dstbuf_new, dstbuf_ref,
sizeof(dstbuf_new)))
103 uint8_t *dst_new = dstbuf_new, *dst_ref = dstbuf_ref;
107 dst_new += (NB_LINES - 1) *
stride;
108 dst_ref += (NB_LINES - 1) *
stride;
115 block_new[k] = block_ref[k] =
r;
120 if (memcmp(dstbuf_new, dstbuf_ref,
sizeof(dstbuf_new)) ||
121 memcmp(block_new, block_ref,
sizeof(block_new)))
132 HORIZONTAL_BUF_SIZE = ((8 - 1) *
MAX_STRIDE + 4 + 7 ),
134 VERTICAL_BUF_SIZE = ((4 - 1) *
MAX_STRIDE + 8 + 7 ),
141 int *
const bounding_values = bounding_values_array + 127;
142 static const struct {
145 int lines_above, lines_below;
146 int pixels_left, pixels_right;
150 #define TEST(NAME) .name = #NAME, .offset = offsetof(VP3DSPContext, NAME)
151 {
TEST(v_loop_filter_unaligned), 2, 1, 0, 7, 1, 0 },
152 {
TEST(h_loop_filter_unaligned), 0, 7, 2, 1, 1, 1 },
158 int filter_limit =
rnd() % 128;
163 void (*
loop_filter)(uint8_t *, ptrdiff_t,
int*) = *(
void(**)(uint8_t *, ptrdiff_t,
int*))((
const char*)vp3dsp +
tests[
i].
offset);
166 uint8_t *buf0 =
tests[
i].horizontal ? hor_buf0 : ver_buf0;
167 uint8_t *buf1 =
tests[
i].horizontal ? hor_buf1 : ver_buf1;
168 size_t bufsize =
tests[
i].horizontal ? HORIZONTAL_BUF_SIZE : VERTICAL_BUF_SIZE;
186 if (memcmp(buf0, buf1, bufsize))
200 report(
"put_no_rnd_pixels_l2");
202 #define IDCT_TEST(func, mask) \
203 if (check_func(vp3dsp.func, #func)) \
204 vp3_check_idct(mask); \