summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_mvs.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-07-10 06:47:55 +0000
committerAnton Khirnov <anton@khirnov.net>2014-08-12 09:57:25 +0000
commit09182b3224370e1d636631e77f201a8388766bd6 (patch)
treec50b834adaa97399a486617fad0923470fe45eb7 /libavcodec/hevc_mvs.c
parentd1b1c3bb5ef1bee409c06c3bcacfb8674e1cb574 (diff)
hevc: simplify rounding
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/hevc_mvs.c')
-rw-r--r--libavcodec/hevc_mvs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index 2fe4dbbed6..7fa418b15b 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -271,8 +271,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0,
(y0 >> s->sps->log2_ctb_size) == (y >> s->sps->log2_ctb_size) &&
y < s->sps->height &&
x < s->sps->width) {
- x = ((x >> 4) << 4);
- y = ((y >> 4) << 4);
+ x &= ~15;
+ y &= ~15;
x_pu = x >> s->sps->log2_min_pu_size;
y_pu = y >> s->sps->log2_min_pu_size;
temp_col = TAB_MVF(x_pu, y_pu);
@@ -283,8 +283,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0,
if (tab_mvf && !availableFlagLXCol) {
x = x0 + (nPbW >> 1);
y = y0 + (nPbH >> 1);
- x = ((x >> 4) << 4);
- y = ((y >> 4) << 4);
+ x &= ~15;
+ y &= ~15;
x_pu = x >> s->sps->log2_min_pu_size;
y_pu = y >> s->sps->log2_min_pu_size;
temp_col = TAB_MVF(x_pu, y_pu);