Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-20 07:23:52 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-06-25 18:35:24 +0400
commit332777970c8b430cd29cb945855c4cc3f20946ee (patch)
treef1004229c24ef4983c3535f74ea1ce35681a7287 /libavutil
parent62b9c99aec0f641e289e347d917b7b474d21fa5b (diff)
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@gmx.at> (cherry picked from commit 6310eb8010b7a3b3016e297132380cbd4e3d2d10) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/cpu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index cdea209d8d..55e8b4e900 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -45,6 +45,24 @@
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 ))
+ && !(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;
}