[FFmpeg-soc] [soc]: r5477 - in aac-sbr: aacsbr.c aacsbr.h

alexc subversion at mplayerhq.hu
Tue Dec 1 21:42:23 CET 2009


Author: alexc
Date: Tue Dec  1 21:42:22 2009
New Revision: 5477

Log:
Don't read past the end of the input frame. Create an SBR analysis filterbank
sample buffer in the SBRData context.

Modified:
   aac-sbr/aacsbr.c
   aac-sbr/aacsbr.h

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Tue Dec  1 21:42:20 2009	(r5476)
+++ aac-sbr/aacsbr.c	Tue Dec  1 21:42:22 2009	(r5477)
@@ -1004,9 +1004,11 @@ static void sbr_dequant(SpectralBandRepl
  * @param   x       pointer to the beginning of the first sample window
  * @param   W       array of complex-valued samples split into subbands
  */
-static void sbr_qmf_analysis(const float *x, float W[32][32][2])
+static void sbr_qmf_analysis(const float *in, float *x, float W[32][32][2])
 {
     int i, k, l, n;
+    memcpy(x    , x+1024, (320-32)*sizeof(x[0]));
+    memcpy(x+288, in    ,     1024*sizeof(x[0]));
     x += 319;
     for (l = 0; l < 32; l++) { // 32 = numTimeSlots*RATE = 16*2 as 960 sample frames are not supported
         float z[320], u[64];

Modified: aac-sbr/aacsbr.h
==============================================================================
--- aac-sbr/aacsbr.h	Tue Dec  1 21:42:20 2009	(r5476)
+++ aac-sbr/aacsbr.h	Tue Dec  1 21:42:22 2009	(r5477)
@@ -102,6 +102,7 @@ typedef struct {
     uint8_t            bs_add_harmonic[32];
     uint8_t            bs_amp_res;
     float              synthesis_filterbank_samples[1280];
+    float              analysis_filterbank_samples [1312];
 } SBRData;
 
 /**


More information about the FFmpeg-soc mailing list