summaryrefslogtreecommitdiff
path: root/libavcodec/opus_celt.c
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2015-02-20 01:35:35 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-02-21 00:54:40 +0100
commit9abc80f1ed673141326341e26a05c3e1f78576d0 (patch)
treeca91fca7b76eec0d98a2b420f0220ec0df13a239 /libavcodec/opus_celt.c
parent76ce9bd8e26dcb3652240a1072840ff4011d7cdc (diff)
libavcodec: Make use of av_clip functions
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/opus_celt.c')
-rw-r--r--libavcodec/opus_celt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/opus_celt.c b/libavcodec/opus_celt.c
index a6220e556c..d453e2d2e9 100644
--- a/libavcodec/opus_celt.c
+++ b/libavcodec/opus_celt.c
@@ -1909,7 +1909,7 @@ static void celt_decode_bands(CeltContext *s, OpusRangeCoder *rc)
s->remaining2 = totalbits - consumed - 1;
if (i <= s->codedbands - 1) {
int curr_balance = s->remaining / FFMIN(3, s->codedbands-i);
- b = av_clip(FFMIN(s->remaining2 + 1, s->pulses[i] + curr_balance), 0, 16383);
+ b = av_clip_uintp2(FFMIN(s->remaining2 + 1, s->pulses[i] + curr_balance), 14);
} else
b = 0;