Mercurial > libavcodec.hg
changeset 11607:554450259db8 libavcodec
DCA: use a local variable for loop boundary
This prevents gcc reloading the value from memory on each iteration
of the loop.
author | mru |
---|---|
date | Mon, 12 Apr 2010 11:14:51 +0000 |
parents | 93db59ec6eb7 |
children | bd4754d81e42 |
files | dca.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dca.c Mon Apr 12 11:14:48 2010 +0000 +++ b/dca.c Mon Apr 12 11:14:51 2010 +0000 @@ -757,6 +757,7 @@ const float *prCoeff; int i; + int sb_act = s->subband_activity[chans]; int subindex; scale *= sqrt(1/8.0); @@ -770,7 +771,7 @@ /* 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); }