OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Oct 2013 19:46:42 +0000 (21:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Oct 2013 19:46:42 +0000 (21:46 +0200)
* qatar/master:
  atrac3: Generalize gain compensation code

Conflicts:
libavcodec/atrac.c
libavcodec/atrac.h
libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/atrac.c
libavcodec/atrac.h
libavcodec/atrac3.c

Simple merge
Simple merge
@@@ -413,18 -412,17 +413,17 @@@ static int decode_tonal_components(GetB
  static int decode_gain_control(GetBitContext *gb, GainBlock *block,
                                 int num_bands)
  {
-     int j, b;
 -    int i, j;
++    int b, j;
      int *level, *loc;
  
      AtracGainInfo *gain = block->g_block;
  
 -    for (i = 0; i <= num_bands; i++) {
 -        gain[i].num_points    = get_bits(gb, 3);
 -        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;
++        level              = gain[b].lev_code;
++        loc                = gain[b].loc_code;
  
 -        for (j = 0; j < gain[i].num_points; j++) {
 +        for (j = 0; j < gain[b].num_points; j++) {
              level[j] = get_bits(gb, 4);
              loc[j]   = get_bits(gb, 5);
              if (j && loc[j] <= loc[j - 1])
          }
      }
  
-     /* Clear unused blocks. */
+     /* Clear the unused blocks. */
 -    for (; i < 4 ; i++)
 -        gain[i].num_points = 0;
 +    for (; b < 4 ; b++)
 +        gain[b].num_points = 0;
  
      return 0;
  }