[FFmpeg-cvslog] atrac3/decode_gain_control: cosmetics

Maxim Poliakovski git at videolan.org
Wed Oct 2 11:08:20 CEST 2013


ffmpeg | branch: master | Maxim Poliakovski <max_pole at gmx.de> | Wed Oct  2 02:23:16 2013 +0200| [4fa2484067d19a69dfe6f6e6b67a58fcba380a27] | committer: Michael Niedermayer

atrac3/decode_gain_control: cosmetics

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fa2484067d19a69dfe6f6e6b67a58fcba380a27
---

 libavcodec/atrac3.c |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 963dbd3..f68b33c 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -418,28 +418,27 @@ static int decode_tonal_components(GetBitContext *gb,
 static int decode_gain_control(GetBitContext *gb, GainBlock *block,
                                int num_bands)
 {
-    int i, cf, num_data;
+    int i, b;
     int *level, *loc;
 
     AtracGainInfo *gain = block->g_block;
 
-    for (i = 0; i <= num_bands; i++) {
-        num_data              = get_bits(gb, 3);
-        gain[i].num_points    = num_data;
-        level                 = gain[i].lev_code;
-        loc                   = gain[i].loc_code;
+    for (b = 0; b <= num_bands; b++) {
+        gain[b].num_points = get_bits(gb, 3);
+        level              = gain[b].levcode;
+        loc                = gain[b].loccode;
 
-        for (cf = 0; cf < gain[i].num_points; cf++) {
-            level[cf] = get_bits(gb, 4);
-            loc  [cf] = get_bits(gb, 5);
-            if (cf && loc[cf] <= loc[cf - 1])
+        for (i = 0; i < gain[b].num_points; i++) {
+            level[i] = get_bits(gb, 4);
+            loc  [i] = get_bits(gb, 5);
+            if (i && loc[i] <= loc[i-1])
                 return AVERROR_INVALIDDATA;
         }
     }
 
-    /* Clear the unused blocks. */
-    for (; i < 4 ; i++)
-        gain[i].num_points = 0;
+    /* Clear unused blocks. */
+    for (; b < 4 ; b++)
+        gain[b].num_points = 0;
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list