Commit 36ef4f42 authored by bcoudurier's avatar bcoudurier

fix adpcm ima qt decoding, channel at init is 0, correct stereo out since...

fix adpcm ima qt decoding, channel at init is 0, correct stereo out since samples += avctx->channels

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12965 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fc91ae96
...@@ -959,9 +959,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx, ...@@ -959,9 +959,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
if(st) { /* handle stereo interlacing */ if(st) { /* handle stereo interlacing */
c->channel = (channel + 1) % 2; /* we get one packet for left, then one for right data */ c->channel = (channel + 1) % 2; /* we get one packet for left, then one for right data */
if(channel == 1) { /* wait for the other packet before outputing anything */ if(!channel) { /* wait for the other packet before outputing anything */
return src - buf; return src - buf;
} }
samples--;
} }
break; break;
case CODEC_ID_ADPCM_IMA_WAV: case CODEC_ID_ADPCM_IMA_WAV:
......
...@@ -179,8 +179,8 @@ stddev:8368.02 PSNR:17.87 bytes:96256 ...@@ -179,8 +179,8 @@ stddev:8368.02 PSNR:17.87 bytes:96256
stddev:904.20 PSNR:37.19 bytes:1056768 stddev:904.20 PSNR:37.19 bytes:1056768
efdae2746040dbc27be402b149556f1e *./tests/data/a-adpcm_qt.aiff efdae2746040dbc27be402b149556f1e *./tests/data/a-adpcm_qt.aiff
281184 ./tests/data/a-adpcm_qt.aiff 281184 ./tests/data/a-adpcm_qt.aiff
468fcd54a438f1b74060c2e9665be59e *./tests/data/adpcm_ima_qt.vsynth.out.wav 5a2084ad27674d5cf3bc2945061e7910 *./tests/data/adpcm_ima_qt.vsynth.out.wav
stddev:8931.22 PSNR:17.30 bytes:1056768 stddev:915.35 PSNR:37.09 bytes:1056768
628d4789cf9ee16a756ac54b7fd8650d *./tests/data/a-adpcm_ms.wav 628d4789cf9ee16a756ac54b7fd8650d *./tests/data/a-adpcm_ms.wav
267320 ./tests/data/a-adpcm_ms.wav 267320 ./tests/data/a-adpcm_ms.wav
91a84bb4f319a3a0bf0c0441b3d3a529 *./tests/data/adpcm_ms.vsynth.out.wav 91a84bb4f319a3a0bf0c0441b3d3a529 *./tests/data/adpcm_ms.vsynth.out.wav
......
...@@ -179,8 +179,8 @@ stddev:8368.02 PSNR:17.87 bytes:96256 ...@@ -179,8 +179,8 @@ stddev:8368.02 PSNR:17.87 bytes:96256
stddev:904.20 PSNR:37.19 bytes:1056768 stddev:904.20 PSNR:37.19 bytes:1056768
efdae2746040dbc27be402b149556f1e *./tests/data/a-adpcm_qt.aiff efdae2746040dbc27be402b149556f1e *./tests/data/a-adpcm_qt.aiff
281184 ./tests/data/a-adpcm_qt.aiff 281184 ./tests/data/a-adpcm_qt.aiff
468fcd54a438f1b74060c2e9665be59e *./tests/data/adpcm_ima_qt.rotozoom.out.wav 5a2084ad27674d5cf3bc2945061e7910 *./tests/data/adpcm_ima_qt.rotozoom.out.wav
stddev:8931.22 PSNR:17.30 bytes:1056768 stddev:915.35 PSNR:37.09 bytes:1056768
628d4789cf9ee16a756ac54b7fd8650d *./tests/data/a-adpcm_ms.wav 628d4789cf9ee16a756ac54b7fd8650d *./tests/data/a-adpcm_ms.wav
267320 ./tests/data/a-adpcm_ms.wav 267320 ./tests/data/a-adpcm_ms.wav
91a84bb4f319a3a0bf0c0441b3d3a529 *./tests/data/adpcm_ms.rotozoom.out.wav 91a84bb4f319a3a0bf0c0441b3d3a529 *./tests/data/adpcm_ms.rotozoom.out.wav
......
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