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

faust3 subversion at mplayerhq.hu
Mon May 25 22:14:00 CEST 2009


Author: faust3
Date: Mon May 25 22:13:59 2009
New Revision: 4310

Log:
avoid divison and modulo operations in wma_inverse_channel_transform

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sun May 24 21:36:00 2009	(r4309)
+++ wmapro/wma3dec.c	Mon May 25 22:13:59 2009	(r4310)
@@ -1063,8 +1063,11 @@ static void wma_inverse_channel_transfor
                         for(m = 0;m<s->chgroup[i].num_channels;m++)
                             sums[m] = 0;
 
-                        for(m = 0;m<s->chgroup[i].num_channels * s->chgroup[i].num_channels;m++)
-                            sums[m/s->chgroup[i].num_channels] += (matrix[m] * ch_data[m%s->chgroup[i].num_channels][0]);
+                        for(m = 0;m<s->chgroup[i].num_channels;m++){
+                            int k;
+                            for(k=0;k<s->chgroup[i].num_channels;k++)
+                                sums[m] += (matrix[m*s->chgroup[i].num_channels+k] * ch_data[k][0]);
+                        }
 
                         for(m = 0;m<s->chgroup[i].num_channels;m++){
                             ch_data[m][0] = sums[m];


More information about the FFmpeg-soc mailing list