]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/amrwbdec.c
avcodec/h264_slice: Fix dequant table init with field pictures
[ffmpeg] / libavcodec / amrwbdec.c
index b73b700a7183d23e07b4b9b88c14925013e61695..a99dbd110e06994ff4373c5755e8be463bb71b3a 100644 (file)
@@ -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)