Revision ac069107 libavcodec/adpcm.c

View differences:

libavcodec/adpcm.c
531 531

  
532 532
        //Init the encoder state
533 533
        for(i=0; i<avctx->channels; i++){
534
            c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); // clip step so it fits 6 bits
534 535
            put_bits(&pb, 16, samples[i] & 0xFFFF);
535
            put_bits(&pb, 6, c->status[i].step_index & 0x3F);
536
            put_bits(&pb, 6, c->status[i].step_index);
536 537
            c->status[i].prev_sample = (signed short)samples[i];
537 538
        }
538 539

  

Also available in: Unified diff