[FFmpeg-soc] [soc]: r3394 - in aacenc: aac.h aacenc.c

kostya subversion at mplayerhq.hu
Sun Aug 17 11:37:13 CEST 2008


Author: kostya
Date: Sun Aug 17 11:37:12 2008
New Revision: 3394

Log:
Make zeroes[] of type uint8_t, and hope band_types[] will be of the same type.


Modified:
   aacenc/aac.h
   aacenc/aacenc.c

Modified: aacenc/aac.h
==============================================================================
--- aacenc/aac.h	(original)
+++ aacenc/aac.h	Sun Aug 17 11:37:12 2008
@@ -273,7 +273,7 @@ typedef struct {
     int band_type_run_end[128];               ///< band type run end points
     float sf[128];                            ///< scalefactors
     int sf_idx[128];                          ///< scalefactor indices (used by encoder)
-    int zeroes[128];                          ///< band is not coded (used by encoder)
+    uint8_t zeroes[128];                      ///< band is not coded (used by encoder)
     DECLARE_ALIGNED_16(float, coeffs[1024]);  ///< coefficients for IMDCT
     DECLARE_ALIGNED_16(float, saved[1024]);   ///< overlap
     DECLARE_ALIGNED_16(float, ret[1024]);     ///< PCM output

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Sun Aug 17 11:37:12 2008
@@ -487,9 +487,10 @@ static void encode_window_bands_info(AAC
     for(i = stack_len - 1; i >= 0; i--){
         put_bits(&s->pb, 4, path[stack[i]].codebook);
         count = stack[i] - path[stack[i]].prev_idx;
+        memset(cpe->ch[channel].zeroes + win*16 + start, !path[stack[i]].codebook, count);
+        //XXX: memset when band_type is also uint8_t
         for(j = 0; j < count; j++){
             cpe->ch[channel].band_type[win*16 + start] =  path[stack[i]].codebook;
-            cpe->ch[channel].zeroes[win*16 + start]    = !path[stack[i]].codebook;
             start++;
         }
         while(count >= run_esc){



More information about the FFmpeg-soc mailing list