Commit 1930efe2 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6310eb80

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 033b0a4e
No related merge requests found
Showing with 18 additions and 0 deletions
+18 -0
......@@ -23,6 +23,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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment