aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_mvs.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/hevc_mvs.c
parent4f287a3c5007db853e4f1098ab194f9337e2f7da (diff)
downloadffmpeg-ba625dd8a12b8f440af7f50c833e5c1005d67c85.tar.gz
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/hevc_mvs.c')
-rw-r--r--libavcodec/hevc_mvs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index 7e3466981a..e504257c47 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -42,8 +42,8 @@ void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0,
int nPbW, int nPbH)
{
HEVCLocalContext *lc = s->HEVClc;
- int x0b = x0 & ((1 << s->sps->log2_ctb_size) - 1);
- int y0b = y0 & ((1 << s->sps->log2_ctb_size) - 1);
+ int x0b = av_mod_uintp2(x0, s->sps->log2_ctb_size);
+ int y0b = av_mod_uintp2(y0, s->sps->log2_ctb_size);
lc->na.cand_up = (lc->ctb_up_flag || y0b);
lc->na.cand_left = (lc->ctb_left_flag || x0b);