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

faust3 subversion at mplayerhq.hu
Sat May 30 16:00:19 CEST 2009


Author: faust3
Date: Sat May 30 16:00:19 2009
New Revision: 4338

Log:
init decorrelation_matrix in wma_decode_channel_transform

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

Modified: wmapro/wma3.h
==============================================================================
--- wmapro/wma3.h	Sat May 30 15:55:16 2009	(r4337)
+++ wmapro/wma3.h	Sat May 30 16:00:19 2009	(r4338)
@@ -79,7 +79,6 @@ typedef struct {
     int   transform;                                       ///< also controls the type of the transform
     char  transform_band[MAX_BANDS];                       ///< controls if the transform is enabled for a certain band
     char  rotation_offset[MAX_CHANNELS * MAX_CHANNELS];
-    char  positive[MAX_CHANNELS * MAX_CHANNELS];           ///< FIXME: What are these numbers used for?
     float decorrelation_matrix[MAX_CHANNELS*MAX_CHANNELS];
     char  use_channel[MAX_CHANNELS];
 } WMA3ChannelGroup;

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat May 30 15:55:16 2009	(r4337)
+++ wmapro/wma3dec.c	Sat May 30 16:00:19 2009	(r4338)
@@ -732,7 +732,7 @@ static int wma_decode_channel_transform(
                     chgroup->rotation_offset[i] = get_bits(&s->gb,6);
                 }
                 for(i=0;i<chgroup->num_channels;i++)
-                    chgroup->positive[i] = get_bits1(&s->gb);
+                    chgroup->decorrelation_matrix[chgroup->num_channels * i + i] = get_bits1(&s->gb)?1.0:-1.0;
             }
 
             /** decode transform on / off */
@@ -1013,8 +1013,6 @@ static void wma_calc_decorrelation_matri
 {
     int i;
     int offset = 0;
-    for(i=0;i<chgroup->num_channels;i++)
-        chgroup->decorrelation_matrix[chgroup->num_channels * i + i] = chgroup->positive[i]?1.0:-1.0;
 
     for(i=1;i<chgroup->num_channels;i++){
         int x;


More information about the FFmpeg-soc mailing list