[FFmpeg-soc] [soc]: r4366 - in wmapro: wma3.h wma3dec.c

faust3 subversion at mplayerhq.hu
Mon Jun 1 13:45:46 CEST 2009


Author: faust3
Date: Mon Jun  1 13:45:45 2009
New Revision: 4366

Log:
make sin64 static so that it can be reused for multiple instances

Modified:
   wmapro/wma3.h
   wmapro/wma3dec.c

Modified: wmapro/wma3.h
==============================================================================
--- wmapro/wma3.h	Mon Jun  1 13:37:49 2009	(r4365)
+++ wmapro/wma3.h	Mon Jun  1 13:45:45 2009	(r4366)
@@ -93,7 +93,6 @@ typedef struct WMA3DecodeContext {
     MDCTContext      mdct_ctx[BLOCK_NB_SIZES];      ///< MDCT context per block size
     DECLARE_ALIGNED_16(float, tmp[BLOCK_MAX_SIZE]); ///< imdct output buffer
     float*           windows[BLOCK_NB_SIZES];       ///< window per block size
-    float            sin64[33];                     ///< sinus table for decorrelation
     int              coef_max[2];                   ///< max length of vlc codes
 
     /** frame size dependent frame information (set during initialization) */

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Mon Jun  1 13:37:49 2009	(r4365)
+++ wmapro/wma3dec.c	Mon Jun  1 13:45:45 2009	(r4366)
@@ -87,6 +87,7 @@ static VLC              vec4_vlc;       
 static VLC              vec2_vlc;         ///< 2 coefficients per symbol
 static VLC              vec1_vlc;         ///< 1 coefficient per symbol
 static VLC              coef_vlc[2];      ///< coefficient run length vlc codes
+static float            sin64[33];        ///< sinus table for decorrelation
 
 
 /**
@@ -396,7 +397,7 @@ static av_cold int wma_decode_init(AVCod
 
     /** calculate sine values for the decorrelation matrix */
     for(i=0;i<33;i++)
-        s->sin64[i] = sin(i*M_PI / 64.0);
+        sin64[i] = sin(i*M_PI / 64.0);
 
     wma_dump_context(s);
     avctx->channel_layout = channel_mask;
@@ -625,11 +626,11 @@ static void wma_decode_decorrelation_mat
                 float cosv;
 
                 if(n<32){
-                    sinv = s->sin64[n];
-                    cosv = s->sin64[32-n];
+                    sinv = sin64[n];
+                    cosv = sin64[32-n];
                 }else{
-                    sinv = s->sin64[64-n];
-                    cosv = -s->sin64[n-32];
+                    sinv = sin64[64-n];
+                    cosv = -sin64[n-32];
                 }
 
                 chgroup->decorrelation_matrix[y + x * chgroup->num_channels] =


More information about the FFmpeg-soc mailing list