]> git.sesse.net Git - ffmpeg/commitdiff
aacenc_ltp: replace av_clip() with av_clip_uintp2()
authorRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 17 Oct 2015 11:24:16 +0000 (12:24 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 17 Oct 2015 11:24:16 +0000 (12:24 +0100)
Suggested by ubitux.
Convenient.

libavcodec/aacenc_ltp.c

index 0bd895472a05d86b6fba6fb5cf319ab87bb567f6..6e59a3ffeff12765f21ec91c87c85a81956ef6a6 100644 (file)
@@ -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;