31 #define SIZE_PER_UNIT (WIDTH * HEIGHT)
32 #define BUF_SIZE (BUF_UNITS * SIZE_PER_UNIT)
34 #define randomize_buffers() \
37 for (i = 0; i < HEIGHT; i++) { \
38 for (j = 0; j < WIDTH; j++) { \
39 top1[i * WIDTH + j] = \
40 top2[i * WIDTH + j] = i; \
41 bot1[i * WIDTH + j] = \
42 bot2[i * WIDTH + j] = j; \
45 for (i = 0; i < SIZE_PER_UNIT; i += 4) { \
47 AV_WN32A(dst1 + i, r); \
48 AV_WN32A(dst2 + i, r); \
50 for (; i < BUF_SIZE; i += 4) { \
52 AV_WN32A(top1 + i, r); \
53 AV_WN32A(top2 + i, r); \
55 AV_WN32A(bot1 + i, r); \
56 AV_WN32A(bot2 + i, r); \
58 AV_WN32A(dst1 + i, r); \
59 AV_WN32A(dst2 + i, r); \
63 #define check_blend_func() \
66 declare_func(void, const uint8_t *top, ptrdiff_t top_linesize, \
67 const uint8_t *bottom, ptrdiff_t bottom_linesize, \
68 uint8_t *dst, ptrdiff_t dst_linesize, \
69 ptrdiff_t width, ptrdiff_t height, \
70 struct FilterParams *param, double *values); \
72 for (i = 0; i < BUF_UNITS - 1; i++) { \
73 int src_offset = i * SIZE_PER_UNIT + i; \
74 int dst_offset = i * SIZE_PER_UNIT; \
75 randomize_buffers(); \
76 call_ref(top1 + src_offset, WIDTH, bot1 + src_offset, WIDTH, \
77 dst1 + dst_offset, WIDTH, WIDTH, HEIGHT, ¶m, NULL); \
78 call_new(top2 + src_offset, WIDTH, bot2 + src_offset, WIDTH, \
79 dst2 + dst_offset, WIDTH, WIDTH, HEIGHT, ¶m, NULL); \
80 if (memcmp(top1, top2, BUF_SIZE) || memcmp(bot1, bot2, BUF_SIZE) || memcmp(dst1, dst2, BUF_SIZE)) \
82 bench_new(top2 + src_offset, WIDTH, bot2 + src_offset, WIDTH, \
83 dst2, WIDTH, WIDTH, HEIGHT, ¶m, NULL); \
99 #define check_and_report(name, val) \
101 ff_blend_init(¶m, 0); \
102 if (check_func(param.blend, #name)) \
#define check_and_report(name, val)
common internal API header
static SDL_Surface * screen
void checkasm_check_blend(void)
common internal and external API header