[FFmpeg-soc] [soc]: r2427 - aacenc/aacenc.c

kostya subversion at mplayerhq.hu
Fri Jun 13 08:12:22 CEST 2008


Author: kostya
Date: Fri Jun 13 08:12:22 2008
New Revision: 2427

Log:
Common window and max bands should be determined during analysis

Modified:
   aacenc/aacenc.c

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Fri Jun 13 08:12:22 2008
@@ -330,6 +330,10 @@ static void analyze(AVCodecContext *avct
         cpe->ch[channel].coeffs[i] = -copysignf(pow(fabsf(cpe->ch[channel].coeffs[i]), 0.75f), cpe->ch[channel].coeffs[i]);
 
     determine_scales(avctx, cpe, channel);
+    if(channel == 1){
+        cpe->ch[0].ics.max_sfb = FFMAX(cpe->ch[0].ics.max_sfb, cpe->ch[1].ics.max_sfb);
+        cpe->common_window = 1;
+    }
     apply_psychoacoustics(avctx, cpe, channel);
 }
 
@@ -524,7 +528,6 @@ static int aac_encode_frame(AVCodecConte
     case 2:
         put_bits(&s->pb, 3, ID_CPE);
         put_bits(&s->pb, 4, 0); //tag
-        s->cpe.common_window = 1;
         put_bits(&s->pb, 1, s->cpe.common_window);
         if(s->cpe.common_window){
             put_ics_info(avctx, &s->cpe.ch[0].ics);



More information about the FFmpeg-soc mailing list