Merge remote-tracking branch 'shariman/wmall'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Dec 2011 23:37:55 +0000 (00:37 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Dec 2011 23:37:55 +0000 (00:37 +0100)
* shariman/wmall:
  Partially fix CDLMS prediction

Conflicts:
libavcodec/wmalosslessdec.c

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

@@@ -1117,23 -1110,28 +1110,28 @@@ static int decode_subframe(WmallDecodeC
      }
  
      if(rawpcm_tile) {
 -      
 -      int bits = s->bits_per_sample - padding_zeroes;
 -      int j;
 -      dprintf(s->avctx, "RAWPCM %d bits per sample. total %d bits, remain=%d\n", bits,
 -              bits * s->num_channels * subframe_len, get_bits_count(&s->gb));
 -      for(i = 0; i < s->num_channels; i++) {
 -          for(j = 0; j < subframe_len; j++) {
 -              s->channel_coeffs[i][j] = get_sbits(&s->gb, bits);
 -//            dprintf(s->avctx, "PCM[%d][%d] = 0x%04x\n", i, j, s->channel_coeffs[i][j]);
 -          }
 -      }
 +
 +        int bits = s->bits_per_sample - padding_zeroes;
 +        int j;
 +        dprintf(s->avctx, "RAWPCM %d bits per sample. total %d bits, remain=%d\n", bits,
 +                bits * s->num_channels * subframe_len, get_bits_count(&s->gb));
 +        for(i = 0; i < s->num_channels; i++) {
 +            for(j = 0; j < subframe_len; j++) {
 +                s->channel_coeffs[i][j] = get_sbits(&s->gb, bits);
 +//                dprintf(s->avctx, "PCM[%d][%d] = 0x%04x\n", i, j, s->channel_coeffs[i][j]);
 +            }
 +        }
      } else {
 -      for(i = 0; i < s->num_channels; i++)
 -          if(s->is_channel_coded[i]) {
 +        for(i = 0; i < s->num_channels; i++)
-             if(s->is_channel_coded[i])
-                 decode_channel_residues(s, i, subframe_len);
++            if(s->is_channel_coded[i]) {
+             decode_channel_residues(s, i, subframe_len);
+             if (s->seekable_tile)
+                 use_high_update_speed(s, i);
+             else
+                 use_normal_update_speed(s, i);
+             revert_cdlms(s, i, 0, subframe_len);
+         }
      }
-     revert_cdlms(s, subframe_len);
  
      /** handled one subframe */