comparison dca.c @ 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
comparison
equal deleted inserted replaced
11606:93db59ec6eb7 11607:554450259db8
755 float scale, float bias) 755 float scale, float bias)
756 { 756 {
757 const float *prCoeff; 757 const float *prCoeff;
758 int i; 758 int i;
759 759
760 int sb_act = s->subband_activity[chans];
760 int subindex; 761 int subindex;
761 762
762 scale *= sqrt(1/8.0); 763 scale *= sqrt(1/8.0);
763 764
764 /* Select filter */ 765 /* Select filter */
768 prCoeff = fir_32bands_perfect; 769 prCoeff = fir_32bands_perfect;
769 770
770 /* Reconstructed channel sample index */ 771 /* Reconstructed channel sample index */
771 for (subindex = 0; subindex < 8; subindex++) { 772 for (subindex = 0; subindex < 8; subindex++) {
772 /* Load in one sample from each subband and clear inactive subbands */ 773 /* Load in one sample from each subband and clear inactive subbands */
773 for (i = 0; i < s->subband_activity[chans]; i++){ 774 for (i = 0; i < sb_act; i++){
774 uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30; 775 uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
775 AV_WN32A(&s->raXin[i], v); 776 AV_WN32A(&s->raXin[i], v);
776 } 777 }
777 for (; i < 32; i++) 778 for (; i < 32; i++)
778 s->raXin[i] = 0.0; 779 s->raXin[i] = 0.0;