aboutsummaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 57edc724a..1104c20bb 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2500,9 +2500,10 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
int gf_rf_idx = ref_frame_to_gf_rf_idx(ref);
BLOCK_SIZE square_bsize = get_square_block_size(bsize);
int_mv nb_full_mvs[NB_MVS_NUM];
+ MotionField *motion_field = vp9_motion_field_info_get_motion_field(
+ &cpi->motion_field_info, gf_group_idx, gf_rf_idx, square_bsize);
const int nb_full_mv_num =
- vp9_prepare_nb_full_mvs(&cpi->tpl_stats[gf_group_idx], mi_row, mi_col,
- gf_rf_idx, square_bsize, nb_full_mvs);
+ vp9_prepare_nb_full_mvs(motion_field, mi_row, mi_col, nb_full_mvs);
const int lambda = (pw * ph) / 4;
assert(pw * ph == lambda << 2);
#else // CONFIG_NON_GREEDY_MV
@@ -2673,8 +2674,7 @@ static INLINE void restore_dst_buf(MACROBLOCKD *xd,
// However, once established that vector may be usable through the nearest and
// near mv modes to reduce distortion in subsequent blocks and also improve
// visual quality.
-static int discount_newmv_test(const VP9_COMP *cpi, int this_mode,
- int_mv this_mv,
+static int discount_newmv_test(VP9_COMP *cpi, int this_mode, int_mv this_mv,
int_mv (*mode_mv)[MAX_REF_FRAMES], int ref_frame,
int mi_row, int mi_col, BLOCK_SIZE bsize) {
#if CONFIG_NON_GREEDY_MV
@@ -2684,6 +2684,8 @@ static int discount_newmv_test(const VP9_COMP *cpi, int this_mode,
const int gf_group_idx = cpi->twopass.gf_group.index;
const int gf_rf_idx = ref_frame_to_gf_rf_idx(ref_frame);
const TplDepFrame tpl_frame = cpi->tpl_stats[gf_group_idx];
+ const MotionField *motion_field = vp9_motion_field_info_get_motion_field(
+ &cpi->motion_field_info, gf_group_idx, gf_rf_idx, cpi->tpl_bsize);
const int tpl_block_mi_h = num_8x8_blocks_high_lookup[cpi->tpl_bsize];
const int tpl_block_mi_w = num_8x8_blocks_wide_lookup[cpi->tpl_bsize];
const int tpl_mi_row = mi_row - (mi_row % tpl_block_mi_h);
@@ -2692,8 +2694,8 @@ static int discount_newmv_test(const VP9_COMP *cpi, int this_mode,
tpl_frame
.mv_mode_arr[gf_rf_idx][tpl_mi_row * tpl_frame.stride + tpl_mi_col];
if (mv_mode == NEW_MV_MODE) {
- int_mv tpl_new_mv = *get_pyramid_mv(&tpl_frame, gf_rf_idx, cpi->tpl_bsize,
- tpl_mi_row, tpl_mi_col);
+ int_mv tpl_new_mv =
+ vp9_motion_field_mi_get_mv(motion_field, tpl_mi_row, tpl_mi_col);
int row_diff = abs(tpl_new_mv.as_mv.row - this_mv.as_mv.row);
int col_diff = abs(tpl_new_mv.as_mv.col - this_mv.as_mv.col);
if (VPXMAX(row_diff, col_diff) <= 8) {