Use avg compound SAD and variance functions

Enable the encoder to use proper SAD and variance functions for
the average compound mode's motion estimation. A few tests in speed 1
show 4% speed up at lower bit-rate and 2% at higher bit-rate range.

Change-Id: Ie6a1b09dc0df1084a362404abc645c0ec5a89be4
diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index 42019ef..ccdd0ce 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -713,7 +713,11 @@
   MB_MODE_INFO *const mbmi = xd->mi[0];
   int_mv tmp_mv[2];
   int tmp_rate_mv = 0;
-  mbmi->interinter_comp.seg_mask = xd->seg_mask;
+  // TODO(jingning): The average compound mode has proper SAD and variance
+  // functions implemented, and is triggerd by setting the mask pointer as
+  // Null. Need to further implement those for frame distance weighted mode.
+  mbmi->interinter_comp.seg_mask =
+      mbmi->interinter_comp.type == COMPOUND_AVERAGE ? NULL : xd->seg_mask;
   const INTERINTER_COMPOUND_DATA *compound_data = &mbmi->interinter_comp;
 
   if (this_mode == NEW_NEWMV) {