aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-07-10 06:47:55 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-07-10 14:32:18 +0200
commit2e471e4703ed5aaab6d6b6bf5a3c6895b79f02b4 (patch)
tree9951c91d98e332333751a2836dde4cdba166ecc8
parent64fdcf24289e0a6e18903caf37ea382630772859 (diff)
downloadffmpeg-2e471e4703ed5aaab6d6b6bf5a3c6895b79f02b4.tar.gz
hevc: simplify rounding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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 2b017dd20f..032b8b0569 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -275,8 +275,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 &= -16;
+ y &= -16;
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);
@@ -287,8 +287,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 &= -16;
+ y &= -16;
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);