From 9abc80f1ed673141326341e26a05c3e1f78576d0 Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Fri, 20 Feb 2015 01:35:35 +0100 Subject: libavcodec: Make use of av_clip functions Signed-off-by: Peter Meerwald Signed-off-by: Luca Barbato --- libavcodec/opus_celt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/opus_celt.c') 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; -- cgit v1.2.3