Mercurial > libavcodec.hg
comparison dca.c @ 10152:ed85bbd5dccb libavcodec
DCA: move an aligned array from stack to context
| author | mru |
|---|---|
| date | Thu, 10 Sep 2009 08:49:59 +0000 |
| parents | 67a20f0eb42c |
| children | 38ab367d4231 |
comparison
equal
deleted
inserted
replaced
| 10151:6cd8b6fd5f0f | 10152:ed85bbd5dccb |
|---|---|
| 228 /* Subband samples history (for ADPCM) */ | 228 /* Subband samples history (for ADPCM) */ |
| 229 float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4]; | 229 float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4]; |
| 230 DECLARE_ALIGNED_16(float, subband_fir_hist[DCA_PRIM_CHANNELS_MAX][512]); | 230 DECLARE_ALIGNED_16(float, subband_fir_hist[DCA_PRIM_CHANNELS_MAX][512]); |
| 231 float subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][32]; | 231 float subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][32]; |
| 232 int hist_index[DCA_PRIM_CHANNELS_MAX]; | 232 int hist_index[DCA_PRIM_CHANNELS_MAX]; |
| 233 DECLARE_ALIGNED_16(float, raXin[32]); | |
| 233 | 234 |
| 234 int output; ///< type of output | 235 int output; ///< type of output |
| 235 float add_bias; ///< output bias | 236 float add_bias; ///< output bias |
| 236 float scale_bias; ///< output scale | 237 float scale_bias; ///< output scale |
| 237 | 238 |
| 749 float samples_in[32][8], float *samples_out, | 750 float samples_in[32][8], float *samples_out, |
| 750 float scale, float bias) | 751 float scale, float bias) |
| 751 { | 752 { |
| 752 const float *prCoeff; | 753 const float *prCoeff; |
| 753 int i, j; | 754 int i, j; |
| 754 DECLARE_ALIGNED_16(float, raXin[32]); | |
| 755 | 755 |
| 756 int hist_index= s->hist_index[chans]; | 756 int hist_index= s->hist_index[chans]; |
| 757 float *subband_fir_hist2 = s->subband_fir_noidea[chans]; | 757 float *subband_fir_hist2 = s->subband_fir_noidea[chans]; |
| 758 | 758 |
| 759 int subindex; | 759 int subindex; |
| 769 /* Reconstructed channel sample index */ | 769 /* Reconstructed channel sample index */ |
| 770 for (subindex = 0; subindex < 8; subindex++) { | 770 for (subindex = 0; subindex < 8; subindex++) { |
| 771 float *subband_fir_hist = s->subband_fir_hist[chans] + hist_index; | 771 float *subband_fir_hist = s->subband_fir_hist[chans] + hist_index; |
| 772 /* Load in one sample from each subband and clear inactive subbands */ | 772 /* Load in one sample from each subband and clear inactive subbands */ |
| 773 for (i = 0; i < s->subband_activity[chans]; i++){ | 773 for (i = 0; i < s->subband_activity[chans]; i++){ |
| 774 if((i-1)&2) raXin[i] = -samples_in[i][subindex]; | 774 if((i-1)&2) s->raXin[i] = -samples_in[i][subindex]; |
| 775 else raXin[i] = samples_in[i][subindex]; | 775 else s->raXin[i] = samples_in[i][subindex]; |
| 776 } | 776 } |
| 777 for (; i < 32; i++) | 777 for (; i < 32; i++) |
| 778 raXin[i] = 0.0; | 778 s->raXin[i] = 0.0; |
| 779 | 779 |
| 780 ff_imdct_half(&s->imdct, subband_fir_hist, raXin); | 780 ff_imdct_half(&s->imdct, subband_fir_hist, s->raXin); |
| 781 | 781 |
| 782 /* Multiply by filter coefficients */ | 782 /* Multiply by filter coefficients */ |
| 783 for (i = 0; i < 16; i++){ | 783 for (i = 0; i < 16; i++){ |
| 784 float a= subband_fir_hist2[i ]; | 784 float a= subband_fir_hist2[i ]; |
| 785 float b= subband_fir_hist2[i+16]; | 785 float b= subband_fir_hist2[i+16]; |
