x86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate
[ffmpeg.git] / libavcodec / x86 / ac3dsp_init.c
index 23f0162..89044f4 100644 (file)
@@ -223,16 +223,19 @@ av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
         c->float_to_fixed24 = ff_float_to_fixed24_sse2;
         c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2;
         c->extract_exponents = ff_ac3_extract_exponents_sse2;
-        if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) {
-            c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2;
-            c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2;
-        }
         if (bit_exact) {
             c->apply_window_int16 = ff_apply_window_int16_sse2;
-        } else if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) {
+        }
+    }
+
+    if (EXTERNAL_SSE2_FAST(cpu_flags)) {
+        c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2;
+        c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2;
+        if (!bit_exact) {
             c->apply_window_int16 = ff_apply_window_int16_round_sse2;
         }
     }
+
     if (EXTERNAL_SSSE3(cpu_flags)) {
         c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3;
         if (cpu_flags & AV_CPU_FLAG_ATOM) {