[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec adpcm.c,1.28,1.29
Michael Niedermayer CVS
michael
Sat Jul 16 13:18:45 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv5302
Modified Files:
adpcm.c
Log Message:
yamaha adpcm nibbles in the wrong order fix by (Vidar Madsen: vidarino, gmail com)
Index: adpcm.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/adpcm.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- adpcm.c 15 Jul 2005 06:51:36 -0000 1.28
+++ adpcm.c 16 Jul 2005 11:18:42 -0000 1.29
@@ -406,8 +406,8 @@
for (; n>0; n--) {
for(i = 0; i < avctx->channels; i++) {
int nibble;
- nibble = adpcm_yamaha_compress_sample(&c->status[i], samples[i]) << 4;
- nibble |= adpcm_yamaha_compress_sample(&c->status[i], samples[i+avctx->channels]);
+ nibble = adpcm_yamaha_compress_sample(&c->status[i], samples[i]);
+ nibble |= adpcm_yamaha_compress_sample(&c->status[i], samples[i+avctx->channels]) << 4;
*dst++ = nibble;
}
samples += 2 * avctx->channels;
@@ -1047,14 +1047,14 @@
while (src < buf + buf_size) {
if (st) {
*samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
- (src[0] >> 4) & 0x0F);
- *samples++ = adpcm_yamaha_expand_nibble(&c->status[1],
src[0] & 0x0F);
- } else {
- *samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
+ *samples++ = adpcm_yamaha_expand_nibble(&c->status[1],
(src[0] >> 4) & 0x0F);
+ } else {
*samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
src[0] & 0x0F);
+ *samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
+ (src[0] >> 4) & 0x0F);
}
src++;
}
More information about the ffmpeg-cvslog
mailing list