32#define SIZE_PER_UNIT (WIDTH * HEIGHT)
33#define BUF_SIZE (BUF_UNITS * SIZE_PER_UNIT)
35#define randomize_buffers() \
38 for (i = 0; i < HEIGHT; i++) { \
39 for (j = 0; j < WIDTH; j++) { \
40 top1[i * WIDTH + j] = \
41 top2[i * WIDTH + j] = i; \
42 bot1[i * WIDTH + j] = \
43 bot2[i * WIDTH + j] = j; \
46 for (i = 0; i < SIZE_PER_UNIT; i += 4) { \
48 AV_WN32A(dst1 + i, r); \
49 AV_WN32A(dst2 + i, r); \
51 for (; i < BUF_SIZE; i += 4) { \
53 AV_WN32A(top1 + i, r); \
54 AV_WN32A(top2 + i, r); \
56 AV_WN32A(bot1 + i, r); \
57 AV_WN32A(bot2 + i, r); \
59 AV_WN32A(dst1 + i, r); \
60 AV_WN32A(dst2 + i, r); \
64#define check_blend_func(depth) \
67 declare_func(void, const uint8_t *top, ptrdiff_t top_linesize, \
68 const uint8_t *bottom, ptrdiff_t bottom_linesize, \
69 uint8_t *dst, ptrdiff_t dst_linesize, \
70 ptrdiff_t width, ptrdiff_t height, \
71 struct FilterParams *param, struct SliceParams *sliceparam); \
74 for (i = 0; i < BUF_UNITS - 1; i++) { \
75 int src_offset = i * SIZE_PER_UNIT + (BUF_UNITS - 1 - i) * depth; \
76 int dst_offset = i * SIZE_PER_UNIT; \
77 randomize_buffers(); \
78 call_ref(top1 + src_offset, w, bot1 + src_offset, w, \
79 dst1 + dst_offset, w, w, HEIGHT, ¶m, NULL); \
80 call_new(top2 + src_offset, w, bot2 + src_offset, w, \
81 dst2 + dst_offset, w, w, HEIGHT, ¶m, NULL); \
82 if (memcmp(top1, top2, BUF_SIZE) || memcmp(bot1, bot2, BUF_SIZE) || memcmp(dst1, dst2, BUF_SIZE)) \
85 bench_new(top2, w / 4, bot2, w / 4, dst2, w / 4, \
86 w / 4, HEIGHT / 4, ¶m, NULL); \
101#define check_and_report(name, val, depth) \
103 ff_blend_init(¶m, depth * 8); \
104 if (check_func(param.blend, #name)) \
105 check_blend_func(depth);
static SoftFloat_IEEE754 multiply(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b)
multiply two softfloats and handle the rounding off
common internal and external API header
common internal API header
Memory handling functions.
#define check_and_report(name, val, depth)
void checkasm_check_blend(void)
static void difference(IPlane *g, IPlane *f, int y0, int y1)