diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2007-06-02 01:41:07 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2007-06-02 01:41:07 +0000 |
commit | 2c124cb65c24cc7d0538260726045d68442eef25 (patch) | |
tree | 3752a8d02aa478d977264e8ce0438f49c92a4aca /libavcodec/adpcm.c | |
parent | 29b29011e5631c4e867baf42258a00886d142841 (diff) | |
download | ffmpeg-2c124cb65c24cc7d0538260726045d68442eef25.tar.gz |
Use AV_xx throughout libavcodec
Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 05cca3f43a..030b0edd50 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -451,16 +451,14 @@ static int adpcm_encode_frame(AVCodecContext *avctx, n = avctx->frame_size / 8; c->status[0].prev_sample = (signed short)samples[0]; /* XXX */ /* c->status[0].step_index = 0; *//* XXX: not sure how to init the state machine */ - *dst++ = (c->status[0].prev_sample) & 0xFF; /* little endian */ - *dst++ = (c->status[0].prev_sample >> 8) & 0xFF; + bytestream_put_le16(&dst, c->status[0].prev_sample); *dst++ = (unsigned char)c->status[0].step_index; *dst++ = 0; /* unknown */ samples++; if (avctx->channels == 2) { c->status[1].prev_sample = (signed short)samples[1]; /* c->status[1].step_index = 0; */ - *dst++ = (c->status[1].prev_sample) & 0xFF; - *dst++ = (c->status[1].prev_sample >> 8) & 0xFF; + bytestream_put_le16(&dst, c->status[1].prev_sample); *dst++ = (unsigned char)c->status[1].step_index; *dst++ = 0; samples++; @@ -553,20 +551,17 @@ static int adpcm_encode_frame(AVCodecContext *avctx, if (c->status[i].idelta < 16) c->status[i].idelta = 16; - *dst++ = c->status[i].idelta & 0xFF; - *dst++ = c->status[i].idelta >> 8; + bytestream_put_le16(&dst, c->status[i].idelta); } for(i=0; i<avctx->channels; i++){ c->status[i].sample1= *samples++; - *dst++ = c->status[i].sample1 & 0xFF; - *dst++ = c->status[i].sample1 >> 8; + bytestream_put_le16(&dst, c->status[i].sample1); } for(i=0; i<avctx->channels; i++){ c->status[i].sample2= *samples++; - *dst++ = c->status[i].sample2 & 0xFF; - *dst++ = c->status[i].sample2 >> 8; + bytestream_put_le16(&dst, c->status[i].sample2); } if(avctx->trellis > 0) { |