aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g722dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-21 11:24:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 11:27:24 +0100
commit66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20 (patch)
treec078cd42cba697c15473aeaae0a127bd0e64a74a /libavcodec/g722dec.c
parent1253091d6f7b2910f3a53ab648fb3d0cb1a4b4ee (diff)
parent9abc80f1ed673141326341e26a05c3e1f78576d0 (diff)
downloadffmpeg-66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20.tar.gz
Merge commit '9abc80f1ed673141326341e26a05c3e1f78576d0'
* commit '9abc80f1ed673141326341e26a05c3e1f78576d0': libavcodec: Make use of av_clip functions Conflicts: libavcodec/takdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 0b207ffbca..22e90a3079 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -110,13 +110,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);