summaryrefslogtreecommitdiff
path: root/libavcodec/g722dec.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/g722dec.c
parent76ce9bd8e26dcb3652240a1072840ff4011d7cdc (diff)
downloadffmpeg-9abc80f1ed673141326341e26a05c3e1f78576d0.tar.gz
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/g722dec.c')
-rw-r--r--libavcodec/g722dec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index e7058b7ee1..a1b3aa78c9 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -112,13 +112,13 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data,
ilow = get_bits(&gb, 6 - skip);
skip_bits(&gb, skip);
- rlow = av_clip((c->band[0].scale_factor * quantizer_table[ilow] >> 10)
- + c->band[0].s_predictor, -16384, 16383);
+ rlow = av_clip_intp2((c->band[0].scale_factor * quantizer_table[ilow] >> 10)
+ + c->band[0].s_predictor, 14);
ff_g722_update_low_predictor(&c->band[0], ilow >> (2 - skip));
dhigh = c->band[1].scale_factor * ff_g722_high_inv_quant[ihigh] >> 10;
- rhigh = av_clip(dhigh + c->band[1].s_predictor, -16384, 16383);
+ rhigh = av_clip_intp2(dhigh + c->band[1].s_predictor, 14);
ff_g722_update_high_predictor(&c->band[1], dhigh, ihigh);