Commit c99a564a authored by Yunqing Wang's avatar Yunqing Wang

Refactor temporal MV code

Removed rounding of blk_row/blk_col, which is more clear and doesn't
change the result since the step size(mi_step) are even number.

Change-Id: I3b0de69316e10c4834eb2d0d7e160a0ec9fbf130
parent 93e9d130
......@@ -585,8 +585,8 @@ static int add_col_ref_mv(const AV1_COMMON *cm,
CANDIDATE_MV *ref_mv_stack, int16_t *mode_context) {
#if CONFIG_TMV
const MV_REF *prev_frame_mvs = prev_frame_mvs_base +
((blk_row + 1) >> 1) * prev_frame_mvs_stride +
((blk_col + 1) >> 1);
(blk_row >> 1) * prev_frame_mvs_stride +
(blk_col >> 1);
#else
const MV_REF *prev_frame_mvs =
prev_frame_mvs_base + blk_row * prev_frame_mvs_stride + blk_col;
......
......@@ -3063,9 +3063,8 @@ static void av1_intra_copy_frame_mvs(AV1_COMMON *const cm, int mi_row,
int mi_col, int x_mis, int y_mis) {
#if CONFIG_TMV
const int frame_mvs_stride = ROUND_POWER_OF_TWO(cm->mi_cols, 1);
MV_REF *frame_mvs = cm->cur_frame->mvs +
((mi_row & 0xfffe) >> 1) * frame_mvs_stride +
((mi_col & 0xfffe) >> 1);
MV_REF *frame_mvs =
cm->cur_frame->mvs + (mi_row >> 1) * frame_mvs_stride + (mi_col >> 1);
x_mis = ROUND_POWER_OF_TWO(x_mis, 1);
y_mis = ROUND_POWER_OF_TWO(y_mis, 1);
#else
......
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