diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 22:06:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 22:06:55 +0200 |
commit | 75f847aa6b1bc88733e59d680809f614977b4c07 (patch) | |
tree | 53261bf30de91f2f8c831d51b65e002840415e3d /libavcodec/adpcm.c | |
parent | aab5a4521c4034c218cbd72325b5d1946a3ec3c2 (diff) | |
parent | f1ffb01ee9fd3a15c395c3cf6ff362ac5cd668d0 (diff) | |
download | ffmpeg-75f847aa6b1bc88733e59d680809f614977b4c07.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avplay: use libavresample for sample format conversion and channel mixing
Fix compilation with YASM/NASM without AVX support.
WMAL: do not output last frame again if nothing was decoded in current packet
WMAL: do not start decoding if frame does not end in current packet
adpcm-thp: fix invalid array indexing
ppc: add const where needed in scalarproduct_int16_altivec()
ppc: remove shift parameter from scalarproduct_int16_altivec()
ppc: dsputil: do unaligned block accesses correctly
dvenc: do not call dsputil functions with stride not a multiple of 16
APIchanges: fill in some dates and commit hashes
Conflicts:
doc/APIchanges
ffplay.c
libavcodec/adpcm.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index c1f6ee0a5b..b86168acb8 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1212,12 +1212,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int prev[2][2]; int ch; - for (i = 0; i < 32; i++) - table[0][i] = sign_extend(bytestream2_get_be16u(&gb), 16); + for (i = 0; i < 2; i++) + for (n = 0; n < 16; n++) + table[i][n] = sign_extend(bytestream2_get_be16u(&gb), 16); /* Initialize the previous sample. */ - for (i = 0; i < 4; i++) - prev[i>>1][i&1] = sign_extend(bytestream2_get_be16u(&gb), 16); + for (i = 0; i < 2; i++) + for (n = 0; n < 2; n++) + prev[i][n] = sign_extend(bytestream2_get_be16u(&gb), 16); for (ch = 0; ch <= st; ch++) { samples = (short *)c->frame.data[0] + ch; |