[FFmpeg-cvslog] aacenc_ltp: replace av_clip() with av_clip_uintp2()

Rostislav Pehlivanov git at videolan.org
Sat Oct 17 13:32:29 CEST 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Sat Oct 17 12:24:16 2015 +0100| [b0a3c614b4e366a100a6f3982b8614da180c03c4] | committer: Rostislav Pehlivanov

aacenc_ltp: replace av_clip() with av_clip_uintp2()

Suggested by ubitux.
Convenient.

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

 libavcodec/aacenc_ltp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c
index 0bd8954..6e59a3f 100644
--- a/libavcodec/aacenc_ltp.c
+++ b/libavcodec/aacenc_ltp.c
@@ -101,7 +101,7 @@ void ff_aac_update_ltp(AACEncContext *s, SingleChannelElement *sce)
             lag = i;
         }
     }
-    lag = av_clip(lag, 0, 2047); /* 11 bits => 2^11 = 0->2047 */
+    lag = av_clip_uintp2(lag, 11); /* 11 bits => 2^11 = 0->2047 */
 
     if (!lag) {
         sce->ics.ltp.lag = lag;



More information about the ffmpeg-cvslog mailing list