]> git.sesse.net Git - ffmpeg/commitdiff
Revert "aacenc: use av_clip() instead of av_clip() during quantization"
authorRostislav Pehlivanov <atomnuker@gmail.com>
Wed, 30 Mar 2016 01:31:22 +0000 (02:31 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Wed, 30 Mar 2016 01:31:22 +0000 (02:31 +0100)
This reverts commit c0918613a0ecaac6819409c64107583eebc0ccc2, since it
triggered a new assertion with gcc.
This bug definitely needs a true proper fix.

libavcodec/aacenc_quantization.h

index 106e632d051b865c82327fa4c012f731746702a4..425040748c393c6f8fa17a01f466417cc7c5c7a7 100644 (file)
@@ -141,7 +141,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, ROUNDING), 0, (1 << 13) - 1);
+                        int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q, ROUNDING), 13);
                         int len = av_log2(coef);
 
                         put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2);