[FFmpeg-cvslog] adpcm: Fix trellis encoding of IMA QT

Martin Storsjö git at videolan.org
Tue Jun 10 00:38:46 CEST 2014


ffmpeg | branch: release/1.2 | Martin Storsjö <martin at martin.st> | Thu Jun  5 11:56:10 2014 +0300| [71516ac175aaf10466db1998205aea8a31387370] | committer: Carl Eugen Hoyos

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 at gmx.at>
(cherry picked from commit a32765c4252eb106a2ade543026ef6f59e699bfa)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=71516ac175aaf10466db1998205aea8a31387370
---

 libavcodec/adpcmenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 59f016b..fed0cc8 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -557,7 +557,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]);



More information about the ffmpeg-cvslog mailing list