Simplify compound arguments for mcomp structs

BUG=aomedia:2594

Change-Id: I32ed34462a4cfb58e7779205d59e1f3ca55269b8
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index ea28956..b0e6339 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -48,7 +48,7 @@
   ms_buffers->ref = &x->e_mbd.plane[0].pre[0];
   ms_buffers->src = &x->plane[0].src;
 
-  set_ms_compound_refs(ms_buffers, NULL, NULL, 0, 0);
+  av1_set_ms_compound_refs(ms_buffers, NULL, NULL, 0, 0);
 
   ms_buffers->wsrc = x->wsrc_buf;
   ms_buffers->obmc_mask = x->mask_buf;
@@ -87,10 +87,7 @@
 void av1_make_default_subpel_ms_params(SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
                                        const struct AV1_COMP *cpi,
                                        const MACROBLOCK *x, BLOCK_SIZE bsize,
-                                       const MV *ref_mv, const int *cost_list,
-                                       const uint8_t *second_pred,
-                                       const uint8_t *mask, int mask_stride,
-                                       int invert_mask) {
+                                       const MV *ref_mv, const int *cost_list) {
   const AV1_COMMON *cm = &cpi->common;
   // High level params
   ms_params->allow_hp = cm->features.allow_high_precision_mv;
@@ -113,7 +110,6 @@
   // Ref and src buffers
   MSBuffers *ms_buffers = &ms_params->var_params.ms_buffers;
   init_ms_buffers(ms_buffers, x);
-  set_ms_compound_refs(ms_buffers, second_pred, mask, mask_stride, invert_mask);
 }
 
 static INLINE int get_offset_from_fullmv(const FULLPEL_MV *mv, int stride) {
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index f34200d..eb2024c 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -104,10 +104,10 @@
   const int32_t *obmc_mask;
 } MSBuffers;
 
