[FFmpeg-soc] [soc]: r3151 - mlp/mlpenc.c

ramiro subversion at mplayerhq.hu
Sun Aug 10 16:53:53 CEST 2008


Author: ramiro
Date: Sun Aug 10 16:53:53 2008
New Revision: 3151

Log:
Cosmetics: indent determine_bits().

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 10 16:53:53 2008
@@ -831,49 +831,49 @@ static inline void codebook_bits(MLPEnco
 
 static void determine_bits(MLPEncodeContext *ctx, unsigned int substr)
 {
-        DecodingParams *dp = &ctx->decoding_params[substr];
-        RestartHeader  *rh = &ctx->restart_header [substr];
-        unsigned int channel;
+    DecodingParams *dp = &ctx->decoding_params[substr];
+    RestartHeader  *rh = &ctx->restart_header [substr];
+    unsigned int channel;
 
-        for (channel = 0; channel <= rh->max_channel; channel++) {
-            int16_t min = INT16_MAX, max = INT16_MIN;
-            int best_codebook = 0;
-            BestOffset bo;
-            int average = 0;
-            int i;
+    for (channel = 0; channel <= rh->max_channel; channel++) {
+        int16_t min = INT16_MAX, max = INT16_MIN;
+        int best_codebook = 0;
+        BestOffset bo;
+        int average = 0;
+        int i;
 
-            /* Determine extremes and average. */
-            for (i = 0; i < dp->blocksize; i++) {
-                int32_t sample = ctx->sample_buffer[i][channel] >> 8;
-                if (sample < min)
-                    min = sample;
-                if (sample > max)
-                    max = sample;
-                average += sample;
-            }
-            average /= dp->blocksize;
+        /* Determine extremes and average. */
+        for (i = 0; i < dp->blocksize; i++) {
+            int32_t sample = ctx->sample_buffer[i][channel] >> 8;
+            if (sample < min)
+                min = sample;
+            if (sample > max)
+                max = sample;
+            average += sample;
+        }
+        average /= dp->blocksize;
 
-            no_codebook_bits(ctx, substr, channel, min, max, &bo);
+        no_codebook_bits(ctx, substr, channel, min, max, &bo);
 
-            for (i = 1; i < 4; i++) {
-                BestOffset temp_bo = { 0, INT_MAX, 0, };
+        for (i = 1; i < 4; i++) {
+            BestOffset temp_bo = { 0, INT_MAX, 0, };
 
-                codebook_bits(ctx, substr, channel, i - 1, average,
-                              min, max, &temp_bo, 0);
-                codebook_bits(ctx, substr, channel, i - 1, average,
-                              min, max, &temp_bo, 1);
+            codebook_bits(ctx, substr, channel, i - 1, average,
+                            min, max, &temp_bo, 0);
+            codebook_bits(ctx, substr, channel, i - 1, average,
+                            min, max, &temp_bo, 1);
 
-                if (temp_bo.bitcount < bo.bitcount) {
-                    bo = temp_bo;
-                    best_codebook = i;
-                }
+            if (temp_bo.bitcount < bo.bitcount) {
+                bo = temp_bo;
+                best_codebook = i;
             }
-
-            /* Update context. */
-            dp->huff_offset[channel] = bo.offset;
-            dp->huff_lsbs  [channel] = bo.lsb_bits + 8;
-            dp->codebook   [channel] = best_codebook;
         }
+
+        /* Update context. */
+        dp->huff_offset[channel] = bo.offset;
+        dp->huff_lsbs  [channel] = bo.lsb_bits + 8;
+        dp->codebook   [channel] = best_codebook;
+    }
 }
 
 static void write_block_data(MLPEncodeContext *ctx, PutBitContext *pb,



More information about the FFmpeg-soc mailing list