diff mpegaudiodec.c @ 10440:899237b1961f libavcodec

mpegaudiodec, mpc and qdm2 all use the same mpa_synth window, so make them use the same variable/global storage. Saves 4 kB in .bss.
author reimar
date Mon, 19 Oct 2009 17:21:02 +0000
parents e234640098aa
children 23ca6d60184d
line wrap: on
line diff
--- a/mpegaudiodec.c	Mon Oct 19 15:51:34 2009 +0000
+++ b/mpegaudiodec.c	Mon Oct 19 17:21:02 2009 +0000
@@ -120,7 +120,7 @@
     SCALE_GEN(4.0 / 9.0), /* 9 steps */
 };
 
-static DECLARE_ALIGNED_16(MPA_INT, window[512]);
+DECLARE_ALIGNED_16(MPA_INT, ff_mpa_synth_window[512]);
 
 /**
  * Convert region offsets to region sizes and truncate
@@ -351,7 +351,7 @@
                     scale_factor_mult[i][2]);
         }
 
-        ff_mpa_synth_init(window);
+        ff_mpa_synth_init(ff_mpa_synth_window);
 
         /* huffman decode tables */
         offset = 0;
@@ -2238,7 +2238,7 @@
         samples_ptr = samples + ch;
         for(i=0;i<nb_frames;i++) {
             ff_mpa_synth_filter(s->synth_buf[ch], &(s->synth_buf_offset[ch]),
-                         window, &s->dither_state,
+                         ff_mpa_synth_window, &s->dither_state,
                          samples_ptr, s->nb_channels,
                          s->sb_samples[ch][i]);
             samples_ptr += 32 * s->nb_channels;