diff options
author | Martin Storsjö <martin@martin.st> | 2014-06-05 11:56:10 +0300 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-06-10 00:13:21 +0200 |
commit | 39256e54d1a47cbaf2aa02174953ad4f0d74bc42 (patch) | |
tree | ea2ab29ec269f82716ad533837fea16668ca102d | |
parent | 992cdbc56a56ea9d6ccd6853e60107b438eb0bc3 (diff) | |
download | ffmpeg-39256e54d1a47cbaf2aa02174953ad4f0d74bc42.tar.gz |
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: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a32765c4252eb106a2ade543026ef6f59e699bfa)
-rw-r--r-- | libavcodec/adpcmenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 5391570de7..bfcce328ef 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -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]); |