[FFmpeg-cvslog] Revert "aacenc: use av_clip() instead of av_clip() during quantization"

Rostislav Pehlivanov git at videolan.org
Wed Mar 30 03:33:03 CEST 2016


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Wed Mar 30 02:31:22 2016 +0100| [02172d93f6b25b61228d1d8a6204ccb3e80cfcd3] | committer: Rostislav Pehlivanov

Revert "aacenc: use av_clip() instead of av_clip() during quantization"

This reverts commit c0918613a0ecaac6819409c64107583eebc0ccc2, since it
triggered a new assertion with gcc.
This bug definitely needs a true proper fix.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02172d93f6b25b61228d1d8a6204ccb3e80cfcd3
---

 libavcodec/aacenc_quantization.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aacenc_quantization.h
index 106e632..4250407 100644
--- a/libavcodec/aacenc_quantization.h
+++ b/libavcodec/aacenc_quantization.h
@@ -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);



More information about the ffmpeg-cvslog mailing list