[FFmpeg-soc] [soc]: r2792 - aac/aac.c

superdump subversion at mplayerhq.hu
Tue Jul 15 15:52:23 CEST 2008


Author: superdump
Date: Tue Jul 15 15:52:23 2008
New Revision: 2792

Log:
Move ff_mdct_init() for LTP into aac_decode_init


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Tue Jul 15 15:52:23 2008
@@ -421,7 +421,7 @@ typedef struct {
     MDCTContext mdct;
     MDCTContext mdct_small;
 #ifdef AAC_LTP
-    MDCTContext *mdct_ltp;
+    MDCTContext mdct_ltp;
 #endif /* AAC_LTP */
     DSPContext dsp;
 #ifdef AAC_SSR
@@ -922,6 +922,9 @@ static av_cold int aac_decode_init(AVCod
         code, sizeof(code[0]), sizeof(code[0]),
         352);
 
+#ifdef AAC_LTP
+        ff_mdct_init(ac->mdct_ltp, 11, 0);
+#endif /* AAC_LTP */
 #ifdef AAC_SSR
     if (ac->audioObjectType == AOT_AAC_SSR) {
         ff_mdct_init(&ac->mdct, 9, 1);
@@ -1790,10 +1793,6 @@ static void windowing_and_mdct_ltp(AACCo
     float * buf = ac->buf_mdct;
     int i;
     assert(ics->window_sequence != EIGHT_SHORT_SEQUENCE);
-    if (!ac->mdct_ltp) {
-        ac->mdct_ltp = av_malloc(sizeof(MDCTContext));
-        ff_mdct_init(ac->mdct_ltp, 11, 0);
-    }
     if (ics->window_sequence != LONG_STOP_SEQUENCE) {
         vector_fmul_dst(ac, buf, in, lwindow_prev, 1024);
     } else {
@@ -2333,10 +2332,7 @@ static av_cold int aac_decode_close(AVCo
     ff_mdct_end(&ac->mdct);
     ff_mdct_end(&ac->mdct_small);
 #ifdef AAC_LTP
-    if (ac->mdct_ltp) {
         ff_mdct_end(ac->mdct_ltp);
-        av_free(ac->mdct_ltp);
-    }
 #endif /* AAC_LTP */
     av_freep(&ac->interleaved_output);
     return 0 ;



More information about the FFmpeg-soc mailing list