aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-04-12 11:14:51 +0000
committerMåns Rullgård <mans@mansr.com>2010-04-12 11:14:51 +0000
commitb92d483bac3c833430a48eefbd0bfbe636772c27 (patch)
tree6231d3294e02c3e47473641a96be33f2d253105b
parent0dc7df28dd50167722550fb20c57327398e32e9f (diff)
downloadffmpeg-b92d483bac3c833430a48eefbd0bfbe636772c27.tar.gz
DCA: use a local variable for loop boundary
This prevents gcc reloading the value from memory on each iteration of the loop. Originally committed as revision 22848 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 596756c79f..7a6841d49c 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -757,6 +757,7 @@ static void qmf_32_subbands(DCAContext * s, int chans,
const float *prCoeff;
int i;
+ int sb_act = s->subband_activity[chans];
int subindex;
scale *= sqrt(1/8.0);
@@ -770,7 +771,7 @@ static void qmf_32_subbands(DCAContext * s, int chans,
/* Reconstructed channel sample index */
for (subindex = 0; subindex < 8; subindex++) {
/* Load in one sample from each subband and clear inactive subbands */
- for (i = 0; i < s->subband_activity[chans]; i++){
+ for (i = 0; i < sb_act; i++){
uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
AV_WN32A(&s->raXin[i], v);
}