Go to the documentation of this file.
49 #include "config_components.h"
52 # define _GNU_SOURCE // for syscall (performance monitoring API), strsignal()
71 #include <sys/prctl.h>
74 #if defined(_WIN32) && !defined(SIGBUS)
79 #if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
81 #define COLOR_RED FOREGROUND_RED
82 #define COLOR_GREEN FOREGROUND_GREEN
83 #define COLOR_YELLOW (FOREGROUND_RED|FOREGROUND_GREEN)
87 #define COLOR_YELLOW 3
104 #if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL
107 void (*checkasm_checked_call)(
void *
func,
int dummy, ...) = checkasm_checked_call_novfp;
114 static const struct {
122 #if CONFIG_AAC_DECODER
126 #if CONFIG_AAC_ENCODER
132 #if CONFIG_ALAC_DECODER
135 #if CONFIG_APV_DECODER
147 #if CONFIG_CAVS_DECODER
150 #if CONFIG_DCA_DECODER
154 #if CONFIG_DIRAC_DECODER
157 #if CONFIG_EXR_DECODER
163 #if CONFIG_FLAC_DECODER
166 #if CONFIG_FMTCONVERT
175 #if CONFIG_H264CHROMA
187 #if CONFIG_HEVC_DECODER
198 #if CONFIG_HUFFYUVDSP
201 #if CONFIG_HUFFYUVENCDSP
207 #if CONFIG_JPEG2000_DECODER
213 #if CONFIG_HUFFYUVDSP
216 #if CONFIG_LLVIDENCDSP
225 #if CONFIG_MPEG4_DECODER
231 #if CONFIG_MPEGVIDEOENCDSP
234 #if CONFIG_OPUS_DECODER
237 #if CONFIG_PIXBLOCKDSP
240 #if CONFIG_PNG_DECODER
249 #if CONFIG_RV40_DECODER
252 #if CONFIG_SBC_ENCODER
255 #if CONFIG_SVQ1_ENCODER
258 #if CONFIG_TAK_DECODER
261 #if CONFIG_UTVIDEO_DECODER
264 #if CONFIG_V210_DECODER
267 #if CONFIG_V210_ENCODER
276 #if CONFIG_VP6_DECODER
282 #if CONFIG_VP9_DECODER
292 #if CONFIG_VORBIS_DECODER
295 #if CONFIG_VVC_DECODER
305 #if CONFIG_AFIR_FILTER
308 #if CONFIG_BLACKDETECT_FILTER
311 #if CONFIG_BLEND_FILTER
314 #if CONFIG_BWDIF_FILTER
317 #if CONFIG_COLORDETECT_FILTER
320 #if CONFIG_COLORSPACE_FILTER
326 #if CONFIG_FSPP_FILTER
329 #if CONFIG_GBLUR_FILTER
332 #if CONFIG_HFLIP_FILTER
335 #if CONFIG_IDET_FILTER
338 #if CONFIG_NLMEANS_FILTER
341 #if CONFIG_THRESHOLD_FILTER
344 #if CONFIG_SOBEL_FILTER
364 #if CONFIG_PIXELUTILS
376 static const struct {
506 if (llabs((
int64_t)x.
i - y.
i) <= max_ulp)
517 for (
i = 0;
i <
len;
i++) {
530 fprintf(stderr,
"test failed comparing %g with %g (abs diff=%g with EPS=%g)\n",
a,
b, abs_diff, eps);
540 for (
i = 0;
i <
len;
i++) {
553 unsigned max_ulp,
unsigned len)
557 for (
i = 0;
i <
len;
i++) {
566 double abs_diff =
fabs(
a -
b);
568 return abs_diff < eps;
576 for (
i = 0;
i <
len;
i++) {
589 #if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
591 static WORD org_attributes;
594 CONSOLE_SCREEN_BUFFER_INFO con_info;
595 con = GetStdHandle(STD_ERROR_HANDLE);
596 if (con && con != INVALID_HANDLE_VALUE && GetConsoleScreenBufferInfo(con, &con_info)) {
597 org_attributes = con_info.wAttributes;
603 SetConsoleTextAttribute(con, (org_attributes & 0xfff0) | (
color & 0x0f));
606 const char *term = getenv(
"TERM");
610 fprintf(stderr,
"\x1b[%d;3%dm", (
color & 0x08) >> 3,
color & 0x07);
614 vfprintf(stderr, fmt,
arg);
618 #if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
619 SetConsoleTextAttribute(con, org_attributes);
621 fprintf(stderr,
"\x1b[0m");
646 void *ptr = calloc(1,
size);
648 fprintf(stderr,
"checkasm: malloc failed\n");
662 return cpus[
i].suffix;
669 return *(
const uint16_t*)
a - *(
const uint16_t*)
b;
675 uint16_t nops[10000];
680 for (
i = 0;
i < 10000;
i++) {
686 qsort(nops, 10000,
sizeof(uint16_t),
cmp_nop);
687 for (
i = 2500;
i < 7500;
i++)
690 return nop_sum / 500;
696 const double cycles = (
double)(10 *
p->cycles) /
p->iterations -
state.nop_time;
698 return cycles / 32.0;
719 const char sep =
state.csv ?
',' :
'\t';
720 printf(
"%s%c%s%c%.1f\n",
f->name, sep,
724 const int pad_length = 10 + 50 -
726 const double ratio = decicycles ?
727 baseline / decicycles : 0.0;
729 decicycles / 10.0, ratio);
732 }
while ((v = v->
next));
741 const char *start =
a;
742 int ascii_diff, digit_diff;
744 for (; !(ascii_diff = *(
const unsigned char*)
a - *(
const unsigned char*)
b) && *
a;
a++,
b++);
757 f->child[dir^1] =
r->child[dir];
764 #define is_red(f) ((f) && !(f)->color)
773 f->child[0]->color =
f->child[1]->color = 1;
794 if (!
f->versions.func)
799 int name_length = strlen(
name);
801 memcpy(
f->name,
name, name_length + 1);
812 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
816 if (!
state.catch_signals)
817 return EXCEPTION_CONTINUE_SEARCH;
819 switch (e->ExceptionRecord->ExceptionCode) {
820 case EXCEPTION_FLT_DIVIDE_BY_ZERO:
821 case EXCEPTION_INT_DIVIDE_BY_ZERO:
824 case EXCEPTION_ILLEGAL_INSTRUCTION:
825 case EXCEPTION_PRIV_INSTRUCTION:
828 case EXCEPTION_ACCESS_VIOLATION:
829 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
830 case EXCEPTION_DATATYPE_MISALIGNMENT:
831 case EXCEPTION_STACK_OVERFLOW:
834 case EXCEPTION_IN_PAGE_ERROR:
838 return EXCEPTION_CONTINUE_SEARCH;
840 state.catch_signals = 0;
842 return EXCEPTION_CONTINUE_EXECUTION;
845 #elif !defined(_WASI_EMULATED_SIGNAL)
850 .sa_flags = SA_RESETHAND,
854 if (
state.catch_signals) {
855 state.catch_signals = 0;
865 const char *wild = strchr(pattern,
'*');
867 const size_t len = wild - pattern;
868 if (strncmp(str, pattern,
len))
return 1;
869 while (*++wild ==
'*');
870 if (!*wild)
return 0;
875 return strcmp(str, pattern);
881 int old_cpu_flag =
state.cpu_flag;
883 flag |= old_cpu_flag;
888 if (!
flag ||
state.cpu_flag != old_cpu_flag) {
904 if (
state.cpu_flag_name) {
910 #if CONFIG_LINUX_PERF
911 static int bench_init_linux(
void)
913 struct perf_event_attr attr = {
914 .type = PERF_TYPE_HARDWARE,
915 .size =
sizeof(
struct perf_event_attr),
916 .
config = PERF_COUNT_HW_CPU_CYCLES,
925 fprintf(stderr,
"benchmarking with Linux Perf Monitoring API\n");
927 state.sysfd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0);
928 if (
state.sysfd == -1) {
929 perror(
"perf_event_open");
934 #elif CONFIG_MACOS_KPERF
935 static int bench_init_kperf(
void)
949 fprintf(stderr,
"checkasm: unable to execute platform specific timer\n");
952 fprintf(stderr,
"benchmarking with native FFmpeg timers\n");
955 fprintf(stderr,
"checkasm: --bench is not supported on your system\n");
963 #if CONFIG_LINUX_PERF
964 int ret = bench_init_linux();
965 #elif CONFIG_MACOS_KPERF
966 int ret = bench_init_kperf();
974 fprintf(stderr,
"nop: %d.%d\n",
state.nop_time/10,
state.nop_time%10);
980 #if CONFIG_LINUX_PERF
988 "Usage: %s [options...] [seed]\n"
989 " --test=<pattern> Run specific test.\n"
990 " --bench Run benchmark.\n"
991 " --csv, --tsv Output results in rows of comma or tab separated values.\n"
992 " --runs=<ptwo> Manual number of benchmark iterations to run 2**<ptwo>.\n"
993 " --verbose Increase verbosity.\n",
998 int main(
int argc,
char *argv[])
1002 char arch_info_buf[50] =
"";
1005 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
1008 #elif !defined(_WASI_EMULATED_SIGNAL)
1014 #if HAVE_PRCTL && defined(PR_SET_UNALIGN)
1015 prctl(PR_SET_UNALIGN, PR_UNALIGN_SIGBUS);
1017 #if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL
1019 checkasm_checked_call = checkasm_checked_call_vfp;
1023 fprintf(stderr,
"checkasm: no tests to perform\n");
1027 for (
i = 1;
i < argc;
i++) {
1028 const char *
arg = argv[
i];
1032 if (!strncmp(
arg,
"--bench", 7)) {
1035 if (
arg[7] ==
'=') {
1037 state.bench_pattern_len = strlen(
state.bench_pattern);
1039 state.bench_pattern =
"*";
1040 }
else if (!strncmp(
arg,
"--test=", 7)) {
1042 }
else if (!strcmp(
arg,
"--csv")) {
1044 }
else if (!strcmp(
arg,
"--tsv")) {
1046 }
else if (!strcmp(
arg,
"--verbose") || !strcmp(
arg,
"-v")) {
1048 }
else if (!strncmp(
arg,
"--runs=", 7)) {
1049 l = strtoul(
arg + 7, &end, 10);
1052 fprintf(stderr,
"checkasm: error: runs exponent must be within the range 0 <= 30\n");
1057 return usage(argv[0]);
1059 }
else if ((l = strtoul(
arg, &end, 10)) <= UINT_MAX &&
1063 return usage(argv[0]);
1067 #if ARCH_AARCH64 && HAVE_SVE
1069 snprintf(arch_info_buf,
sizeof(arch_info_buf),
1070 "SVE %d bits, ", 8 * ff_aarch64_sve_length());
1072 #if ARCH_AARCH64 && HAVE_SME
1075 "SME %d bits, ", 8 * ff_aarch64_sme_length());
1077 #if ARCH_RISCV && HAVE_RVV
1079 snprintf(arch_info_buf,
sizeof (arch_info_buf),
1080 "%zu-bit vectors, ", 8 * ff_get_rv_vlenb());
1082 fprintf(stderr,
"checkasm: %susing random seed %u\n", arch_info_buf,
seed);
1085 if (
state.bench_pattern)
1089 for (
i = 0;
cpus[
i].flag;
i++)
1092 if (
state.num_failed) {
1093 fprintf(stderr,
"checkasm: %d of %d tests have failed\n",
state.num_failed,
state.num_checked);
1096 fprintf(stderr,
"checkasm: all %d tests passed\n",
state.num_checked);
1097 if (
state.bench_pattern) {
1122 if (!
func || name_length <= 0 || name_length >=
sizeof(name_buf))
1126 state.funcs->color = 1;
1127 v = &
state.current_func->versions;
1140 }
while ((v = v->
next));
1148 state.current_func_ver = v;
1151 state.num_checked++;
1159 return !
state.num_failed &&
state.bench_pattern &&
1167 if (
state.current_func_ver &&
state.current_func_ver->cpu &&
1168 state.current_func_ver->ok)
1173 fprintf(stderr,
" %s_%s (",
state.current_func->name,
cpu_suffix(
state.current_func_ver->cpu));
1175 vfprintf(stderr, msg,
arg);
1177 fprintf(stderr,
")\n");
1179 state.current_func_ver->ok = 0;
1182 return state.verbose;
1186 state.catch_signals = enabled;
1195 s == SIGILL ?
"illegal instruction" :
1196 s == SIGBUS ?
"bus error" :
1197 "segmentation fault");
1207 memset(perf, 0,
sizeof(*perf));
1215 static int prev_checked, prev_failed, max_length;
1217 if (
state.num_checked > prev_checked) {
1218 int pad_length = max_length + 4;
1222 pad_length -= fprintf(stderr,
" - %s.",
state.current_test_name);
1224 pad_length -= vfprintf(stderr,
name,
arg);
1226 fprintf(stderr,
"%*c",
FFMAX(pad_length, 0) + 2,
'[');
1228 if (
state.num_failed == prev_failed)
1232 fprintf(stderr,
"]\n");
1234 prev_checked =
state.num_checked;
1235 prev_failed =
state.num_failed;
1236 }
else if (!
state.cpu_flag) {
1238 int length = strlen(
state.current_test_name);
1245 if (length > max_length)
1246 max_length = length;
1251 const char *
name,
int w,
int h,
1259 fprintf(stderr,
"%s (%dx%d):\n",
name,
w,
h);
1263 #define DEF_CHECKASM_CHECK_BODY(compare, type, fmt) \
1265 int64_t aligned_w = (w - 1LL + align_w) & ~(align_w - 1); \
1266 int64_t aligned_h = (h - 1LL + align_h) & ~(align_h - 1); \
1269 av_assert0(aligned_w == (int32_t)aligned_w);\
1270 av_assert0(aligned_h == (int32_t)aligned_h);\
1271 stride1 /= sizeof(*buf1); \
1272 stride2 /= sizeof(*buf2); \
1273 for (y = 0; y < h; y++) \
1274 if (!compare(&buf1[y*stride1], &buf2[y*stride2], w)) \
1277 if (check_err(file, line, name, w, h, &err)) \
1279 for (y = 0; y < h; y++) { \
1280 for (int x = 0; x < w; x++) \
1281 fprintf(stderr, " " fmt, buf1[x]); \
1282 fprintf(stderr, " "); \
1283 for (int x = 0; x < w; x++) \
1284 fprintf(stderr, " " fmt, buf2[x]); \
1285 fprintf(stderr, " "); \
1286 for (int x = 0; x < w; x++) \
1287 fprintf(stderr, "%c", buf1[x] != buf2[x] ? 'x' : '.'); \
1290 fprintf(stderr, "\n"); \
1292 buf1 -= h*stride1; \
1293 buf2 -= h*stride2; \
1295 for (y = -padding; y < 0; y++) \
1296 if (!compare(&buf1[y*stride1 - padding], &buf2[y*stride2 - padding], \
1298 if (check_err(file, line, name, w, h, &err)) \
1300 fprintf(stderr, " overwrite above\n"); \
1303 for (y = aligned_h; y < aligned_h + padding; y++) \
1304 if (!compare(&buf1[y*stride1 - padding], &buf2[y*stride2 - padding], \
1306 if (check_err(file, line, name, w, h, &err)) \
1308 fprintf(stderr, " overwrite below\n"); \
1311 for (y = 0; y < h; y++) \
1312 if (!compare(&buf1[y*stride1 - padding], &buf2[y*stride2 - padding], \
1314 if (check_err(file, line, name, w, h, &err)) \
1316 fprintf(stderr, " overwrite left\n"); \
1319 for (y = 0; y < h; y++) \
1320 if (!compare(&buf1[y*stride1 + aligned_w], &buf2[y*stride2 + aligned_w], \
1322 if (check_err(file, line, name, w, h, &err)) \
1324 fprintf(stderr, " overwrite right\n"); \
1330 #define cmp_int(a, b, len) (!memcmp(a, b, (len) * sizeof(*(a))))
1331 #define DEF_CHECKASM_CHECK_FUNC(type, fmt) \
1332 int checkasm_check_##type(const char *file, int line, \
1333 const type *buf1, ptrdiff_t stride1, \
1334 const type *buf2, ptrdiff_t stride2, \
1335 int w, int h, const char *name, \
1336 int align_w, int align_h, \
1339 DEF_CHECKASM_CHECK_BODY(cmp_int, type, fmt); \
1349 const
float *buf1, ptrdiff_t stride1,
1350 const
float *buf2, ptrdiff_t stride2,
1351 int w,
int h, const
char *
name,
1352 unsigned max_ulp,
int align_w,
int align_h,
1355 #define cmp_float(a, b, len) float_near_ulp_array(a, b, max_ulp, len)
void checkasm_check_nlmeans(void)
void checkasm_check_sw_gbrp(void)
void av_force_cpu_flags(int arg)
Disables cpu detection and forces the specified flags.
void checkasm_check_vp8dsp(void)
void checkasm_check_idet(void)
void checkasm_check_blockdsp(void)
#define AV_CPU_FLAG_SSE3
Prescott SSE3 functions.
void checkasm_check_fdctdsp(void)
static void destroy_func_tree(CheckasmFunc *f)
void checkasm_check_sw_xyz2rgb(void)
__device__ int printf(const char *,...)
void checkasm_check_videodsp(void)
static int cmp_nop(const void *a, const void *b)
void checkasm_check_vf_eq(void)
#define AV_CPU_FLAG_RVB_BASIC
Basic bit-manipulations.
void checkasm_check_dcadsp(void)
static int wildstrcmp(const char *str, const char *pattern)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
void checkasm_check_alacdsp(void)
void checkasm_check_v210dec(void)
int float_near_abs_eps_array(const float *a, const float *b, float eps, unsigned len)
#define AV_CPU_FLAG_SSE3SLOW
SSE3 supported, but usually not faster.
void checkasm_check_sw_yuv2yuv(void)
int checkasm_fail_func(const char *msg,...)
void checkasm_check_png(void)
const char * bench_pattern
#define AV_CPU_FLAG_RV_ZVBB
Vector basic bit-manipulations.
static const struct @567 cpus[]
void checkasm_check_hevc_idct(void)
static const struct @566 tests[]
void checkasm_check_sw_scale(void)
struct CheckasmFunc * child[2]
void checkasm_check_afir(void)
void checkasm_check_aes(void)
static void print_cpu_name(void)
#define u(width, name, range_min, range_max)
int float_near_abs_eps(float a, float b, float eps)
void checkasm_check_aacpsdsp(void)
static void bench_uninit(void)
#define AV_CPU_FLAG_DOTPROD
void checkasm_check_vvc_sao(void)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
static const char * cpu_suffix(int cpu)
void checkasm_check_h264dsp(void)
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
static void color_printf(int color, const char *fmt,...)
#define AV_CPU_FLAG_RVV_F64
Vectors of double's.
void checkasm_check_vp9_ipred(void)
uint32_t av_get_random_seed(void)
Get a seed to use in conjunction with random functions.
int main(int argc, char *argv[])
int checkasm_check_float_ulp(const char *file, int line, const float *buf1, ptrdiff_t stride1, const float *buf2, ptrdiff_t stride2, int w, int h, const char *name, unsigned max_ulp, int align_w, int align_h, int padding)
void checkasm_check_motion(void)
static av_cold void close(AVCodecParserContext *s)
void checkasm_check_h263dsp(void)
#define AV_CPU_FLAG_RVB
B (bit manipulations)
#define AV_CPU_FLAG_SSSE3
Conroe SSSE3 functions.
int double_near_abs_eps(double a, double b, double eps)
const char * current_test_name
static CheckasmFunc * rotate_tree(CheckasmFunc *f, int dir)
#define AV_CPU_FLAG_XOP
Bulldozer XOP functions.
void checkasm_check_vp9dsp(void)
void checkasm_check_vf_threshold(void)
void checkasm_check_vf_gblur(void)
int float_near_abs_eps_ulp(float a, float b, float eps, unsigned max_ulp)
void checkasm_check_vvc_mc(void)
void checkasm_check_sbcdsp(void)
#define AV_CPU_FLAG_VSX
ISA 2.06.
static __device__ float fabsf(float a)
void checkasm_check_sw_yuv2rgb(void)
#define AV_CPU_FLAG_PMULL
#define AV_CPU_FLAG_RVV_F32
Vectors of float's */.
void checkasm_check_float_dsp(void)
#define AV_CPU_FLAG_AVX512
AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used.
void checkasm_check_hevc_dequant(void)
static int bench_init(void)
void checkasm_check_pixblockdsp(void)
#define FF_ARRAY_ELEMS(a)
void checkasm_check_vf_bwdif(void)
void checkasm_report(const char *name,...)
static CheckasmFunc * get_func(CheckasmFunc **root, const char *name)
void checkasm_check_sw_rgb(void)
void checkasm_check_hevc_sao(void)
#define AV_CPU_FLAG_ARMV6
#define AV_CPU_FLAG_SSE4
Penryn SSE4.1 functions.
void checkasm_check_hevc_pel(void)
void checkasm_set_signal_handler_state(int enabled)
#define cmp_float(a, b, len)
void checkasm_check_mpeg4videodsp(void)
static __device__ float fabs(float a)
static int measure_nop_time(void)
void checkasm_check_takdsp(void)
int double_near_abs_eps_array(const double *a, const double *b, double eps, unsigned len)
void checkasm_check_sw_ops(void)
#define AV_CPU_FLAG_AVX512ICL
F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/VAES/VPCLMULQDQ.
void checkasm_check_fmtconvert(void)
#define checkasm_load_context(s)
#define checkasm_save_context()
void checkasm_check_aacencdsp(void)
void checkasm_check_vorbisdsp(void)
void checkasm_check_cavsdsp(void)
void checkasm_check_apv_dsp(void)
#define AV_CPU_FLAG_CMOV
supports cmov instruction
void checkasm_check_hpeldsp(void)
#define AV_CPU_FLAG_ALTIVEC
standard
void checkasm_check_rv40dsp(void)
static void print_benchs(CheckasmFunc *f)
CheckasmFunc * current_func
void checkasm_check_vc1dsp(void)
volatile sig_atomic_t catch_signals
void checkasm_check_h264chroma(void)
#define AV_CPU_FLAG_SSE2
PIV SSE2 functions.
#define AV_CPU_FLAG_CLMUL
Carry-less Multiplication instruction.
Context structure for the Lagged Fibonacci PRNG.
void checkasm_check_llauddsp(void)
#define AV_CPU_FLAG_AVX
AVX functions: requires OS support even if YMM registers aren't used.
#define AV_CPU_FLAG_FMA4
Bulldozer FMA4 functions.
void checkasm_check_vp9_loopfilter(void)
#define AV_CPU_FLAG_AVX2
AVX2 functions: requires OS support even if YMM registers aren't used.
#define i(width, name, range_min, range_max)
void checkasm_check_llviddsp(void)
int checkasm_handle_signal(int s)
#define AV_CPU_FLAG_ARM_CRC
#define AV_CPU_FLAG_SSE2SLOW
SSE2 supported, but usually not faster.
void checkasm_check_vp9_mc(void)
void checkasm_check_vp3dsp(void)
void checkasm_check_diracdsp(void)
#define DEF_CHECKASM_CHECK_FUNC(type, fmt)
static av_always_inline int cmp(MPVEncContext *const s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags)
compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensa...
void checkasm_check_h264pred(void)
static av_const int av_isdigit(int c)
Locale-independent conversion of ASCII isdigit.
#define AV_CPU_FLAG_FMA3
Haswell FMA3 functions.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
void checkasm_check_huffyuvdsp(void)
int float_near_abs_eps_array_ulp(const float *a, const float *b, float eps, unsigned max_ulp, unsigned len)
CheckasmPerf * checkasm_get_perf_context(void)
void checkasm_check_fixed_dsp(void)
void checkasm_check_colorspace(void)
void checkasm_check_utvideodsp(void)
static int is_negative(union av_intfloat32 u)
void checkasm_check_audiodsp(void)
void checkasm_check_huffyuvencdsp(void)
void checkasm_check_sw_range_convert(void)
#define AV_CPU_FLAG_RV_MISALIGNED
Fast misaligned accesses.
void checkasm_check_mpegvideoencdsp(void)
#define AV_CPU_FLAG_SIMD128
void checkasm_check_flacdsp(void)
void * checkasm_check_func(void *func, const char *name,...)
#define AV_CPU_FLAG_SSE42
Nehalem SSE4.2 functions.
void checkasm_check_idctdsp(void)
struct CheckasmFuncVersion * next
#define AV_CPU_FLAG_RVV_I32
Vectors of 8/16/32-bit int's */.
void checkasm_check_synth_filter(void)
static int cmp_func_names(const char *a, const char *b)
#define AV_CPU_FLAG_SME_I16I64
#define AV_CPU_FLAG_ARMV8
void checkasm_check_lpc(void)
void checkasm_check_g722dsp(void)
void checkasm_check_ac3dsp(void)
#define AV_CPU_FLAG_ATOM
Atom processor, some SSSE3 instructions are slower.
void checkasm_check_svq1enc(void)
void checkasm_check_vf_hflip(void)
void checkasm_check_lls(void)
void checkasm_check_scene_sad(void)
void checkasm_check_blend(void)
#define DEF_CHECKASM_CHECK_BODY(compare, type, fmt)
#define AV_CPU_FLAG_VFPV3
void checkasm_check_bswapdsp(void)
checkasm_context checkasm_context_buf
#define AV_CPU_FLAG_ARMV5TE
void checkasm_check_vf_fspp(void)
#define AV_CPU_FLAG_MMX
standard MMX
static void * checkasm_malloc(size_t size)
#define AV_CPU_FLAG_RVI
I (full GPR bank)
void checkasm_check_h264qpel(void)
static void signal_handler(int s)
void checkasm_check_colordetect(void)
#define AV_CPU_FLAG_AESNI
Advanced Encryption Standard functions.
int checkasm_bench_func(void)
void checkasm_check_mpegvideo_unquantize(void)
#define AV_CPU_FLAG_POWER8
ISA 2.07.
const char * cpu_flag_name
void checkasm_check_vf_sobel(void)
#define AV_CPU_FLAG_SSE
SSE functions.
static int ref[MAX_W *MAX_W]
int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp, unsigned len)
void checkasm_check_crc(void)
static const struct sigaction signal_handler_act
#define AV_CPU_FLAG_MMXEXT
SSE integer functions or AMD MMX ext.
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
void checkasm_check_vp6dsp(void)
void checkasm_check_av_tx(void)
void checkasm_check_qpeldsp(void)
void checkasm_check_vp9_itxfm(void)
void checkasm_check_blackdetect(void)
void checkasm_check_v210enc(void)
void checkasm_check_sbrdsp(void)
void checkasm_check_pixelutils(void)
void checkasm_check_hevc_deblock(void)
const char * test_pattern
static int usage(const char *path)
#define AV_CPU_FLAG_VFP_VM
VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations.
void checkasm_check_jpeg2000dsp(void)
void checkasm_check_hevc_add_res(void)
int float_near_ulp(float a, float b, unsigned max_ulp)
CheckasmFuncVersion * current_func_ver
static void check_cpu_flag(const char *name, int flag)
sigjmp_buf checkasm_context
static int bench_init_ffmpeg(void)
void checkasm_check_rv34dsp(void)
CheckasmFuncVersion versions
static double avg_cycles_per_call(const CheckasmPerf *const p)
#define AV_CPU_FLAG_RVV_I64
Vectors of 64-bit int's */.
static int check_err(const char *file, int line, const char *name, int w, int h, int *err)
void checkasm_check_vvc_alf(void)
void checkasm_check_exrdsp(void)
static void balance_tree(CheckasmFunc **root)
#define AV_CPU_FLAG_ARMV6T2
void checkasm_check_llvidencdsp(void)
void checkasm_check_opusdsp(void)