x86: Consistently use cpu flag detection macros in places that still miss it
[ffmpeg.git] / libavcodec / x86 / mpegaudiodsp.c
index b6c30b0..f45cb7e 100644 (file)
@@ -243,22 +243,26 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
     }
 
 #if HAVE_SSE2_INLINE
-    if (cpu_flags & AV_CPU_FLAG_SSE2) {
+    if (INLINE_SSE2(cpu_flags)) {
         s->apply_window_float = apply_window_mp3;
     }
 #endif /* HAVE_SSE2_INLINE */
 
 #if HAVE_YASM
+    if (EXTERNAL_SSE(cpu_flags)) {
+        s->imdct36_blocks_float = imdct36_blocks_sse;
+    }
+    if (EXTERNAL_SSE2(cpu_flags)) {
+        s->imdct36_blocks_float = imdct36_blocks_sse2;
+    }
+    if (EXTERNAL_SSE3(cpu_flags)) {
+        s->imdct36_blocks_float = imdct36_blocks_sse3;
+    }
+    if (EXTERNAL_SSSE3(cpu_flags)) {
+        s->imdct36_blocks_float = imdct36_blocks_ssse3;
+    }
     if (EXTERNAL_AVX(cpu_flags)) {
         s->imdct36_blocks_float = imdct36_blocks_avx;
-    } else if (EXTERNAL_SSSE3(cpu_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_ssse3;
-    } else if (EXTERNAL_SSE3(cpu_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_sse3;
-    } else if (EXTERNAL_SSE2(cpu_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_sse2;
-    } else if (EXTERNAL_SSE(cpu_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_sse;
     }
 #endif /* HAVE_YASM */
 }