Go to the documentation of this file.
30 #define WIDTH_PADDED (WIDTH + 16)
31 #define BUFFER_SIZE (WIDTH_PADDED * HEIGHT)
34 #define randomize_plane(buf, type) \
38 for (h = 0; h < HEIGHT; h++) { \
39 for (w = 0; w < WIDTH; w++) \
40 tmp[w] = rnd() & 0xFF; \
41 tmp += WIDTH_PADDED; \
45 #define cmp_plane(buf0, buf1, s) \
48 for (h = 0; h < HEIGHT; h++) { \
49 if (memcmp(buf0 + h*WIDTH_PADDED, \
50 buf1 + h*WIDTH_PADDED, WIDTH *s)) \
56 #define CHECK_RESTORE(type)\
57 LOCAL_ALIGNED_32(type, src_r0, [BUFFER_SIZE]); \
58 LOCAL_ALIGNED_32(type, src_g0, [BUFFER_SIZE]); \
59 LOCAL_ALIGNED_32(type, src_b0, [BUFFER_SIZE]); \
60 LOCAL_ALIGNED_32(type, src_r1, [BUFFER_SIZE]); \
61 LOCAL_ALIGNED_32(type, src_g1, [BUFFER_SIZE]); \
62 LOCAL_ALIGNED_32(type, src_b1, [BUFFER_SIZE]); \
63 declare_func(void, type *src_r, type *src_g, type *src_b, \
64 ptrdiff_t linesize_r, ptrdiff_t linesize_g, \
65 ptrdiff_t linesize_b, int width, int height); \
66 memset(src_r0, 0, BUFFER_SIZE * sizeof(type)); \
67 memset(src_g0, 0, BUFFER_SIZE * sizeof(type)); \
68 memset(src_b0, 0, BUFFER_SIZE * sizeof(type)); \
69 randomize_plane(src_r0, type); \
70 randomize_plane(src_g0, type); \
71 randomize_plane(src_b0, type); \
72 memcpy(src_r1, src_r0, BUFFER_SIZE * sizeof(type)); \
73 memcpy(src_g1, src_g0, BUFFER_SIZE * sizeof(type)); \
74 memcpy(src_b1, src_b0, BUFFER_SIZE * sizeof(type)); \
75 call_ref(src_r0, src_g0, src_b0, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT);\
76 call_new(src_r1, src_g1, src_b1, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT);\
77 cmp_plane(src_r0, src_r1, sizeof(type)); \
78 cmp_plane(src_g0, src_g1, sizeof(type)); \
79 cmp_plane(src_b0, src_b1, sizeof(type)); \
80 bench_new(src_r1, src_g1, src_b1, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT)
96 if (
check_func(
h.restore_rgb_planes,
"restore_rgb_planes"))
99 report(
"restore_rgb_planes");
101 if (
check_func(
h.restore_rgb_planes10,
"restore_rgb_planes10"))
104 report(
"restore_rgb_planes10");
static void check_restore_rgb_planes(void)
#define check_func(func,...)
#define CHECK_RESTORE(type)
void checkasm_check_utvideodsp(void)
static void check_restore_rgb_planes10(void)
av_cold void ff_utvideodsp_init(UTVideoDSPContext *c)