x86: Consistently use cpu flag detection macros in places that still miss it
[ffmpeg.git] / libavcodec / x86 / mpegaudiodsp.c
index 79a29ce..f45cb7e 100644 (file)
@@ -226,7 +226,7 @@ DECL_IMDCT_BLOCKS(avx,avx)
 
 av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
 {
-    int mm_flags = av_get_cpu_flags();
+    int cpu_flags = av_get_cpu_flags();
 
     int i, j;
     for (j = 0; j < 4; j++) {
@@ -243,22 +243,26 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
     }
 
 #if HAVE_SSE2_INLINE
-    if (mm_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_AVX(mm_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_avx;
-    } else if (EXTERNAL_SSSE3(mm_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_ssse3;
-    } else if (EXTERNAL_SSE3(mm_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_sse3;
-    } else if (EXTERNAL_SSE2(mm_flags)) {
-        s->imdct36_blocks_float = imdct36_blocks_sse2;
-    } else if (EXTERNAL_SSE(mm_flags)) {
+    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;
+    }
 #endif /* HAVE_YASM */
 }