Refactor motion estimation in MOTION_VAR experiment
To get ready for pulling AV1 to nextgenv2. Refactoring is done to
make the code structures similar, especially for the motion search
part.
Change-Id: I5d7636394408d97de55394d668540f5627827983
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 1dc6b99..bd90739 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -3031,11 +3031,13 @@
}
int av1_find_best_obmc_sub_pixel_tree_up(
- AV1_COMP *cpi, MACROBLOCK *x, const int32_t *wsrc, const int32_t *mask,
- int mi_row, int mi_col, MV *bestmv, const MV *ref_mv, int allow_hp,
- int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop,
- int iters_per_step, int *mvjcost, int *mvcost[2], int *distortion,
- unsigned int *sse1, int is_second, int use_upsampled_ref) {
+ AV1_COMP *cpi, MACROBLOCK *x, int mi_row, int mi_col, MV *bestmv,
+ const MV *ref_mv, int allow_hp, int error_per_bit,
+ const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step,
+ int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1,
+ int is_second, int use_upsampled_ref) {
+ const int32_t *wsrc = x->wsrc_buf;
+ const int32_t *mask = x->mask_buf;
const int *const z = wsrc;
const int *const src_address = z;
MACROBLOCKD *xd = &x->e_mbd;
@@ -3356,11 +3358,12 @@
}
int av1_obmc_full_pixel_diamond(const AV1_COMP *cpi, MACROBLOCK *x,
- const int32_t *wsrc, const int32_t *mask,
MV *mvp_full, int step_param, int sadpb,
int further_steps, int do_refine,
const aom_variance_fn_ptr_t *fn_ptr,
const MV *ref_mv, MV *dst_mv, int is_second) {
+ const int32_t *wsrc = x->wsrc_buf;
+ const int32_t *mask = x->mask_buf;
MV temp_mv;
int thissme, n, num00 = 0;
int bestsme =