Commit a32765c4 authored by Martin Storsjö's avatar Martin Storsjö Committed by Michael Niedermayer

adpcm: Fix trellis encoding of IMA QT

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals &samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was &samples[avctx->channels + ch], which was correctly
changed into &samples_p[ch][1].

Fixes part of Ticket3701
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3133e7fd
......@@ -549,7 +549,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
put_bits(&pb, 7, status->step_index);
if (avctx->trellis > 0) {
uint8_t buf[64];
adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status,
adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status,
64, 1);
for (i = 0; i < 64; i++)
put_bits(&pb, 4, buf[i ^ 1]);
......
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