diff options
author | Timofei V. Bondarenko <tim@ipi.ac.ru> | 2007-10-17 23:02:35 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2007-10-17 23:02:35 +0000 |
commit | 880de6b0befad26a9557fcee679fee780e3dd7e3 (patch) | |
tree | 614f850b3184e609266afbbd9b802e527d4899f7 /libavcodec/adpcm.c | |
parent | 9c05103fe3fec0a025e2169810d29af599e75349 (diff) | |
download | ffmpeg-880de6b0befad26a9557fcee679fee780e3dd7e3.tar.gz |
Remove unnecessary guarding &=0x0f around adpcm_ima_compress_sample().
patch by Timofei, tim ipi.ac ru
Date: Mon, 15 Oct 2007 19:55:29 +0400
Subject: [FFmpeg-devel] [PATCH] adpcm-ima-wav header and codec
Originally committed as revision 10773 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 00eb8184bb..84543f3719 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -483,17 +483,17 @@ static int adpcm_encode_frame(AVCodecContext *avctx, } } else for (; n>0; n--) { - *dst = adpcm_ima_compress_sample(&c->status[0], samples[0]) & 0x0F; - *dst |= (adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels]) << 4) & 0xF0; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[0]); + *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels]) << 4; dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 2]) & 0x0F; - *dst |= (adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 3]) << 4) & 0xF0; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 2]); + *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 3]) << 4; dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 4]) & 0x0F; - *dst |= (adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 5]) << 4) & 0xF0; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 4]); + *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 5]) << 4; dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 6]) & 0x0F; - *dst |= (adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 7]) << 4) & 0xF0; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 6]); + *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 7]) << 4; dst++; /* right channel */ if (avctx->channels == 2) { @@ -544,9 +544,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx, } } else { for (i=1; i<avctx->frame_size; i++) { - put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels*i]) & 0xF); + put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels*i])); if (avctx->channels == 2) - put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[1], samples[2*i+1]) & 0xF); + put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[1], samples[2*i+1])); } } flush_put_bits(&pb); |