Merge remote-tracking branch 'shariman/wmall'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 22:45:35 +0000 (23:45 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 22:45:48 +0000 (23:45 +0100)
* shariman/wmall:
  Fix audio output
  Suppress dumping of residues buffer
  Use quantizer value read from bitstream
  Cosmetics: Remove two empty lines and realign some code
  Reset acfilter_prevvalues buffer in clear_codec_buffers()
  Fix AC filter buffers and AC filter reversion

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

@@@ -701,26 -709,26 +709,26 @@@ static int decode_channel_residues(Wmal
      }
      //av_log(0, 0, "%8d: ", num_logged_tiles++);
      for(; i < tile_size; i++) {
 -      int quo = 0, rem, rem_bits, residue;
 -      while(get_bits1(&s->gb))
 -          quo++;
 -      if(quo >= 32)
 -          quo += get_bits_long(&s->gb, get_bits(&s->gb, 5) + 1);
 -
 -              ave_mean = (s->ave_sum[ch] + (1 << s->movave_scaling)) >> (s->movave_scaling + 1);
 -      rem_bits = av_ceil_log2(ave_mean);
 -      rem = rem_bits ? get_bits(&s->gb, rem_bits) : 0;
 -      residue = (quo << rem_bits) + rem;
 -
 -      s->ave_sum[ch] = residue + s->ave_sum[ch] - (s->ave_sum[ch] >> s->movave_scaling);
 -
 -      if(residue & 1)
 -          residue = -(residue >> 1) - 1;
 -      else
 -          residue = residue >> 1;
 -      s->channel_residues[ch][i] = residue;
 +        int quo = 0, rem, rem_bits, residue;
 +        while(get_bits1(&s->gb))
 +            quo++;
 +        if(quo >= 32)
 +            quo += get_bits_long(&s->gb, get_bits(&s->gb, 5) + 1);
 +
 +               ave_mean = (s->ave_sum[ch] + (1 << s->movave_scaling)) >> (s->movave_scaling + 1);
 +        rem_bits = av_ceil_log2(ave_mean);
 +        rem = rem_bits ? get_bits(&s->gb, rem_bits) : 0;
 +        residue = (quo << rem_bits) + rem;
 +
 +        s->ave_sum[ch] = residue + s->ave_sum[ch] - (s->ave_sum[ch] >> s->movave_scaling);
 +
 +        if(residue & 1)
 +            residue = -(residue >> 1) - 1;
 +        else
 +            residue = residue >> 1;
 +        s->channel_residues[ch][i] = residue;
      }
-     dump_int_buffer(s->channel_residues[ch], 4, tile_size, 16);
+     //dump_int_buffer(s->channel_residues[ch], 4, tile_size, 16);
  
      return 0;