diff options
author | James Almer <jamrial@gmail.com> | 2015-04-22 04:28:21 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2015-04-22 04:41:20 +0300 |
commit | ba625dd8a12b8f440af7f50c833e5c1005d67c85 (patch) | |
tree | 866b471ad22b28d6b5e74e94e9c8f78fb8b1d040 /libavcodec/hevc_cabac.c | |
parent | 4f287a3c5007db853e4f1098ab194f9337e2f7da (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/hevc_cabac.c')
-rw-r--r-- | libavcodec/hevc_cabac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index 3862df7bdf..cb369eb0c2 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -658,8 +658,8 @@ int ff_hevc_skip_flag_decode(HEVCContext *s, int x0, int y0, int x_cb, int y_cb) { int min_cb_width = s->sps->min_cb_width; int inc = 0; - 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); if (s->HEVClc->ctb_left_flag || x0b) inc = !!SAMPLE_CTB(s->skip_flag, x_cb - 1, y_cb); @@ -723,8 +723,8 @@ int ff_hevc_pred_mode_decode(HEVCContext *s) int ff_hevc_split_coding_unit_flag_decode(HEVCContext *s, int ct_depth, int x0, int y0) { int inc = 0, depth_left = 0, depth_top = 0; - 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); int x_cb = x0 >> s->sps->log2_min_cb_size; int y_cb = y0 >> s->sps->log2_min_cb_size; |