Remove unused parameters from av1_*_full_pixel_search
BUG=aomedia:2594
Change-Id: I416b7dc7dfab0e3b7443b78ccb4eda648c632b0f
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 3fefe2e..e2696a7 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -234,9 +234,8 @@
tmp_err = av1_full_pixel_search(
cpi, x, bsize, start_mv, step_param, NSTEP, 0, x->sadperbit16,
- cond_cost_list(cpi, cost_list), ref_mv, INT_MAX, 0,
- (MI_SIZE * xd->mi_col), (MI_SIZE * xd->mi_row), 0,
- &cpi->ss_cfg[SS_CFG_FPF], 0);
+ cond_cost_list(cpi, cost_list), ref_mv, (MI_SIZE * xd->mi_col),
+ (MI_SIZE * xd->mi_row), 0, &cpi->ss_cfg[SS_CFG_FPF], 0);
if (tmp_err < INT_MAX) {
tmp_err = av1_get_mvpred_sse(x, &x->best_mv.as_fullmv, ref_mv, &v_fn_ptr) +
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 48b399f..521d8b7 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -1346,9 +1346,8 @@
int av1_full_pixel_search(const AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
const FULLPEL_MV start_mv, int step_param, int method,
int run_mesh_search, int error_per_bit,
- int *cost_list, const MV *ref_mv, int var_max, int rd,
- int x_pos, int y_pos, int intra,
- const search_site_config *cfg,
+ int *cost_list, const MV *ref_mv, int x_pos,
+ int y_pos, int intra, const search_site_config *cfg,
int use_intrabc_mesh_pattern) {
const SPEED_FEATURES *const sf = &cpi->sf;
const aom_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize];
@@ -1429,9 +1428,6 @@
}
}
- if (method != NSTEP && rd && var < var_max)
- var = av1_get_mvpred_var(x, &x->best_mv.as_fullmv, ref_mv, fn_ptr);
-
// Use hash-me for intrablock copy
do {
if (!intra || !av1_use_hash_me(cpi)) break;
@@ -1625,7 +1621,7 @@
static int obmc_full_pixel_diamond(const AV1_COMP *cpi, MACROBLOCK *x,
const FULLPEL_MV start_mv, int step_param,
- int sadpb, int further_steps, int do_refine,
+ int sadpb, int do_refine,
const aom_variance_fn_ptr_t *fn_ptr,
const MV *ref_mv, FULLPEL_MV *best_mv,
const search_site_config *cfg) {
@@ -1642,6 +1638,7 @@
// If there won't be more n-step search, check to see if refining search is
// needed.
+ const int further_steps = cfg->ss_count - 1 - step_param;
if (n > further_steps) do_refine = 0;
while (n < further_steps) {
@@ -1684,14 +1681,14 @@
int av1_obmc_full_pixel_search(const AV1_COMP *cpi, MACROBLOCK *x,
const FULLPEL_MV start_mv, int step_param,
- int sadpb, int further_steps, int do_refine,
- const aom_variance_fn_ptr_t *fn_ptr,
+ int sadpb, const aom_variance_fn_ptr_t *fn_ptr,
const MV *ref_mv, FULLPEL_MV *best_mv,
const search_site_config *cfg) {
if (cpi->sf.inter_sf.obmc_full_pixel_search_level == 0) {
- const int bestsme = obmc_full_pixel_diamond(cpi, x, start_mv, step_param,
- sadpb, further_steps, do_refine,
- fn_ptr, ref_mv, best_mv, cfg);
+ const int do_refine = 1;
+ const int bestsme =
+ obmc_full_pixel_diamond(cpi, x, start_mv, step_param, sadpb, do_refine,
+ fn_ptr, ref_mv, best_mv, cfg);
return bestsme;
} else {
const int32_t *wsrc = x->wsrc_buf;
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index acf984f..4a38a36 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -137,14 +137,13 @@
BLOCK_SIZE bsize, const FULLPEL_MV start_mv,
int step_param, int method, int run_mesh_search,
int error_per_bit, int *cost_list, const MV *ref_mv,
- int var_max, int rd, int x_pos, int y_pos, int intra,
+ int x_pos, int y_pos, int intra,
const search_site_config *cfg,
int use_intrabc_mesh_pattern);
int av1_obmc_full_pixel_search(const struct AV1_COMP *cpi, MACROBLOCK *x,
const FULLPEL_MV start_mv, int step_param,
- int sadpb, int further_steps, int do_refine,
- const aom_variance_fn_ptr_t *fn_ptr,
+ int sadpb, const aom_variance_fn_ptr_t *fn_ptr,
const MV *ref_mv, FULLPEL_MV *dst_mv,
const search_site_config *cfg);
diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index 9fd1c60..3a0fd2e 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -130,14 +130,12 @@
case SIMPLE_TRANSLATION:
bestsme = av1_full_pixel_search(
cpi, x, bsize, start_mv, step_param, cpi->sf.mv_sf.search_method, 0,
- sadpb, cond_cost_list(cpi, cost_list), &ref_mv, INT_MAX, 1,
- (MI_SIZE * mi_col), (MI_SIZE * mi_row), 0, &cpi->ss_cfg[SS_CFG_SRC],
- 0);
+ sadpb, cond_cost_list(cpi, cost_list), &ref_mv, (MI_SIZE * mi_col),
+ (MI_SIZE * mi_row), 0, &cpi->ss_cfg[SS_CFG_SRC], 0);
break;
case OBMC_CAUSAL:
bestsme = av1_obmc_full_pixel_search(
- cpi, x, start_mv, step_param, sadpb,
- MAX_MVSEARCH_STEPS - 1 - step_param, 1, &cpi->fn_ptr[bsize], &ref_mv,
+ cpi, x, start_mv, step_param, sadpb, &cpi->fn_ptr[bsize], &ref_mv,
&(x->best_mv.as_fullmv), &cpi->ss_cfg[SS_CFG_SRC]);
break;
default: assert(0 && "Invalid motion mode!\n");
@@ -668,8 +666,8 @@
av1_set_mv_search_range(&x->mv_limits, &ref_mv);
var = av1_full_pixel_search(
cpi, x, bsize, start_mv, step_param, search_methods, do_mesh_search,
- sadpb, cond_cost_list(cpi, cost_list), &ref_mv, INT_MAX, 1,
- mi_col * MI_SIZE, mi_row * MI_SIZE, 0, &cpi->ss_cfg[SS_CFG_SRC], 0);
+ sadpb, cond_cost_list(cpi, cost_list), &ref_mv, mi_col * MI_SIZE,
+ mi_row * MI_SIZE, 0, &cpi->ss_cfg[SS_CFG_SRC], 0);
// Restore
x->mv_limits = tmp_mv_limits;
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index aa43320..19426a6 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -154,8 +154,8 @@
av1_full_pixel_search(
cpi, x, bsize, start_mv, step_param, cpi->sf.mv_sf.search_method, 0,
- sadpb, cond_cost_list(cpi, cost_list), ¢er_mv, INT_MAX, 0,
- (MI_SIZE * mi_col), (MI_SIZE * mi_row), 0, &cpi->ss_cfg[SS_CFG_SRC], 0);
+ sadpb, cond_cost_list(cpi, cost_list), ¢er_mv, (MI_SIZE * mi_col),
+ (MI_SIZE * mi_row), 0, &cpi->ss_cfg[SS_CFG_SRC], 0);
x->mv_limits = tmp_mv_limits;
*tmp_mv = x->best_mv;
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 9967ba6..617dbac 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2557,7 +2557,7 @@
int cost_list[5];
const int bestsme = av1_full_pixel_search(
cpi, x, bsize, start_mv, step_param, cpi->sf.mv_sf.search_method, 0,
- sadpb, cond_cost_list(cpi, cost_list), &dv_ref.as_mv, INT_MAX, 1,
+ sadpb, cond_cost_list(cpi, cost_list), &dv_ref.as_mv,
(MI_SIZE * mi_col), (MI_SIZE * mi_row), 1,
&cpi->ss_cfg[SS_CFG_LOOKAHEAD], 1);
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 4995cb8..3b9648e 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -126,8 +126,8 @@
mb->mv_cost_type = mv_cost_type;
av1_full_pixel_search(cpi, mb, block_size, start_mv, step_param,
full_search_method, 1, sadperbit16,
- cond_cost_list(cpi, cost_list), &baseline_mv, 0, 0,
- mb_x, mb_y, 0, &ss_cfg, 0);
+ cond_cost_list(cpi, cost_list), &baseline_mv, mb_x,
+ mb_y, 0, &ss_cfg, 0);
// Since we are merely refining the result from full pixel search, we don't
// need regularization for subpel search
mb->mv_cost_type = MV_COST_NONE;
@@ -168,8 +168,8 @@
mb->mv_cost_type = mv_cost_type;
av1_full_pixel_search(cpi, mb, subblock_size, start_mv, step_param,
full_search_method, 1, sadperbit16,
- cond_cost_list(cpi, cost_list), &baseline_mv, 0,
- 0, mb_x, mb_y, 0, &ss_cfg, 0);
+ cond_cost_list(cpi, cost_list), &baseline_mv,
+ mb_x, mb_y, 0, &ss_cfg, 0);
// Since we are merely refining the result from full pixel search, we
// don't need regularization for subpel search
mb->mv_cost_type = MV_COST_NONE;
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 352d380..f306c9f 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -155,8 +155,7 @@
av1_full_pixel_search(cpi, x, bsize, start_mv, step_param, search_method, 0,
sadpb, cond_cost_list(cpi, cost_list), ¢er_mv,
- INT_MAX, 0, (MI_SIZE * mi_col), (MI_SIZE * mi_row), 0,
- ss_cfg, 0);
+ (MI_SIZE * mi_col), (MI_SIZE * mi_row), 0, ss_cfg, 0);
/* restore UMV window */
x->mv_limits = tmp_mv_limits;