summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-21 15:46:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 15:50:03 +0100
commit114a2eb272077b68bc8e0f2ee8fd6fc85a8e07c2 (patch)
treed11ce3dc892c86e032185994f596cd7edbdf5f44 /libavcodec/adpcmenc.c
parentd301a13427d970671258593ef14dc87f8e24555a (diff)
avcodec: Use av_clip_uintp2() where possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index ea6cc23e97..c3546f9058 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -581,7 +581,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
// init the encoder state
for (i = 0; i < avctx->channels; i++) {
// clip step so it fits 6 bits
- c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63);
+ c->status[i].step_index = av_clip_uintp2(c->status[i].step_index, 6);
put_sbits(&pb, 16, samples[i]);
put_bits(&pb, 6, c->status[i].step_index);
c->status[i].prev_sample = samples[i];