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/aaccoder.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/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 5bf6a9c155..b4d2009838 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -161,7 +161,7 @@ static av_always_inline float quantize_and_encode_band_cost_template( di = t - CLIPPED_ESCAPE; curbits += 21; } else { - int c = av_clip(quant(t, Q), 0, 8191); + int c = av_clip_uintp2(quant(t, Q), 13); di = t - c*cbrtf(c)*IQ; curbits += av_log2(c)*2 - 4 + 1; } @@ -191,7 +191,7 @@ static av_always_inline float quantize_and_encode_band_cost_template( if (BT_ESC) { for (j = 0; j < 2; j++) { if (ff_aac_codebook_vectors[cb-1][curidx*2+j] == 64.0f) { - int coef = av_clip(quant(fabsf(in[i+j]), Q), 0, 8191); + int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q), 13); int len = av_log2(coef); put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2); |