diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 11:24:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 11:27:24 +0100 |
commit | 66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20 (patch) | |
tree | c078cd42cba697c15473aeaae0a127bd0e64a74a /libavcodec/g722enc.c | |
parent | 1253091d6f7b2910f3a53ab648fb3d0cb1a4b4ee (diff) | |
parent | 9abc80f1ed673141326341e26a05c3e1f78576d0 (diff) | |
download | ffmpeg-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/g722enc.c')
-rw-r--r-- | libavcodec/g722enc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index 5a7bfb25fe..38432f5006 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -226,9 +226,9 @@ static void g722_encode_trellis(G722Context *c, int trellis, if (k < 0) continue; - decoded = av_clip((cur_node->state.scale_factor * + decoded = av_clip_intp2((cur_node->state.scale_factor * ff_g722_low_inv_quant6[k] >> 10) - + cur_node->state.s_predictor, -16384, 16383); + + cur_node->state.s_predictor, 14); dec_diff = xlow - decoded; #define STORE_NODE(index, UPDATE, VALUE)\ @@ -285,8 +285,7 @@ static void g722_encode_trellis(G722Context *c, int trellis, dhigh = cur_node->state.scale_factor * ff_g722_high_inv_quant[ihigh] >> 10; - decoded = av_clip(dhigh + cur_node->state.s_predictor, - -16384, 16383); + decoded = av_clip_intp2(dhigh + cur_node->state.s_predictor, 14); dec_diff = xhigh - decoded; STORE_NODE(1, ff_g722_update_high_predictor(&node->state, dhigh, ihigh), ihigh); |