[FFmpeg-cvslog] avcodec/amrwbdec: use av_mod_uintp2

James Almer git at videolan.org
Sat Jan 30 00:00:20 CET 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Jan 18 18:36:48 2016 -0300| [8514f6dcfd29191d9ec5768eb647326a0cd4e761] | committer: James Almer

avcodec/amrwbdec: use av_mod_uintp2

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index b73b700..a99dbd1 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -358,7 +358,7 @@ static void decode_pitch_vector(AMRWBContext *ctx,
 }
 
 /** Get x bits in the index interval [lsb,lsb+len-1] inclusive */
-#define BIT_STR(x,lsb,len) (((x) >> (lsb)) & ((1 << (len)) - 1))
+#define BIT_STR(x,lsb,len) av_mod_uintp2((x) >> (lsb), (len))
 
 /** Get the bit at specified position */
 #define BIT_POS(x, p) (((x) >> (p)) & 1)



More information about the ffmpeg-cvslog mailing list