diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2010-06-30 20:11:27 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2010-06-30 20:11:27 +0000 |
commit | 06d01188e94321113684a271f62f6b0f2b818e53 (patch) | |
tree | 221fa77222aa1e088050256c9e2c06113fbfd749 /libavcodec/dct.c | |
parent | cae70f99a3bb0955a325ed58a9dfa88eff4a6199 (diff) | |
download | ffmpeg-06d01188e94321113684a271f62f6b0f2b818e53.tar.gz |
More mp{1,2,3} 32-point DCT transform to our common DCT framework.
Should allow for future SIMD optimizations.
Originally committed as revision 23912 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r-- | libavcodec/dct.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/dct.c b/libavcodec/dct.c index 0840feca0a..682fe99f80 100644 --- a/libavcodec/dct.c +++ b/libavcodec/dct.c @@ -31,6 +31,9 @@ #include "libavutil/mathematics.h" #include "fft.h" +#define DCT32_FLOAT +#include "dct32.c" + /* sin((M_PI * x / (2*n)) */ #define SIN(s,n,x) (s->costab[(n) - (x)]) @@ -167,6 +170,11 @@ static void ff_dct_calc_II_c(DCTContext *ctx, FFTSample *data) } } +static void dct32_func(DCTContext *ctx, FFTSample *data) +{ + ctx->dct32(data, data); +} + void ff_dct_calc(DCTContext *s, FFTSample *data) { s->dct_calc(s, data); @@ -200,6 +208,12 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) case DCT_III: s->dct_calc = ff_dct_calc_III_c; break; case DST_I : s->dct_calc = ff_dst_calc_I_c; break; } + + if (inverse == DCT_II && nbits == 5) + s->dct_calc = dct32_func; + + s->dct32 = dct32; + return 0; } |