diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-31 23:59:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-31 23:59:48 +0200 |
commit | 16c430e8efc8d8528df7805429175dfdfd0d87ac (patch) | |
tree | 407f67d40f428c0d336aae1621a1b06211b0d40e /libavutil/cpu_internal.h | |
parent | c140227a8bbc2699b724c9076dc706400eb5cccd (diff) | |
parent | cae39851201b7781f1262e1c23627b45e6e80bb4 (diff) | |
download | ffmpeg-16c430e8efc8d8528df7805429175dfdfd0d87ac.tar.gz |
Merge commit 'cae39851201b7781f1262e1c23627b45e6e80bb4'
* commit 'cae39851201b7781f1262e1c23627b45e6e80bb4':
x86: Add helper macros to check for slow cpuflags
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 3c6ce6d079..2105298843 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); |