Author: kostya
Date: Tue Aug 12 12:23:15 2008
New Revision: 3189

Log:
Get rid of Pulse.present field

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

Modified: aacenc/aac.h
==============================================================================
--- aacenc/aac.h        (original)
+++ aacenc/aac.h        Tue Aug 12 12:23:15 2008
@@ -250,7 +250,6 @@ typedef struct {
  * pulse tool
  */
 typedef struct {
-    int present;
     int num_pulse;
     int start;
     int offset[4];

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c     (original)
+++ aacenc/aacenc.c     Tue Aug 12 12:23:15 2008
@@ -524,8 +524,8 @@ static void encode_pulses(AVCodecContext
 {
     int i;
 
-    put_bits(&s->pb, 1, cpe->ch[channel].pulse.present);
-    if(!cpe->ch[channel].pulse.present) return;
+    put_bits(&s->pb, 1, !!cpe->ch[channel].pulse.num_pulse);
+    if(!cpe->ch[channel].pulse.num_pulse) return;
 
     put_bits(&s->pb, 2, cpe->ch[channel].pulse.num_pulse - 1);
     put_bits(&s->pb, 6, cpe->ch[channel].pulse.start);

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c     (original)
+++ aacenc/aacpsy.c     Tue Aug 12 12:23:15 2008
@@ -79,7 +79,7 @@ static void psy_create_output(AACPsyCont
     for(ch = 0; ch < chans; ch++){
         start = 0;
         maxsfb = 0;
-        cpe->ch[ch].pulse.present = 0;
+        cpe->ch[ch].pulse.num_pulse = 0;
         for(w = 0; w < cpe->ch[ch].ics.num_windows; w++){
             for(g = 0; g < cpe->ch[ch].ics.num_swb; g++){
                 sum = 0;
@@ -96,7 +96,7 @@ static void psy_create_output(AACPsyCont
                     memset(cpe->ch[ch].icoefs + start, 0, 
cpe->ch[ch].ics.swb_sizes[g] * sizeof(cpe->ch[0].icoefs[0]));
                 cpe->ch[ch].zeroes[w][g] = !sum;
                 //try finding pulses
-                if(search_pulses && cpe->ch[ch].ics.num_windows == 1 && 
!cpe->ch[ch].pulse.present){
+                if(search_pulses && cpe->ch[ch].ics.num_windows == 1 && 
!cpe->ch[ch].pulse.num_pulse){
                     pulses = 0;
                     memset(poff,0,sizeof(poff));
                     memset(pamp,0,sizeof(pamp));
@@ -109,7 +109,6 @@ static void psy_create_output(AACPsyCont
                         }
                     }
                     if(pulses){
-                        cpe->ch[ch].pulse.present = 1;
                         cpe->ch[ch].pulse.start = g;
                         cpe->ch[ch].pulse.num_pulse = pulses;
                         for(i = 0; i < pulses; i++){
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to