Revision d8b2d834

View differences:

libavcodec/adpcm.c
648 648
                    *dst++ = buf[0][i] | (buf[1][i] << 4);
649 649
            }
650 650
        } else
651
        for (; n>0; n--) {
652
            for(i = 0; i < avctx->channels; i++) {
653
                int nibble;
654
                nibble  = adpcm_yamaha_compress_sample(&c->status[i], samples[i]);
655
                nibble |= adpcm_yamaha_compress_sample(&c->status[i], samples[i+avctx->channels]) << 4;
656
                *dst++ = nibble;
657
            }
658
            samples += 2 * avctx->channels;
651
        for (n *= avctx->channels; n>0; n--) {
652
            int nibble;
653
            nibble  = adpcm_yamaha_compress_sample(&c->status[ 0], *samples++);
654
            nibble |= adpcm_yamaha_compress_sample(&c->status[st], *samples++) << 4;
655
            *dst++ = nibble;
659 656
        }
660 657
        break;
661 658
    default:
tests/rotozoom.regression.ref
193 193
268344 ./tests/data/a-adpcm_ms.wav
194 194
7be370f937c51e8a967e6a3d08d5156a *./tests/data/adpcm_ms.rotozoom.out.wav
195 195
stddev: 1050.00 PSNR: 35.90 bytes:  1060620/  1058444
196
14df8b8bb7c127ec70c0167df1c0dbf7 *./tests/data/a-adpcm_yam.wav
196
2546d72df736b5ffa1557e8c9c9ef788 *./tests/data/a-adpcm_yam.wav
197 197
266296 ./tests/data/a-adpcm_yam.wav
198
2f73107dafef6db42e545f9e466d3f05 *./tests/data/adpcm_yam.rotozoom.out.wav
199
stddev:18302.45 PSNR: 11.07 bytes:  1065004/  1058444
198
c80c847a53a0fee17a88fa889ec34a4e *./tests/data/adpcm_yam.rotozoom.out.wav
199
stddev: 1247.64 PSNR: 34.40 bytes:  1065004/  1058444
200 200
42d4639866ed4d692eaf126228a4fa2a *./tests/data/a-adpcm_swf.flv
201 201
269166 ./tests/data/a-adpcm_swf.flv
202 202
628089745a7059ae4055c2515b6d668b *./tests/data/adpcm_swf.rotozoom.out.wav
tests/vsynth.regression.ref
193 193
268344 ./tests/data/a-adpcm_ms.wav
194 194
7be370f937c51e8a967e6a3d08d5156a *./tests/data/adpcm_ms.vsynth.out.wav
195 195
stddev: 1050.00 PSNR: 35.90 bytes:  1060620/  1058444
196
14df8b8bb7c127ec70c0167df1c0dbf7 *./tests/data/a-adpcm_yam.wav
196
2546d72df736b5ffa1557e8c9c9ef788 *./tests/data/a-adpcm_yam.wav
197 197
266296 ./tests/data/a-adpcm_yam.wav
198
2f73107dafef6db42e545f9e466d3f05 *./tests/data/adpcm_yam.vsynth.out.wav
199
stddev:18302.45 PSNR: 11.07 bytes:  1065004/  1058444
198
c80c847a53a0fee17a88fa889ec34a4e *./tests/data/adpcm_yam.vsynth.out.wav
199
stddev: 1247.64 PSNR: 34.40 bytes:  1065004/  1058444
200 200
42d4639866ed4d692eaf126228a4fa2a *./tests/data/a-adpcm_swf.flv
201 201
269166 ./tests/data/a-adpcm_swf.flv
202 202
628089745a7059ae4055c2515b6d668b *./tests/data/adpcm_swf.vsynth.out.wav

Also available in: Unified diff