diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2016-05-01 15:33:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-07 23:28:48 +0200 |
commit | 9630b3fc06d8ccfab4847ecddaed96526cf4dd19 (patch) | |
tree | 48726b7a1a94424b58cb67a90ba85d107babce30 /libavcodec/x86/lossless_audiodsp_init.c | |
parent | e811ebcd9cd5223239d72c07c79d63ec51ac3259 (diff) |
x86: lossless audio: SSE4 madd 32bits
The unique user so far is wmalossless 24bits. The few samples tested show an
order of 8, so more unrolling or an avx2 version do not make sense.
Timings: 68 -> 49 cycles
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/x86/lossless_audiodsp_init.c')
-rw-r--r-- | libavcodec/x86/lossless_audiodsp_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/x86/lossless_audiodsp_init.c b/libavcodec/x86/lossless_audiodsp_init.c index 197173caf4..10b6a65622 100644 --- a/libavcodec/x86/lossless_audiodsp_init.c +++ b/libavcodec/x86/lossless_audiodsp_init.c @@ -31,6 +31,10 @@ int32_t ff_scalarproduct_and_madd_int16_ssse3(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul); +int32_t ff_scalarproduct_and_madd_int32_sse4(int16_t *v1, const int32_t *v2, + const int16_t *v3, + int order, int mul); + av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c) { #if HAVE_YASM @@ -45,5 +49,8 @@ av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c) if (EXTERNAL_SSSE3(cpu_flags) && !(cpu_flags & (AV_CPU_FLAG_SSE42 | AV_CPU_FLAG_3DNOW))) // cachesplit c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; + + if (EXTERNAL_SSE4(cpu_flags)) + c->scalarproduct_and_madd_int32 = ff_scalarproduct_and_madd_int32_sse4; #endif } |