-static INLINE void set_ms_compound_refs(MSBuffers *ms_buffers,
-                                        const uint8_t *second_pred,
-                                        const uint8_t *mask, int mask_stride,
-                                        int invert_mask) {
+static INLINE void av1_set_ms_compound_refs(MSBuffers *ms_buffers,
+                                            const uint8_t *second_pred,
+                                            const uint8_t *mask,
+                                            int mask_stride, int invert_mask) {
   ms_buffers->second_pred = second_pred;
   ms_buffers->mask = mask;
   ms_buffers->mask_stride = mask_stride;
@@ -271,10 +271,7 @@
 void av1_make_default_subpel_ms_params(SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
                                        const struct AV1_COMP *cpi,
                                        const MACROBLOCK *x, BLOCK_SIZE bsize,
-                                       const MV *ref_mv, const int *cost_list,
-                                       const uint8_t *second_pred,
-                                       const uint8_t *mask, int mask_stride,
-                                       int invert_mask);
+                                       const MV *ref_mv, const int *cost_list);
 
 typedef int(fractional_mv_step_fp)(MACROBLOCKD *xd, const AV1_COMMON *const cm,
                                    const SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index f131ece..abfbad7 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -299,18 +299,13 @@
   const int use_fractional_mv =
       bestsme < INT_MAX && cpi->common.features.cur_frame_force_integer_mv == 0;
   if (use_fractional_mv) {
-    const uint8_t *second_pred = NULL;
-    const uint8_t *mask = NULL;
-    const int mask_stride = 0;
-    const int invert_mask = 1;
     int_mv fractional_ms_list[3];
     av1_set_fractional_mv(fractional_ms_list);
     int dis; /* TODO: use dis in distortion calculation later. */
 
     SUBPEL_MOTION_SEARCH_PARAMS ms_params;
     av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &ref_mv,
-                                      cost_list, second_pred, mask, mask_stride,
-                                      invert_mask);
+                                      cost_list);
     MV subpel_start_mv = get_mv_from_fullmv(&x->best_mv.as_fullmv);
 
     switch (mbmi->motion_mode) {
@@ -463,8 +458,8 @@
     FULLPEL_MOTION_SEARCH_PARAMS full_ms_params;
     av1_make_default_fullpel_ms_params(&full_ms_params, cpi, x, bsize,
                                        &ref_mv[id].as_mv, NULL);
-    set_ms_compound_refs(&full_ms_params.ms_buffers, second_pred, mask,
-                         mask_stride, id);
+    av1_set_ms_compound_refs(&full_ms_params.ms_buffers, second_pred, mask,
+                             mask_stride, id);
 
     // Use the mv result from the single mode as mv predictor.
     const FULLPEL_MV start_fullmv = get_fullmv_from_mv(&cur_mv[id].as_mv);
@@ -506,8 +501,9 @@
       unsigned int sse;
       SUBPEL_MOTION_SEARCH_PARAMS ms_params;
       av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize,
-                                        &ref_mv[id].as_mv, NULL, second_pred,
-                                        mask, mask_stride, id);
+                                        &ref_mv[id].as_mv, NULL);
+      av1_set_ms_compound_refs(&ms_params.var_params.ms_buffers, second_pred,
+                               mask, mask_stride, id);
       ms_params.forced_stop = EIGHTH_PEL;
       MV start_mv = get_mv_from_fullmv(&x->best_mv.as_fullmv);
       bestsme = cpi->mv_search_params.find_fractional_mv_step(
@@ -585,8 +581,8 @@
   FULLPEL_MOTION_SEARCH_PARAMS full_ms_params;
   av1_make_default_fullpel_ms_params(&full_ms_params, cpi, x, bsize,
                                      &ref_mv.as_mv, NULL);
-  set_ms_compound_refs(&full_ms_params.ms_buffers, second_pred, mask,
-                       mask_stride, ref_idx);
+  av1_set_ms_compound_refs(&full_ms_params.ms_buffers, second_pred, mask,
+                           mask_stride, ref_idx);
 
   // Use the mv result from the single mode as mv predictor.
   const FULLPEL_MV start_fullmv = get_fullmv_from_mv(this_mv);
@@ -619,8 +615,9 @@
     unsigned int sse;
     SUBPEL_MOTION_SEARCH_PARAMS ms_params;
     av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &ref_mv.as_mv,
-                                      NULL, second_pred, mask, mask_stride,
-                                      ref_idx);
+                                      NULL);
+    av1_set_ms_compound_refs(&ms_params.var_params.ms_buffers, second_pred,
+                             mask, mask_stride, ref_idx);
     ms_params.forced_stop = EIGHTH_PEL;
     MV start_mv = get_mv_from_fullmv(&best_int_mv->as_fullmv);
     bestsme = cpi->mv_search_params.find_fractional_mv_step(
@@ -813,14 +810,9 @@
   if (use_subpel_search) {
     int not_used = 0;
 
-    const uint8_t *second_pred = NULL;
-    const uint8_t *mask = NULL;
-    const int mask_stride = 0;
-    const int invert_mask = 0;
     SUBPEL_MOTION_SEARCH_PARAMS ms_params;
     av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &ref_mv,
-                                      cost_list, second_pred, mask, mask_stride,
-                                      invert_mask);
+                                      cost_list);
     MV subpel_start_mv = get_mv_from_fullmv(&x->best_mv.as_fullmv);
 
     cpi->mv_search_params.find_fractional_mv_step(
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index bc8d4e6..c93a1b7 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -174,14 +174,9 @@
   rv = !(RDCOST(x->rdmult, (*rate_mv), 0) > best_rd_sofar);
 
   if (rv && search_subpel) {
-    const uint8_t *second_pred = NULL;
-    const uint8_t *mask = NULL;
-    const int mask_stride = 0;
-    const int invert_mask = 0;
     SUBPEL_MOTION_SEARCH_PARAMS ms_params;
     av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &ref_mv,
-                                      cost_list, second_pred, mask, mask_stride,
-                                      invert_mask);
+                                      cost_list);
     MV subpel_start_mv = get_mv_from_fullmv(&x->best_mv.as_fullmv);
     cpi->mv_search_params.find_fractional_mv_step(
         xd, cm, &ms_params, subpel_start_mv, &x->best_mv.as_mv, &dis,
@@ -236,14 +231,9 @@
     frame_mv[NEWMV][ref_frame].as_mv.row >>= 3;
     frame_mv[NEWMV][ref_frame].as_mv.col >>= 3;
 
-    const uint8_t *second_pred = NULL;
-    const uint8_t *mask = NULL;
-    const int mask_stride = 0;
-    const int invert_mask = 0;
     SUBPEL_MOTION_SEARCH_PARAMS ms_params;
     av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &ref_mv,
-                                      cost_list, second_pred, mask, mask_stride,
-                                      invert_mask);
+                                      cost_list);
     MV start_mv = get_mv_from_fullmv(&x->best_mv.as_fullmv);
     cpi->mv_search_params.find_fractional_mv_step(
         xd, cm, &ms_params, start_mv, &x->best_mv.as_mv, &dis,
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 7a5b40e..2fc6fa5 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1382,8 +1382,8 @@
 
           const int_mv ref_mv = av1_get_ref_mv(x, 0);
           SUBPEL_MOTION_SEARCH_PARAMS ms_params;
-          av1_make_default_subpel_ms_params(
-              &ms_params, cpi, x, bsize, &ref_mv.as_mv, NULL, NULL, NULL, 0, 0);
+          av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize,
+                                            &ref_mv.as_mv, NULL);
 
           // Refine MV in a small range.
           av1_refine_warped_mv(xd, cm, &ms_params, bsize, pts0, pts_inref0,
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 8303967..b2b2524 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -82,10 +82,6 @@
   const MV_COST_TYPE ori_mv_cost_type = mb->mv_cost_type;
 
   // Parameters used for motion search.
-  const uint8_t *second_pred = NULL;
-  const uint8_t *mask = NULL;
-  const int mask_stride = 0;
-  const int invert_mask = 0;
   FULLPEL_MOTION_SEARCH_PARAMS full_ms_params;
   SUBPEL_MOTION_SEARCH_PARAMS ms_params;
 
@@ -146,8 +142,7 @@
     mb->e_mbd.mi[0]->mv[0] = mb->best_mv;
   } else {  // Do fractional search on the entire block and all sub-blocks.
     av1_make_default_subpel_ms_params(&ms_params, cpi, mb, block_size,
-                                      &baseline_mv, cost_list, second_pred,
-                                      mask, mask_stride, invert_mask);
+                                      &baseline_mv, cost_list);
     ms_params.forced_stop = EIGHTH_PEL;
     ms_params.var_params.subpel_search_type = subpel_search_type;
     MV subpel_start_mv = get_mv_from_fullmv(&mb->best_mv.as_fullmv);
