aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-01-30 13:34:43 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-01-30 19:12:55 -0500
commita3a0691bdecf0b2ead2d06ea06c0c278733eef91 (patch)
treefbc7323f01bb6c4accb978db48d056d796fe4767 /libavcodec/adpcmenc.c
parent149f2058a4119d3130243b4e85b02c3a15bb9694 (diff)
downloadffmpeg-a3a0691bdecf0b2ead2d06ea06c0c278733eef91.tar.gz
adpcmenc: remove some unneeded casts
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index cc72da5566..a24238ccb8 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -230,12 +230,12 @@ static inline uint8_t adpcm_ms_compress_sample(ADPCMChannelStatus *c,
nibble = (nibble + bias) / c->idelta;
nibble = av_clip(nibble, -8, 7) & 0x0F;
- predictor += (signed)((nibble & 0x08) ? (nibble - 0x10) : nibble) * c->idelta;
+ predictor += ((nibble & 0x08) ? (nibble - 0x10) : nibble) * c->idelta;
c->sample2 = c->sample1;
c->sample1 = av_clip_int16(predictor);
- c->idelta = (ff_adpcm_AdaptationTable[(int)nibble] * c->idelta) >> 8;
+ c->idelta = (ff_adpcm_AdaptationTable[nibble] * c->idelta) >> 8;
if (c->idelta < 16)
c->idelta = 16;
@@ -491,14 +491,14 @@ static int adpcm_encode_frame(AVCodecContext *avctx, uint8_t *frame,
/* c->status[0].step_index = 0;
XXX: not sure how to init the state machine */
bytestream_put_le16(&dst, c->status[0].prev_sample);
- *dst++ = (uint8_t)c->status[0].step_index;
+ *dst++ = c->status[0].step_index;
*dst++ = 0; /* unknown */
samples++;
if (avctx->channels == 2) {
c->status[1].prev_sample = samples[0];
/* c->status[1].step_index = 0; */
bytestream_put_le16(&dst, c->status[1].prev_sample);
- *dst++ = (uint8_t)c->status[1].step_index;
+ *dst++ = c->status[1].step_index;
*dst++ = 0;
samples++;
}