84 printf(
"cpu_flags(%s) = 0x%08X\n", type, cpu_flags);
85 printf(
"cpu_flags_str(%s) =", type);
93 int main(
int argc,
char **argv)
98 char threads[5] =
"auto";
104 fprintf(stderr,
"Table missing %s\n",
cpu_flag_tab[i].name);
109 if (cpu_flags_raw < 0)
113 int c =
getopt(argc, argv,
"c:t:");
129 if (len >=
sizeof(threads)) {
130 fprintf(stderr,
"Invalid thread count '%s'\n",
optarg);
139 if (cpu_flags_eff < 0)
144 printf(
"threads = %s (cpu_count = %d)\n", threads, cpu_count);
#define AV_CPU_FLAG_AVX
AVX functions: requires OS support even if YMM registers aren't used.
#define AV_CPU_FLAG_ALTIVEC
standard
#define AV_CPU_FLAG_SSE
SSE functions.
#define AV_CPU_FLAG_CMOV
supports cmov instruction
#define AV_CPU_FLAG_FMA3
Haswell FMA3 functions.
#define AV_CPU_FLAG_MMXEXT
SSE integer functions or AMD MMX ext.
#define AV_CPU_FLAG_ATOM
Atom processor, some SSSE3 instructions are slower.
#define AV_CPU_FLAG_AVX2
AVX2 functions: requires OS support even if YMM registers aren't used.
#define AV_CPU_FLAG_SSE2SLOW
SSE2 supported, but usually not faster.
#define AV_CPU_FLAG_XOP
Bulldozer XOP functions.
#define AV_CPU_FLAG_SSE42
Nehalem SSE4.2 functions.
#define AV_CPU_FLAG_SSSE3
Conroe SSSE3 functions.
#define AV_CPU_FLAG_ARMV6T2
#define AV_CPU_FLAG_VFP_VM
VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations.
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int av_parse_cpu_caps(unsigned *flags, const char *s)
Parse CPU caps from a string and update the given AV_CPU_* flags based on that.
#define AV_CPU_FLAG_ARMV5TE
#define AV_CPU_FLAG_SSE3
Prescott SSE3 functions.
#define AV_CPU_FLAG_BMI2
Bit Manipulation Instruction Set 2.
static const struct @241 cpu_flag_tab[]
#define AV_CPU_FLAG_VFPV3
#define AV_CPU_FLAG_3DNOW
AMD 3DNOW.
#define AV_CPU_FLAG_ARMV6
#define AV_CPU_FLAG_SSE3SLOW
SSE3 supported, but usually not faster.
#define AV_CPU_FLAG_AVXSLOW
AVX supported, but slow when using YMM registers (e.g. Bulldozer)
#define AV_CPU_FLAG_BMI1
Bit Manipulation Instruction Set 1.
#define AV_CPU_FLAG_MMX
standard MMX
static int getopt(int argc, char *argv[], char *opts)
#define AV_CPU_FLAG_FMA4
Bulldozer FMA4 functions.
#define AV_CPU_FLAG_SSE4
Penryn SSE4.1 functions.
#define AV_CPU_FLAG_AESNI
Advanced Encryption Standard functions.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
#define AV_CPU_FLAG_3DNOWEXT
AMD 3DNowExt.
#define AV_CPU_FLAG_ARMV8
int main(int argc, char **argv)
#define AV_CPU_FLAG_SETEND
#define AV_CPU_FLAG_SSE2
PIV SSE2 functions.
void av_force_cpu_flags(int arg)
Disables cpu detection and forces the specified flags.
static void print_cpu_flags(int cpu_flags, const char *type)