aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-08-29 14:44:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-08-29 14:44:47 +0000
commitaddafb0e0a50c1749071219ce23b289d7a3b9eb5 (patch)
treedae97aa2c0f1d789f380574206a23498daf9d4ab /libavcodec/dca.c
parentc55ecb9c27a7b46e1a4dc7bfe98b89e345321720 (diff)
downloadffmpeg-addafb0e0a50c1749071219ce23b289d7a3b9eb5.tar.gz
Simplify (drop useless intermediate sum and diff arrays).
Originally committed as revision 15023 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 8966f6b8b6..57ca6145a5 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -673,7 +673,7 @@ static void qmf_32_subbands(DCAContext * s, int chans,
/* Reconstructed channel sample index */
for (subindex = 0; subindex < 8; subindex++) {
- float t1, t2, sum[16], diff[16];
+ float t1, t2;
/* Load in one sample from each subband and clear inactive subbands */
for (i = 0; i < s->subband_activity[chans]; i++)
@@ -690,17 +690,10 @@ static void qmf_32_subbands(DCAContext * s, int chans,
t1 += (raXin[2 * i] + raXin[2 * i + 1]) * cos_mod[j];
t2 += (raXin[2 * i] + raXin[2 * i - 1]) * cos_mod[j + 256];
}
- sum[k] = t1 + t2;
- diff[k] = t1 - t2;
+ subband_fir_hist[ k ] = cos_mod[k+512 ] * (t1 + t2);
+ subband_fir_hist[32-k-1] = cos_mod[k+512+16] * (t1 - t2);
}
- j = 512;
- /* Store history */
- for (k = 0; k < 16; k++)
- subband_fir_hist[k] = cos_mod[j++] * sum[k];
- for (k = 0; k < 16; k++)
- subband_fir_hist[32-k-1] = cos_mod[j++] * diff[k];
-
/* Multiply by filter coefficients */
for (k = 31, i = 0; i < 32; i++, k--)
for (j = 0; j < 512; j += 64){