summaryrefslogtreecommitdiff
path: root/libavcodec/mdct15.h
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2017-06-18 12:06:30 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-06-23 23:45:37 +0100
commite1120b1c5446acec1ad9567c884fb6655a34c359 (patch)
tree6de0abf6956594dd953f89436a632337b48d20a7 /libavcodec/mdct15.h
parentf66086adac5eb9b964c89ea0480487f48875f690 (diff)
mdct15: add assembly optimizations for the 15-point FFT
c: 1802 decicycles in fft15,16774635 runs, 2581 skips avx: 865 decicycles in fft15,16776378 runs, 838 skips Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/mdct15.h')
-rw-r--r--libavcodec/mdct15.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/libavcodec/mdct15.h b/libavcodec/mdct15.h
index ef94edff6c..7d83f3ebdf 100644
--- a/libavcodec/mdct15.h
+++ b/libavcodec/mdct15.h
@@ -34,34 +34,26 @@ typedef struct MDCT15Context {
int *pfa_postreindex;
FFTContext ptwo_fft;
-
FFTComplex *tmp;
-
FFTComplex *twiddle_exptab;
- /* 0 - 18: fft15 twiddles, 19 - 20: fft5 twiddles */
- FFTComplex exptab[21];
+ DECLARE_ALIGNED(32, FFTComplex, exptab)[64];
- /**
- * Calculate a full 2N -> N MDCT
- */
+ /* 15-point FFT */
+ void (*fft15)(FFTComplex *out, FFTComplex *in, FFTComplex *exptab, ptrdiff_t stride);
+
+ /* Calculate a full 2N -> N MDCT */
void (*mdct)(struct MDCT15Context *s, float *dst, const float *src, ptrdiff_t stride);
- /**
- * Calculate the middle half of the iMDCT
- */
+ /* Calculate the middle half of the iMDCT */
void (*imdct_half)(struct MDCT15Context *s, float *dst, const float *src,
ptrdiff_t src_stride, float scale);
} MDCT15Context;
-/**
- * Init an (i)MDCT of the length 2 * 15 * (2^N)
- */
+/* Init an (i)MDCT of the length 2 * 15 * (2^N) */
int ff_mdct15_init(MDCT15Context **ps, int inverse, int N, double scale);
-
-/**
- * Frees a context
- */
void ff_mdct15_uninit(MDCT15Context **ps);
+void ff_mdct15_init_x86(MDCT15Context *s);
+
#endif /* AVCODEC_MDCT15_H */