10l: The SBR refactor requires the use of 2 independent output X buffers.
authorAlex Converse <alex.converse@gmail.com>
Mon, 3 May 2010 19:21:35 +0000 (19:21 +0000)
committerAlex Converse <alex.converse@gmail.com>
Mon, 3 May 2010 19:21:35 +0000 (19:21 +0000)
Originally committed as revision 23014 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/aacsbr.c
libavcodec/sbr.h

index 130e3ed..0de81a5 100644 (file)
@@ -1750,15 +1750,15 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
         }
 
         /* synthesis */
         }
 
         /* synthesis */
-        sbr_x_gen(sbr, sbr->X, sbr->X_low, sbr->data[ch].Y, ch);
+        sbr_x_gen(sbr, sbr->X[ch], sbr->X_low, sbr->data[ch].Y, ch);
     }
     }
-    sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, L, sbr->X, sbr->qmf_filter_scratch,
+    sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, L, sbr->X[0], sbr->qmf_filter_scratch,
                       sbr->data[0].synthesis_filterbank_samples,
                       &sbr->data[0].synthesis_filterbank_samples_offset,
                       downsampled,
                       ac->add_bias, -1024 * ac->sf_scale);
     if (nch == 2)
                       sbr->data[0].synthesis_filterbank_samples,
                       &sbr->data[0].synthesis_filterbank_samples_offset,
                       downsampled,
                       ac->add_bias, -1024 * ac->sf_scale);
     if (nch == 2)
-        sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X, sbr->qmf_filter_scratch,
+        sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X[1], sbr->qmf_filter_scratch,
                           sbr->data[1].synthesis_filterbank_samples,
                           &sbr->data[1].synthesis_filterbank_samples_offset,
                           downsampled,
                           sbr->data[1].synthesis_filterbank_samples,
                           &sbr->data[1].synthesis_filterbank_samples_offset,
                           downsampled,
index 11c97f7..2d9f4a5 100644 (file)
@@ -157,7 +157,7 @@ typedef struct {
     ///QMF output of the HF generator
     float              X_high[64][40][2];
     ///QMF values of the reconstructed signal
     ///QMF output of the HF generator
     float              X_high[64][40][2];
     ///QMF values of the reconstructed signal
-    DECLARE_ALIGNED(16, float, X)[2][32][64];
+    DECLARE_ALIGNED(16, float, X)[2][2][32][64];
     ///Zeroth coefficient used to filter the subband signals
     float              alpha0[64][2];
     ///First coefficient used to filter the subband signals
     ///Zeroth coefficient used to filter the subband signals
     float              alpha0[64][2];
     ///First coefficient used to filter the subband signals