summaryrefslogtreecommitdiff
path: root/libavutil/x86/cpu.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-26 02:36:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-26 02:36:36 +0200
commita6657044021527c8d8e5341199bded0e1b7eaec0 (patch)
treef4dac419d3b249da2cb446111b609f575b82a1e1 /libavutil/x86/cpu.c
parent865b70bc5d1cf37ec6d6cb729a69dda2cca28bd5 (diff)
parent4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4 (diff)
Merge commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4'
* commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4': libavutil: x86: Add AVX2 capable CPU detection. Conflicts: libavutil/cpu.c libavutil/cpu.h libavutil/x86/cpu.c See: 865b70bc5d1cf37ec6d6cb729a69dda2cca28bd5 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86/cpu.c')
-rw-r--r--libavutil/x86/cpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 174515f68d..18049eaead 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -134,13 +134,14 @@ int ff_get_cpu_flags_x86(void)
if ((eax & 0x6) == 0x6)
rval |= AV_CPU_FLAG_AVX;
}
- if (HAVE_AVX2 && max_std_level >= 7)
- {
+#if HAVE_AVX2
+ if (max_std_level >= 7) {
cpuid(7, eax, ebx, ecx, edx);
if (ebx&0x00000020)
rval |= AV_CPU_FLAG_AVX2;
/* TODO: BMI1/2 */
}
+#endif /* HAVE_AVX2 */
#endif /* HAVE_AVX */
#endif /* HAVE_SSE */
}