[FFmpeg-soc] [soc]: r3294 - in aac: aac.c aactab.c aactab.h

superdump subversion at mplayerhq.hu
Fri Aug 15 01:10:14 CEST 2008


Author: superdump
Date: Fri Aug 15 01:10:14 2008
New Revision: 3294

Log:
Use shared ff_sine_#[] tables from mdct.c


Modified:
   aac/aac.c
   aac/aactab.c
   aac/aactab.h

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Fri Aug 15 01:10:14 2008
@@ -481,8 +481,8 @@ static av_cold int aac_decode_init(AVCod
         // window initialization
         ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 256);
         ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 32);
-        ff_sine_window_init(ff_aac_sine_long_1024, 256);
-        ff_sine_window_init(ff_aac_sine_short_128, 32);
+        ff_sine_window_init(ff_sine_1024, 256);
+        ff_sine_window_init(ff_sine_128, 32);
         ssr_context_init(&ac->ssrctx);
     } else {
 #endif /* AAC_SSR */
@@ -491,8 +491,8 @@ static av_cold int aac_decode_init(AVCod
         // window initialization
         ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
         ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
-        ff_sine_window_init(ff_aac_sine_long_1024, 1024);
-        ff_sine_window_init(ff_aac_sine_short_128, 128);
+        ff_sine_window_init(ff_sine_1024, 1024);
+        ff_sine_window_init(ff_sine_128, 128);
 #ifdef AAC_SSR
     }
 #endif /* AAC_SSR */
@@ -1325,10 +1325,10 @@ static void apply_tns(float coef[1024], 
 
 #ifdef AAC_LTP
 static void windowing_and_mdct_ltp(AACContext * ac, float * out, float * in, IndividualChannelStream * ics) {
-    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
-    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
+    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
+    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
     float * buf = ac->buf_mdct;
     assert(ics->window_sequence[0] != EIGHT_SHORT_SEQUENCE);
     if (ics->window_sequence[0] != LONG_STOP_SEQUENCE) {
@@ -1410,10 +1410,10 @@ static void imdct_and_windowing(AACConte
     float * in = sce->coeffs;
     float * out = sce->ret;
     float * saved = sce->saved;
-    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
-    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
+    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
+    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
     float * buf = ac->buf_mdct;
     int i;
 
@@ -1468,10 +1468,10 @@ static void imdct_and_windowing(AACConte
 
 #ifdef AAC_SSR
 static void windowing_and_imdct_ssr(AACContext * ac, float * out, float * in, IndividualChannelStream * ics) {
-    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
-    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_aac_sine_long_1024;
-    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_aac_sine_short_128;
+    const float * lwindow      = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow      = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
+    const float * lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
+    const float * swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
     float * buf = ac->buf_mdct;
     if (ics->window_sequence[0] != EIGHT_SHORT_SEQUENCE) {
         ff_imdct_calc(&ac->mdct, buf, in);

Modified: aac/aactab.c
==============================================================================
--- aac/aactab.c	(original)
+++ aac/aactab.c	Fri Aug 15 01:10:14 2008
@@ -34,8 +34,6 @@
 
 DECLARE_ALIGNED(16, float,  ff_aac_kbd_long_1024[1024]);
 DECLARE_ALIGNED(16, float,  ff_aac_kbd_short_128[128]);
-DECLARE_ALIGNED(16, float, ff_aac_sine_long_1024[1024]);
-DECLARE_ALIGNED(16, float, ff_aac_sine_short_128[128]);
 
 const uint8_t ff_aac_num_swb_1024[] = {
     41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40

Modified: aac/aactab.h
==============================================================================
--- aac/aactab.h	(original)
+++ aac/aactab.h	Fri Aug 15 01:10:14 2008
@@ -45,8 +45,6 @@
  */
 DECLARE_ALIGNED(16, extern float,  ff_aac_kbd_long_1024[1024]);
 DECLARE_ALIGNED(16, extern float,  ff_aac_kbd_short_128[128]);
-DECLARE_ALIGNED(16, extern float, ff_aac_sine_long_1024[1024]);
-DECLARE_ALIGNED(16, extern float, ff_aac_sine_short_128[128]);
 // @}
 
 /* @name number of scalefactor window bands for long and short transform windows respectively



More information about the FFmpeg-soc mailing list