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

alexc subversion at mplayerhq.hu
Fri Nov 20 21:29:00 CET 2009


Author: alexc
Date: Fri Nov 20 21:28:59 2009
New Revision: 5453

Log:
Run SBR in pure upsampling mode until we get an SBR header.

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

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Fri Nov 20 21:28:57 2009	(r5452)
+++ aac-sbr/aacsbr.c	Fri Nov 20 21:28:59 2009	(r5453)
@@ -80,6 +80,8 @@ static unsigned int sbr_header(SpectralB
     uint8_t bs_header_extra_1;
     uint8_t bs_header_extra_2;
 
+    sbr->start = 1;
+
     // Save last spectrum parameters variables to compare to new ones
     memcpy(&sbr->spectrum_params[0], &sbr->spectrum_params[1], sizeof(SpectrumParameters));
 
@@ -805,6 +807,7 @@ int ff_decode_sbr_extension(AACContext *
     if (sbr->reset)
         sbr_reset(ac, sbr);
 
+    if (sbr->start)
     num_sbr_bits  += sbr_data(ac, sbr, gb, id_aac);
     num_align_bits = ((cnt << 3) - 4 - num_sbr_bits) & 7;
 

Modified: aac-sbr/aacsbr.h
==============================================================================
--- aac-sbr/aacsbr.h	Fri Nov 20 21:28:57 2009	(r5452)
+++ aac-sbr/aacsbr.h	Fri Nov 20 21:28:59 2009	(r5453)
@@ -106,6 +106,7 @@ typedef struct {
  * Spectral Band Replication
  */
 typedef struct {
+    uint8_t            start;
     // SBR header bitstream variables
     uint8_t            bs_amp_res;
     SpectrumParameters spectrum_params[2];


More information about the FFmpeg-soc mailing list