diff options
author | James Almer <jamrial@gmail.com> | 2016-02-07 00:29:43 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-02-14 20:00:17 -0300 |
commit | 73a4589d4b0d97cbd6f8bf8be18b78151b657898 (patch) | |
tree | 4af2b71f9646eb762290932ed6b3eff9b446b4c6 /libavutil/cpu_internal.h | |
parent | fbc96c50d72f55131e43939e38c1e5af4315a755 (diff) | |
download | ffmpeg-73a4589d4b0d97cbd6f8bf8be18b78151b657898.tar.gz |
x86: add some more helper macros to check for slow cpuflags
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/cpu_internal.h')
-rw-r--r-- | libavutil/cpu_internal.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavutil/cpu_internal.h b/libavutil/cpu_internal.h index 2105298843..6c352abe1b 100644 --- a/libavutil/cpu_internal.h +++ b/libavutil/cpu_internal.h @@ -24,13 +24,16 @@ #define CPUEXT_SUFFIX(flags, suffix, cpuext) \ (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext)) -#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) \ +#define CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, slow_cpuext) \ (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ - !((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW)) + !((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW)) -#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) \ +#define CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, slow_cpuext) \ (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ - ((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW)) + ((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW)) + +#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, cpuext) +#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, cpuext) #define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext) #define CPUEXT_FAST(flags, cpuext) CPUEXT_SUFFIX_FAST(flags, , cpuext) |