summaryrefslogtreecommitdiff
path: root/libavcodec/x86/dcadsp_init.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2014-03-20 15:37:55 -0300
committerAnton Khirnov <anton@khirnov.net>2014-04-04 17:40:51 +0200
commit81e02fae6ec12ae85f052bd74aa9506cbebe4517 (patch)
tree91f0eaa649b2c07114620f50cee00f385f3272c9 /libavcodec/x86/dcadsp_init.c
parent2025d8026fe507c3f82c3440ecdf09641c577163 (diff)
x86/synth_filter: add synth_filter_avx
Sandy Bridge Win64: 180 cycles in ff_synth_filter_inner_sse2 150 cycles in ff_synth_filter_inner_avx Also switch some instructions to a three operand format to avoid assembly errors with Yasm 1.1.0 or older. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/x86/dcadsp_init.c')
-rw-r--r--libavcodec/x86/dcadsp_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c
index 5b77985569..d7e0d65917 100644
--- a/libavcodec/x86/dcadsp_init.c
+++ b/libavcodec/x86/dcadsp_init.c
@@ -81,6 +81,7 @@ static void synth_filter_##opt(FFTContext *imdct, \
SYNTH_FILTER_FUNC(sse)
#endif
SYNTH_FILTER_FUNC(sse2)
+SYNTH_FILTER_FUNC(avx)
#endif /* HAVE_YASM */
av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
@@ -96,5 +97,8 @@ av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
if (EXTERNAL_SSE2(cpu_flags)) {
s->synth_filter_float = synth_filter_sse2;
}
+ if (EXTERNAL_AVX(cpu_flags)) {
+ s->synth_filter_float = synth_filter_avx;
+ }
#endif /* HAVE_YASM */
}