]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opus_celt.c
Merge commit 'aef0be08756e00f363c524453c948a6e2a348614'
[ffmpeg] / libavcodec / opus_celt.c
index e5d615efbd1d9dd8ec61dc095e9ec0e13f4481b6..42623d9163994636c30b58c2cb578169efa39698 100644 (file)
@@ -1454,7 +1454,7 @@ static unsigned int celt_decode_band(CeltContext *s, OpusRangeCoder *rc,
         if (itheta == 0) {
             imid = 32767;
             iside = 0;
-            fill &= (1 << blocks) - 1;
+            fill = av_mod_uintp2(fill, blocks);
             delta = -16384;
         } else if (itheta == 16384) {
             imid = 0;
@@ -1666,7 +1666,7 @@ static unsigned int celt_decode_band(CeltContext *s, OpusRangeCoder *rc,
             for (j = 0; j < N0; j++)
                 lowband_out[j] = n * X[j];
         }
-        cm &= (1 << blocks) - 1;
+        cm = av_mod_uintp2(cm, blocks);
     }
     return cm;
 }