[FFmpeg-soc] [soc]: r4343 - wmapro/wma3dec.c

faust3 subversion at mplayerhq.hu
Sat May 30 19:37:14 CEST 2009


Author: faust3
Date: Sat May 30 19:37:14 2009
New Revision: 4343

Log:
moved M/S stereo decision to wma_decode_channel_transform

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat May 30 18:49:23 2009	(r4342)
+++ wmapro/wma3dec.c	Sat May 30 19:37:14 2009	(r4343)
@@ -704,11 +704,15 @@ static int wma_decode_channel_transform(
                         all_bands = 1;
                     }
                 }else{
-                    chgroup->transform = 1;
-                    chgroup->decorrelation_matrix[0] = 0.70703125;  /** cos(pi/4) */
-                    chgroup->decorrelation_matrix[1] = -0.70703125;
-                    chgroup->decorrelation_matrix[2] = 0.70703125;
-                    chgroup->decorrelation_matrix[3] = 0.70703125;
+                    if(s->num_channels == 2){
+                        chgroup->transform = 1;
+                    }else{
+                        chgroup->transform = 2;
+                        chgroup->decorrelation_matrix[0] = 0.70703125;  /** cos(pi/4) */
+                        chgroup->decorrelation_matrix[1] = -0.70703125;
+                        chgroup->decorrelation_matrix[2] = 0.70703125;
+                        chgroup->decorrelation_matrix[3] = 0.70703125;
+                    }
                 }
             }else if(chgroup->num_channels > 2){
                 if(get_bits1(&s->gb)){
@@ -1018,11 +1022,7 @@ static void wma_inverse_channel_transfor
 
     for(i=0;i<s->num_chgroups;i++){
 
-        if(!s->chgroup[i].transform)
-            continue;
-
-        if((s->num_channels == 2) &&
-            (s->chgroup[i].transform == 1)){
+        if(s->chgroup[i].transform == 1){
             int b;
             /** M/S stereo decoding */
             for(b = 0; b < s->num_bands;b++){
@@ -1041,7 +1041,7 @@ static void wma_inverse_channel_transfor
                     }
                 }
             }
-        }else{
+        }else if(s->chgroup[i].transform){
             int x;
             int b;
             int cnt = 0;


More information about the FFmpeg-soc mailing list