Mercurial > libavcodec.hg
comparison dca.c @ 7728:311f7ae6fbbc libavcodec
Move t1 and t2 declaration from the QMF code closer to where they are used.
| author | michael |
|---|---|
| date | Fri, 29 Aug 2008 14:53:07 +0000 |
| parents | ce660aaf7bf8 |
| children | 5345b7938443 |
comparison
equal
deleted
inserted
replaced
| 7727:ce660aaf7bf8 | 7728:311f7ae6fbbc |
|---|---|
| 671 else /* Perfect reconstruction */ | 671 else /* Perfect reconstruction */ |
| 672 prCoeff = fir_32bands_perfect; | 672 prCoeff = fir_32bands_perfect; |
| 673 | 673 |
| 674 /* Reconstructed channel sample index */ | 674 /* Reconstructed channel sample index */ |
| 675 for (subindex = 0; subindex < 8; subindex++) { | 675 for (subindex = 0; subindex < 8; subindex++) { |
| 676 float t1, t2; | |
| 677 | |
| 678 /* Load in one sample from each subband and clear inactive subbands */ | 676 /* Load in one sample from each subband and clear inactive subbands */ |
| 679 for (i = 0; i < s->subband_activity[chans]; i++) | 677 for (i = 0; i < s->subband_activity[chans]; i++) |
| 680 raXin[i] = samples_in[i][subindex]; | 678 raXin[i] = samples_in[i][subindex]; |
| 681 for (; i < 32; i++) | 679 for (; i < 32; i++) |
| 682 raXin[i] = 0.0; | 680 raXin[i] = 0.0; |
| 683 | 681 |
| 684 /* Multiply by cosine modulation coefficients and | 682 /* Multiply by cosine modulation coefficients and |
| 685 * create temporary arrays SUM and DIFF */ | 683 * create temporary arrays SUM and DIFF */ |
| 686 for (j = 0, k = 0; k < 16; k++) { | 684 for (j = 0, k = 0; k < 16; k++) { |
| 687 t1 = 0.0; | 685 float t1 = 0.0; |
| 688 t2 = 0.0; | 686 float t2 = 0.0; |
| 689 for (i = 0; i < 16; i++, j++){ | 687 for (i = 0; i < 16; i++, j++){ |
| 690 t1 += (raXin[2 * i] + raXin[2 * i + 1]) * cos_mod[j]; | 688 t1 += (raXin[2 * i] + raXin[2 * i + 1]) * cos_mod[j]; |
| 691 t2 += (raXin[2 * i] + raXin[2 * i - 1]) * cos_mod[j + 256]; | 689 t2 += (raXin[2 * i] + raXin[2 * i - 1]) * cos_mod[j + 256]; |
| 692 } | 690 } |
| 693 subband_fir_hist[ k ] = cos_mod[k+512 ] * (t1 + t2); | 691 subband_fir_hist[ k ] = cos_mod[k+512 ] * (t1 + t2); |
