diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavutil/x86/cpu.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavutil/x86/cpu.c')
| -rw-r--r-- | ffmpeg/libavutil/x86/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ffmpeg/libavutil/x86/cpu.c b/ffmpeg/libavutil/x86/cpu.c index a3a5239..18049ea 100644 --- a/ffmpeg/libavutil/x86/cpu.c +++ b/ffmpeg/libavutil/x86/cpu.c @@ -26,6 +26,7 @@ #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" #include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" #if HAVE_YASM @@ -133,6 +134,14 @@ int ff_get_cpu_flags_x86(void) if ((eax & 0x6) == 0x6) rval |= AV_CPU_FLAG_AVX; } +#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 */ } |
