aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/mpegaudiodec_mmx.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2011-11-07 21:54:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-07 22:35:55 +0100
commit22e25c002e103e52ace35703423e896b08b51aef (patch)
tree23bbbc22a613dcbbd33ef45499b504ac7d169d64 /libavcodec/x86/mpegaudiodec_mmx.c
parente32aaba3581a8ffd0737c9c00d2a42533687952b (diff)
downloadffmpeg-22e25c002e103e52ace35703423e896b08b51aef.tar.gz
mpegaudiodec: add SSE-optimized imdct36()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/mpegaudiodec_mmx.c')
-rw-r--r--libavcodec/x86/mpegaudiodec_mmx.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/x86/mpegaudiodec_mmx.c b/libavcodec/x86/mpegaudiodec_mmx.c
index d7f8a0a142..980faf9cde 100644
--- a/libavcodec/x86/mpegaudiodec_mmx.c
+++ b/libavcodec/x86/mpegaudiodec_mmx.c
@@ -24,6 +24,12 @@
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegaudiodsp.h"
+void ff_imdct36_float_sse(float *out, float *buf, float *in, float *win);
+void ff_imdct36_float_sse2(float *out, float *buf, float *in, float *win);
+void ff_imdct36_float_sse3(float *out, float *buf, float *in, float *win);
+void ff_imdct36_float_ssse3(float *out, float *buf, float *in, float *win);
+void ff_imdct36_float_avx(float *out, float *buf, float *in, float *win);
+
#define MACS(rt, ra, rb) rt+=(ra)*(rb)
#define MLSS(rt, ra, rb) rt-=(ra)*(rb)
@@ -154,4 +160,19 @@ void ff_mpadsp_init_mmx(MPADSPContext *s)
if (mm_flags & AV_CPU_FLAG_SSE2) {
s->apply_window_float = apply_window_mp3;
}
+ if (HAVE_YASM && mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
+ s->imdct36_float = ff_imdct36_float_avx;
+ }
+ else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSE) {
+ s->imdct36_float = ff_imdct36_float_ssse3;
+ }
+ else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE3 && HAVE_SSE) {
+ s->imdct36_float = ff_imdct36_float_sse3;
+ }
+ else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE) {
+ s->imdct36_float = ff_imdct36_float_sse2;
+ }
+ else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) {
+ s->imdct36_float = ff_imdct36_float_sse;
+ }
}