Go to the documentation of this file.
27 #ifndef CHECKASM_TESTS_H
28 #define CHECKASM_TESTS_H
42 SELFTEST_CPU_FLAG_X86 = 1 << 1,
43 SELFTEST_CPU_FLAG_MMX = 1 << 2,
44 SELFTEST_CPU_FLAG_SSE2 = 1 << 3,
45 SELFTEST_CPU_FLAG_AVX2 = 1 << 4,
46 SELFTEST_CPU_FLAG_AVX512 = 1 << 5,
48 SELFTEST_CPU_FLAG_RVI = 1 << 1,
49 SELFTEST_CPU_FLAG_RVF = 1 << 2,
50 SELFTEST_CPU_FLAG_RVV = 1 << 3,
52 SELFTEST_CPU_FLAG_AARCH64 = 1 << 1,
54 SELFTEST_CPU_FLAG_ARM = 1 << 1,
55 SELFTEST_CPU_FLAG_VFP = 1 << 2,
56 SELFTEST_CPU_FLAG_VFPD32 = 1 << 3,
60 #define DEF_GETTER(FLAG, NAME, func_type, fallback) \
61 static func_type *get_##NAME(void) \
63 return (checkasm_get_cpu_flags() & FLAG) ? selftest_##NAME : fallback; \
78 #define DEF_COPY_FUNC(NAME) \
79 void selftest_##NAME(uint8_t *dst, const uint8_t *src, size_t size)
81 #define DEF_COPY_GETTER(FLAG, NAME) DEF_GETTER(FLAG, NAME, copy_func, selftest_copy_c)
97 #define DEF_NOOP_FUNC(NAME) void selftest_##NAME(int unused)
98 #define DEF_NOOP_GETTER(FLAG, NAME) DEF_GETTER(FLAG, NAME, noop_func, NULL)
105 #define DEF_FLOAT_FUNC(NAME) float selftest_##NAME(float input)
void selftest_check_riscv(void)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
#define DEF_COPY_FUNC(NAME)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
void selftest_test_float(float_func *func, const char *name, float input)
static av_always_inline void copy_c(uint8_t *restrict dst, ptrdiff_t dst_stride, const uint8_t *restrict src, ptrdiff_t src_stride, int w, int h)
void selftest_check_aarch64(void)
void selftest_check_arm(void)
uint64_t selftest_get_cpu_flags_arm(void)
void selftest_check_x86(void)
void selftest_test_noop(noop_func *func, const char *name)
@ SELFTEST_CPU_FLAG_BAD_C
uint64_t selftest_get_cpu_flags_aarch64(void)
void() noop_func(int unused)
Do nothing.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Test writing API for checkasm.
void selftest_test_copy(copy_func *func, const char *name, int min_width)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Utility functions for checkasm tests.
double() double_func(double input)
float() float_func(float input)
uint64_t selftest_get_cpu_flags_x86(void)
void selftest_check_generic(void)
void() copy_func(uint8_t *dst, const uint8_t *src, size_t size)
Copy size (power-of-two) bytes from aligned buffers src to dst.
uint64_t selftest_get_cpu_flags_riscv(void)