diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-01-14 10:57:41 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-07-20 18:43:28 +0200 |
commit | 4efab89332ea39a77145e8b15562b981d9dbde68 (patch) | |
tree | 8d1e418a0f7bc672d9c50f013baacb47112951ea /libavcodec/x86/ac3dsp_init.c | |
parent | 0a39c9ac0bfd7345fe676b4e2707d9cec3cbb553 (diff) | |
download | ffmpeg-4efab89332ea39a77145e8b15562b981d9dbde68.tar.gz |
x86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate
Diffstat (limited to 'libavcodec/x86/ac3dsp_init.c')
-rw-r--r-- | libavcodec/x86/ac3dsp_init.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c index 23f0162558..89044f4088 100644 --- a/libavcodec/x86/ac3dsp_init.c +++ b/libavcodec/x86/ac3dsp_init.c @@ -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) { |