[FFmpeg-devel] [PATCH 8/9] hevc: simplify rounding
Christophe Gisquet
christophe.gisquet at gmail.com
Thu Jul 10 08:47:55 CEST 2014
---
libavcodec/hevc_mvs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index e900bd0..b2bea4e 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -276,8 +276,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);
@@ -288,8 +288,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);
--
1.9.2.msysgit.0
More information about the ffmpeg-devel
mailing list