[FFmpeg-cvslog] avutil/cpu: force mmx on selection of higher x86 SIMD features
Michael Niedermayer
git at videolan.org
Mon Jun 23 17:55:58 CEST 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Tue May 20 05:23:52 2014 +0200| [6a51bd7360cb56cc5ec03d219e69d46ed56bf0c2] | committer: Michael Niedermayer
avutil/cpu: force mmx on selection of higher x86 SIMD features
Fixes various runtime failures with manually set flags that represent no
existing CPU
Fixes Ticket3653
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6310eb8010b7a3b3016e297132380cbd4e3d2d10)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a51bd7360cb56cc5ec03d219e69d46ed56bf0c2
---
libavutil/cpu.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 1dc5abb..9c0c874 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -45,6 +45,25 @@
static int flags, checked;
void av_force_cpu_flags(int arg){
+ if ( (arg & ( AV_CPU_FLAG_3DNOW |
+ AV_CPU_FLAG_3DNOWEXT |
+ AV_CPU_FLAG_SSE |
+ AV_CPU_FLAG_SSE2 |
+ AV_CPU_FLAG_SSE2SLOW |
+ AV_CPU_FLAG_SSE3 |
+ AV_CPU_FLAG_SSE3SLOW |
+ AV_CPU_FLAG_SSSE3 |
+ AV_CPU_FLAG_SSE4 |
+ AV_CPU_FLAG_SSE42 |
+ AV_CPU_FLAG_AVX |
+ AV_CPU_FLAG_XOP |
+ AV_CPU_FLAG_FMA4 |
+ AV_CPU_FLAG_AVX2 ))
+ && !(arg & AV_CPU_FLAG_MMX)) {
+ av_log(NULL, AV_LOG_WARNING, "MMX implied by specified flags\n");
+ arg |= AV_CPU_FLAG_MMX;
+ }
+
flags = arg;
checked = arg != -1;
}
More information about the ffmpeg-cvslog
mailing list