diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-01-13 08:33:00 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-01-13 08:33:00 +0000 |
commit | 99fac0806b0d20790b57b4f6c96676139438e2f6 (patch) | |
tree | b4db3f8f14bcc051d6ce85fb73a1eae136c1f38e | |
parent | f952b30cd1aa9e0611e84bf2b3a732e6da13b150 (diff) | |
download | ffmpeg-99fac0806b0d20790b57b4f6c96676139438e2f6.tar.gz |
Get rid of fft_rev table, use ff_reverse and a shift.
Reduces maximum allowed value for MDCT_NBITS to 10 (current value is 9)
Originally committed as revision 11519 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3enc.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 5243b4fbc4..71bc8d0361 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -64,7 +64,6 @@ typedef struct AC3EncodeContext { static int16_t costab[64]; static int16_t sintab[64]; -static int16_t fft_rev[512]; static int16_t xcos1[128]; static int16_t xsin1[128]; @@ -103,14 +102,6 @@ static void fft_init(int ln) costab[i] = fix15(cos(alpha)); sintab[i] = fix15(sin(alpha)); } - - for(i=0;i<n;i++) { - m=0; - for(j=0;j<ln;j++) { - m |= ((i >> j) & 1) << (ln-j-1); - } - fft_rev[i]=m; - } } /* butter fly op */ @@ -148,8 +139,7 @@ static void fft(IComplex *z, int ln) /* reverse */ for(j=0;j<np;j++) { - int k; - k = fft_rev[j]; + int k = ff_reverse[j] >> (8 - ln); if (k < j) FFSWAP(IComplex, z[k], z[j]); } |