From 686b480ad129d25665bdfacc85ee67670b2d0045 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Mon, 3 Mar 2014 14:43:06 -0800 Subject: [PATCH] Replacing int_mv with MV in full_pixel_motion_search(). Change-Id: I16dd4d4aaae8ce6a482da3c9d142f41fe9155e82 --- vp9/encoder/vp9_pickmode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 9ba48a1b5..dda75b80b 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -38,7 +38,7 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x, int sadpb = x->sadperbit16; MV mvp_full; int ref = mbmi->ref_frame[0]; - int_mv ref_mv = mbmi->ref_mvs[ref][0]; + const MV ref_mv = mbmi->ref_mvs[ref][0].as_mv; int i; int tmp_col_min = x->mv_col_min; @@ -62,7 +62,7 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x, setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL); } - vp9_set_mv_search_range(x, &ref_mv.as_mv); + vp9_set_mv_search_range(x, &ref_mv); // TODO(jingning) exploiting adaptive motion search control in non-RD // mode decision too. @@ -90,24 +90,24 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x, if (cpi->sf.search_method == FAST_HEX) { bestsme = vp9_fast_hex_search(x, &mvp_full, step_param, sadpb, &cpi->fn_ptr[bsize], 1, - &ref_mv.as_mv, &tmp_mv->as_mv); + &ref_mv, &tmp_mv->as_mv); } else if (cpi->sf.search_method == HEX) { bestsme = vp9_hex_search(x, &mvp_full, step_param, sadpb, 1, &cpi->fn_ptr[bsize], 1, - &ref_mv.as_mv, &tmp_mv->as_mv); + &ref_mv, &tmp_mv->as_mv); } else if (cpi->sf.search_method == SQUARE) { bestsme = vp9_square_search(x, &mvp_full, step_param, sadpb, 1, &cpi->fn_ptr[bsize], 1, - &ref_mv.as_mv, &tmp_mv->as_mv); + &ref_mv, &tmp_mv->as_mv); } else if (cpi->sf.search_method == BIGDIA) { bestsme = vp9_bigdia_search(x, &mvp_full, step_param, sadpb, 1, &cpi->fn_ptr[bsize], 1, - &ref_mv.as_mv, &tmp_mv->as_mv); + &ref_mv, &tmp_mv->as_mv); } else { bestsme = vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param, sadpb, further_steps, 1, &cpi->fn_ptr[bsize], - &ref_mv.as_mv, &tmp_mv->as_mv); + &ref_mv, &tmp_mv->as_mv); } x->mv_col_min = tmp_col_min; x->mv_col_max = tmp_col_max; @@ -134,7 +134,7 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x, tmp_mv->as_mv.col = tmp_mv->as_mv.col * 8; // calculate the bit cost on motion vector - *rate_mv = vp9_mv_bit_cost(&tmp_mv->as_mv, &ref_mv.as_mv, + *rate_mv = vp9_mv_bit_cost(&tmp_mv->as_mv, &ref_mv, x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); return bestsme; }