summaryrefslogtreecommitdiff
path: root/libavcodec/opus_celt.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-04-21 22:28:21 -0300
committerJames Almer <jamrial@gmail.com>2015-04-21 22:41:20 -0300
commitba625dd8a12b8f440af7f50c833e5c1005d67c85 (patch)
tree866b471ad22b28d6b5e74e94e9c8f78fb8b1d040 /libavcodec/opus_celt.c
parent4f287a3c5007db853e4f1098ab194f9337e2f7da (diff)
avcodec: use av_mod_uintp2() where useful
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/opus_celt.c')
-rw-r--r--libavcodec/opus_celt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/opus_celt.c b/libavcodec/opus_celt.c
index e5d615efbd..42623d9163 100644
--- a/libavcodec/opus_celt.c
+++ b/libavcodec/opus_celt.c
@@ -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;
}