Commit 09182b32 authored by Christophe Gisquet's avatar Christophe Gisquet Committed by Anton Khirnov

hevc: simplify rounding

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent d1b1c3bb
...@@ -271,8 +271,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0, ...@@ -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) && (y0 >> s->sps->log2_ctb_size) == (y >> s->sps->log2_ctb_size) &&
y < s->sps->height && y < s->sps->height &&
x < s->sps->width) { x < s->sps->width) {
x = ((x >> 4) << 4); x &= ~15;
y = ((y >> 4) << 4); y &= ~15;
x_pu = x >> s->sps->log2_min_pu_size; x_pu = x >> s->sps->log2_min_pu_size;
y_pu = y >> s->sps->log2_min_pu_size; y_pu = y >> s->sps->log2_min_pu_size;
temp_col = TAB_MVF(x_pu, y_pu); temp_col = TAB_MVF(x_pu, y_pu);
...@@ -283,8 +283,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0, ...@@ -283,8 +283,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0,
if (tab_mvf && !availableFlagLXCol) { if (tab_mvf && !availableFlagLXCol) {
x = x0 + (nPbW >> 1); x = x0 + (nPbW >> 1);
y = y0 + (nPbH >> 1); y = y0 + (nPbH >> 1);
x = ((x >> 4) << 4); x &= ~15;
y = ((y >> 4) << 4); y &= ~15;
x_pu = x >> s->sps->log2_min_pu_size; x_pu = x >> s->sps->log2_min_pu_size;
y_pu = y >> s->sps->log2_min_pu_size; y_pu = y >> s->sps->log2_min_pu_size;
temp_col = TAB_MVF(x_pu, y_pu); temp_col = TAB_MVF(x_pu, y_pu);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment