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

superdump subversion at mplayerhq.hu
Tue Jul 15 12:49:56 CEST 2008


Author: superdump
Date: Tue Jul 15 12:49:56 2008
New Revision: 2783

Log:
Declare interleaved_output[] with appropriate alignment for use in SIMD
functions

Patch by Pascal Patry ( iscy invalidip com )


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Tue Jul 15 12:49:56 2008
@@ -434,7 +434,7 @@ typedef struct {
      * @defgroup output   Members used for output interleaving and down-mixing.
      * @{
      */
-    float* interleaved_output;                        ///< Interim buffer for interleaving PCM samples.
+    DECLARE_ALIGNED_16(float, interleaved_output[MAX_CHANNELS * 1024]); ///< Interim buffer for interleaving PCM samples.
     float *output_data[MAX_CHANNELS];                 ///< Points to each element's 'ret' buffer (PCM output).
     ChannelElement *mm[3];                            ///< Center/Front/Back channel elements to use for matrix mix-down.
     float add_bias;                                   ///< offset for dsp.float_to_int16
@@ -604,11 +604,7 @@ static int output_configure(AACContext *
     }
 
     avctx->channels = channels;
-    ilo_tmp = ac->interleaved_output;
-    ac->interleaved_output = av_realloc(ac->interleaved_output, channels * 1024 * sizeof(float));
-    if(!ac->interleaved_output)
-        av_freep(ilo_tmp);
-    return ac->interleaved_output ? 0 : -1;
+    return 0;
 }
 
 
@@ -2335,7 +2331,6 @@ static av_cold int aac_decode_close(AVCo
         av_free(ac->mdct_ltp);
     }
 #endif /* AAC_LTP */
-    av_free(ac->interleaved_output);
     return 0 ;
 }
 



More information about the FFmpeg-soc mailing list