diff options
author | James Almer <jamrial@gmail.com> | 2014-02-22 02:47:01 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-22 17:25:52 +0100 |
commit | a2af8eddab75f1eac712411e4dde89823c0845e8 (patch) | |
tree | f2ba681511f1d83bcac6fb75c45d187f81fde690 /libavutil/x86/cpu.c | |
parent | f98821dddb4abb3764fc2f22a6afe3eb11292d3c (diff) | |
download | ffmpeg-a2af8eddab75f1eac712411e4dde89823c0845e8.tar.gz |
x86: add detection for FMA3 instruction set
Based on x264 code
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86/cpu.c')
-rw-r--r-- | libavutil/x86/cpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 18049eaead..333b0f805f 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -131,8 +131,11 @@ int ff_get_cpu_flags_x86(void) if ((ecx & 0x18000000) == 0x18000000) { /* Check for OS support */ xgetbv(0, eax, edx); - if ((eax & 0x6) == 0x6) + if ((eax & 0x6) == 0x6) { rval |= AV_CPU_FLAG_AVX; + if (ecx&0x00001000) + rval |= AV_CPU_FLAG_FMA3; + } } #if HAVE_AVX2 if (max_std_level >= 7) { |