Commit 84dfa8a1 authored by banan's avatar banan

Set the step index correctly for flash adpcm. Patch by Baptiste

Coudurier.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9743 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fe55c31b
...@@ -531,8 +531,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx, ...@@ -531,8 +531,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx,
//Init the encoder state //Init the encoder state
for(i=0; i<avctx->channels; i++){ for(i=0; i<avctx->channels; i++){
c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); // clip step so it fits 6 bits
put_bits(&pb, 16, samples[i] & 0xFFFF); put_bits(&pb, 16, samples[i] & 0xFFFF);
put_bits(&pb, 6, c->status[i].step_index & 0x3F); put_bits(&pb, 6, c->status[i].step_index);
c->status[i].prev_sample = (signed short)samples[i]; c->status[i].prev_sample = (signed short)samples[i];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment