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/opus_silk.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/opus_silk.c')
-rw-r--r-- | libavcodec/opus_silk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/opus_silk.c b/libavcodec/opus_silk.c index 7a89479fb9..841d1ed25c 100644 --- a/libavcodec/opus_silk.c +++ b/libavcodec/opus_silk.c @@ -1077,7 +1077,7 @@ static inline void silk_decode_lpc(SilkContext *s, SilkFrame *frame, weight = y + ((213 * fpart * y) >> 16); value = cur * 128 + (lsf_res[i] * 16384) / weight; - nlsf[i] = av_clip(value, 0, 32767); + nlsf[i] = av_clip_uintp2(value, 15); } /* stabilize the NLSF coefficients */ @@ -1288,8 +1288,8 @@ static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc, } else { /* gain is coded relative */ int delta_gain = opus_rc_getsymbol(rc, silk_model_gain_delta); - log_gain = av_clip(FFMAX((delta_gain<<1) - 16, - frame->log_gain + delta_gain - 4), 0, 63); + log_gain = av_clip_uintp2(FFMAX((delta_gain<<1) - 16, + frame->log_gain + delta_gain - 4), 6); } frame->log_gain = log_gain; |