@@ -184,8 +179,7 @@
         // don't need regularization for subpel search
         mb->mv_cost_type = MV_COST_NONE;
         av1_make_default_subpel_ms_params(&ms_params, cpi, mb, subblock_size,
-                                          &baseline_mv, cost_list, second_pred,
-                                          mask, mask_stride, invert_mask);
+                                          &baseline_mv, cost_list);
         ms_params.forced_stop = EIGHTH_PEL;
         ms_params.var_params.subpel_search_type = subpel_search_type;
         subpel_start_mv = get_mv_from_fullmv(&mb->best_mv.as_fullmv);
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 6f3b50d..af192f6 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -156,14 +156,9 @@
                         cond_cost_list(cpi, cost_list), &x->best_mv.as_fullmv,
                         NULL);
 
-  const uint8_t *second_pred = NULL;
-  const uint8_t *mask = NULL;
-  const int mask_stride = 0;
-  const int invert_mask = 0;
   SUBPEL_MOTION_SEARCH_PARAMS ms_params;
   av1_make_default_subpel_ms_params(&ms_params, cpi, x, bsize, &center_mv,
-                                    cost_list, second_pred, mask, mask_stride,
-                                    invert_mask);
+                                    cost_list);
   ms_params.forced_stop = EIGHTH_PEL;
   ms_params.var_params.subpel_search_type = USE_2_TAPS;
   ms_params.mv_cost_params.mv_cost_type = MV_COST_NONE;