21
21
#ifndef AVUTIL_CPU_H
22
22
#define AVUTIL_CPU_H
24
26
#define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */
26
28
/* lower 16 bits - CPU features */
27
29
#define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX
30
#define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext
31
#if FF_API_CPU_FLAG_MMX2
28
32
#define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
29
34
#define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW
30
35
#define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions
31
36
#define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions
40
45
#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
41
46
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
42
47
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
43
#define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT
48
#define AV_CPU_FLAG_CMOV 0x1000 ///< i686 cmov
44
50
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
52
#define AV_CPU_FLAG_ARMV5TE (1 << 0)
53
#define AV_CPU_FLAG_ARMV6 (1 << 1)
54
#define AV_CPU_FLAG_ARMV6T2 (1 << 2)
55
#define AV_CPU_FLAG_VFP (1 << 3)
56
#define AV_CPU_FLAG_VFPV3 (1 << 4)
57
#define AV_CPU_FLAG_NEON (1 << 5)
47
60
* Return the flags which specify extensions supported by the CPU.
49
62
int av_get_cpu_flags(void);
65
* Set a mask on flags returned by av_get_cpu_flags().
66
* This function is mainly useful for testing.
68
* @warning this function is not thread safe.
70
void av_set_cpu_flags_mask(int mask);
73
* Parse CPU flags from a string.
75
* @return a combination of AV_CPU_* flags, negative on error.
77
int av_parse_cpu_flags(const char *s);
51
79
/* The following CPU-specific functions shall not be called directly. */
52
80
int ff_get_cpu_flags_arm(void);
53
81
int ff_get_cpu_flags_ppc(void);