Mercurial > libavcodec.hg
diff dct.c @ 12026:3f3d08bb5cf8 libavcodec
More mp{1,2,3} 32-point DCT transform to our common DCT framework.
Should allow for future SIMD optimizations.
author | vitor |
---|---|
date | Wed, 30 Jun 2010 20:11:27 +0000 |
parents | 7dd2a45249a9 |
children | 1bf322283429 |
line wrap: on
line diff
--- a/dct.c Wed Jun 30 20:09:37 2010 +0000 +++ b/dct.c Wed Jun 30 20:11:27 2010 +0000 @@ -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 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 @@ 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; }