Mercurial > libavcodec.hg
diff fft.h @ 11512:1382cfff33bb libavcodec
Call rdft by function pointer
Call the RDFT by a function pointer like other FFT related transforms.
This makes instruction set optimized versions possible.
Based on patch by Alex Converse.
author | mru |
---|---|
date | Sat, 20 Mar 2010 21:27:03 +0000 |
parents | 384d803faff4 |
children | 628a6ba6a4af |
line wrap: on
line diff
--- a/fft.h Sat Mar 20 16:51:36 2010 +0000 +++ b/fft.h Sat Mar 20 21:27:03 2010 +0000 @@ -196,6 +196,7 @@ const FFTSample *tcos; SINTABLE_CONST FFTSample *tsin; FFTContext fft; + void (*rdft_calc)(struct RDFTContext *s, FFTSample *z); }; /** @@ -204,9 +205,13 @@ * @param trans the type of transform */ int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans); -void ff_rdft_calc(RDFTContext *s, FFTSample *data); void ff_rdft_end(RDFTContext *s); +static av_always_inline void ff_rdft_calc(RDFTContext *s, FFTSample *data) +{ + s->rdft_calc(s, data); +} + /* Discrete Cosine Transform */ struct DCTContext {