diff wmaprodec.c @ 10006:4b91b74ff669 libavcodec

cosmetics: K&R coding style, prettyprinting
author diego
date Sun, 02 Aug 2009 13:35:42 +0000
parents ca678269fa64
children 57d76996ccb8
line wrap: on
line diff
--- a/wmaprodec.c	Sun Aug 02 12:57:07 2009 +0000
+++ b/wmaprodec.c	Sun Aug 02 13:35:42 2009 +0000
@@ -13,7 +13,7 @@
     av_freep(&s->subwoofer_cutoffs);
     av_freep(&s->sf_offsets);
 
-    for (i=0 ; i<WMAPRO_BLOCK_SIZES ; i++)
+    for (i = 0 ; i < WMAPRO_BLOCK_SIZES ; i++)
         ff_mdct_end(&s->mdct_ctx[i]);
 
     return 0;
@@ -24,8 +24,8 @@
  *@param s codec context
  *@param chgroup channel group for which the matrix needs to be calculated
  */
-static void decode_decorrelation_matrix(WMA3DecodeContext* s,
-                                            WMA3ChannelGroup* chgroup)
+static void decode_decorrelation_matrix(WMA3DecodeContext *s,
+                                        WMA3ChannelGroup *chgroup)
 {
     int i;
     int offset = 0;
@@ -33,25 +33,25 @@
     memset(chgroup->decorrelation_matrix,0,
            sizeof(float) *s->num_channels * s->num_channels);
 
-    for (i=0;i<chgroup->num_channels  * (chgroup->num_channels - 1) >> 1;i++)
+    for (i = 0; i < chgroup->num_channels * (chgroup->num_channels - 1) >> 1; i++)
         rotation_offset[i] = get_bits(&s->gb,6);
 
-    for (i=0;i<chgroup->num_channels;i++)
+    for (i = 0; i < chgroup->num_channels; i++)
         chgroup->decorrelation_matrix[chgroup->num_channels * i + i] =
                                                 get_bits1(&s->gb) ? 1.0 : -1.0;
 
-    for (i=1;i<chgroup->num_channels;i++) {
+    for (i = 1; i < chgroup->num_channels; i++) {
         int x;
-        for (x=0;x<i;x++) {
+        for (x = 0; x < i; x++) {
             int y;
-            for (y=0;y < i + 1 ; y++) {
+            for (y = 0; y < i + 1 ; y++) {
                 float v1 = chgroup->decorrelation_matrix[x * chgroup->num_channels + y];
                 float v2 = chgroup->decorrelation_matrix[i * chgroup->num_channels + y];
                 int n = rotation_offset[offset + x];
                 float sinv;
                 float cosv;
 
-                if (n<32) {
+                if (n < 32) {
                     sinv = sin64[n];
                     cosv = sin64[32-n];
                 } else {
@@ -77,7 +77,7 @@
 {
     int i;
 
-    for (i=0;i<s->num_chgroups;i++) {
+    for (i = 0; i < s->num_chgroups; i++) {
 
         if (s->chgroup[i].transform == 1) {
             /** M/S stereo decoding */
@@ -119,10 +119,10 @@
                 if (*tb++ == 1) {
                     int y;
                     /** multiply values with the decorrelation_matrix */
-                    for (y=sfb[0];y<FFMIN(sfb[1], s->subframe_len);y++) {
+                    for (y = sfb[0]; y < FFMIN(sfb[1], s->subframe_len); y++) {
                         const float* mat = s->chgroup[i].decorrelation_matrix;
-                        const float* data_end= data + num_channels;
-                        float* data_ptr= data;
+                        const float* data_end = data + num_channels;
+                        float* data_ptr = data;
                         float** ch;
 
                         for (ch = ch_data;ch < ch_end; ch++)