diff options
author | James Almer <jamrial@gmail.com> | 2015-05-26 14:29:07 -0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-05-31 12:07:11 +0200 |
commit | cae39851201b7781f1262e1c23627b45e6e80bb4 (patch) | |
tree | 23138dd6324e23b1e079b0b4f4350b25043e8187 /libavutil/cpu_internal.h | |
parent | f7cafb5d02aa3f26c185f6f9851413ad77a73872 (diff) | |
download | ffmpeg-cae39851201b7781f1262e1c23627b45e6e80bb4.tar.gz |
x86: Add helper macros to check for slow cpuflags
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavutil/cpu_internal.h')
-rw-r--r-- | libavutil/cpu_internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/cpu_internal.h b/libavutil/cpu_internal.h index 3bfe8a82d8..49c7b070e4 100644 --- a/libavutil/cpu_internal.h +++ b/libavutil/cpu_internal.h @@ -24,7 +24,17 @@ #define CPUEXT_SUFFIX(flags, suffix, cpuext) \ (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext)) +#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) \ + (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ + !((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW)) + +#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) \ + (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ + ((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW)) + #define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext) +#define CPUEXT_FAST(flags, cpuext) CPUEXT_SUFFIX_FAST(flags, , cpuext) +#define CPUEXT_SLOW(flags, cpuext) CPUEXT_SUFFIX_SLOW(flags, , cpuext) int ff_get_cpu_flags_aarch64(void); int ff_get_cpu_flags_arm(void); |