summaryrefslogtreecommitdiff
path: root/libavutil/x86/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/x86/cpu.c')
-rw-r--r--libavutil/x86/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 81bb15a0a4..174515f68d 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -134,6 +134,13 @@ int ff_get_cpu_flags_x86(void)
if ((eax & 0x6) == 0x6)
rval |= AV_CPU_FLAG_AVX;
}
+ if (HAVE_AVX2 && max_std_level >= 7)
+ {
+ cpuid(7, eax, ebx, ecx, edx);
+ if (ebx&0x00000020)
+ rval |= AV_CPU_FLAG_AVX2;
+ /* TODO: BMI1/2 */
+ }
#endif /* HAVE_AVX */
#endif /* HAVE_SSE */
}