Commit a4ccfadc authored by Jingning Han's avatar Jingning Han Committed by Gerrit Code Review

Merge "Rename clamp_mv_min_max to set_mv_search_range"

parents e7910316 9d6e7ce1
...@@ -42,7 +42,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, ...@@ -42,7 +42,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
(cpi->speed < 8 ? (cpi->speed > 5 ? 1 : 0) : 2); (cpi->speed < 8 ? (cpi->speed > 5 ? 1 : 0) : 2);
step_param = MIN(step_param, (cpi->sf.max_step_search_steps - 2)); step_param = MIN(step_param, (cpi->sf.max_step_search_steps - 2));
vp9_clamp_mv_min_max(x, &ref_mv->as_mv); vp9_set_mv_search_range(x, &ref_mv->as_mv);
ref_full.as_mv.col = ref_mv->as_mv.col >> 3; ref_full.as_mv.col = ref_mv->as_mv.col >> 3;
ref_full.as_mv.row = ref_mv->as_mv.row >> 3; ref_full.as_mv.row = ref_mv->as_mv.row >> 3;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
// #define NEW_DIAMOND_SEARCH // #define NEW_DIAMOND_SEARCH
void vp9_clamp_mv_min_max(MACROBLOCK *x, MV *mv) { void vp9_set_mv_search_range(MACROBLOCK *x, MV *mv) {
const int col_min = (mv->col >> 3) - MAX_FULL_PEL_VAL + (mv->col & 7 ? 1 : 0); const int col_min = (mv->col >> 3) - MAX_FULL_PEL_VAL + (mv->col & 7 ? 1 : 0);
const int row_min = (mv->row >> 3) - MAX_FULL_PEL_VAL + (mv->row & 7 ? 1 : 0); const int row_min = (mv->row >> 3) - MAX_FULL_PEL_VAL + (mv->row & 7 ? 1 : 0);
const int col_max = (mv->col >> 3) + MAX_FULL_PEL_VAL; const int col_max = (mv->col >> 3) + MAX_FULL_PEL_VAL;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND) #define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND)
void vp9_clamp_mv_min_max(MACROBLOCK *x, MV *mv); void vp9_set_mv_search_range(MACROBLOCK *x, MV *mv);
int vp9_mv_bit_cost(const MV *mv, const MV *ref, int vp9_mv_bit_cost(const MV *mv, const MV *ref,
const int *mvjcost, int *mvcost[2], int weight); const int *mvjcost, int *mvcost[2], int weight);
void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride); void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride);
......
...@@ -1781,7 +1781,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -1781,7 +1781,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
// adjust src pointer for this block // adjust src pointer for this block
mi_buf_shift(x, i); mi_buf_shift(x, i);
vp9_clamp_mv_min_max(x, &bsi->ref_mv->as_mv); vp9_set_mv_search_range(x, &bsi->ref_mv->as_mv);
if (cpi->sf.search_method == HEX) { if (cpi->sf.search_method == HEX) {
bestsme = vp9_hex_search(x, &mvp_full.as_mv, bestsme = vp9_hex_search(x, &mvp_full.as_mv,
...@@ -2344,7 +2344,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -2344,7 +2344,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL); setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL);
} }
vp9_clamp_mv_min_max(x, &ref_mv.as_mv); vp9_set_mv_search_range(x, &ref_mv.as_mv);
// Adjust search parameters based on small partitions' result. // Adjust search parameters based on small partitions' result.
if (x->fast_ms) { if (x->fast_ms) {
...@@ -2523,7 +2523,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -2523,7 +2523,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
// Compound motion search on first ref frame. // Compound motion search on first ref frame.
if (id) if (id)
xd->plane[0].pre[0] = ref_yv12[id]; xd->plane[0].pre[0] = ref_yv12[id];
vp9_clamp_mv_min_max(x, &ref_mv[id].as_mv); vp9_set_mv_search_range(x, &ref_mv[id].as_mv);
// Use mv result from single mode as mvp. // Use mv result from single mode as mvp.
tmp_mv.as_int = frame_mv[refs[id]].as_int; tmp_mv.as_int = frame_mv[refs[id]].as_int;
......
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