aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2010-12-16 03:13:45 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-12-16 03:13:45 +0000
commite29065f7bfababd7016620e9535fe879d21fcf33 (patch)
treefdd578fb3425696c5a6018059a2238e48e7ff5d3
parent9d8533368f55e1f6a0ea30d6492b26399b030066 (diff)
downloadffmpeg-e29065f7bfababd7016620e9535fe879d21fcf33.tar.gz
Write results of post-rotation complex multiply directly to output.
2% faster in function mdct512(). Originally committed as revision 26028 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3enc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index e041a4159e..1f9e01ea23 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -332,7 +332,7 @@ static void fft(IComplex *z, int ln)
*/
static void mdct512(int32_t *out, int16_t *in)
{
- int i, re, im, re1, im1;
+ int i, re, im;
int16_t rot[MDCT_SAMPLES];
IComplex x[MDCT_SAMPLES/4];
@@ -354,9 +354,7 @@ static void mdct512(int32_t *out, int16_t *in)
for (i = 0; i < MDCT_SAMPLES/4; i++) {
re = x[i].re;
im = x[i].im;
- CMUL(re1, im1, re, im, xsin1[i], xcos1[i]);
- out[ 2*i] = im1;
- out[MDCT_SAMPLES/2-1-2*i] = re1;
+ CMUL(out[MDCT_SAMPLES/2-1-2*i], out[2*i], re, im, xsin1[i], xcos1[i]);
}
}