Downsample sad computation in hd motion search

This CL adds a speed feature to downsample the SAD computation during
motion search by skipping every other row in sad computation.

The downsampling is only performed when there are sufficiently many rows
to get a good estimation. Empirically, this happens when there are at
leas 16 rows.

Currently this speed feature is only enabled on hdres set.

Performance:
 SPD_SET | OVR_PSNR | AVG_PSNR |   SSIM  |  SPD
    0    |  +0.021% |  +0.025% | +0.084% | +2.3%
    1    |  +0.053% |  +0.071% | +0.136% | +3.8%
    2    |  +0.037% |  +0.055% | +0.091% | +4.3%
    3    |  +0.025% |  +0.038% | +0.074% | +2.6%
    4    |  +0.029% |  +0.043% | +0.093% | +3.0%
    5    |  +0.117% |  +0.128% | +0.194% | +3.3%
    6    |  +0.065% |  +0.082% | +0.179% | +3.2%

BUG=aomedia:2781

STATS_CHANGED

Change-Id: Ibf2afd9a7ffed939897249527b41bbaa4152a62c
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index 05ae381..2519cc8 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -191,6 +191,11 @@
 
   // For calculating mv cost
   MV_COST_PARAMS mv_cost_params;
+
+  // Stores the function used to compute the sad. This can be different from the
+  // sdf in vfp (e.g. downsampled sad and not sad) to allow speed up.
+  aom_sad_fn_t sdf;
+  aom_sad_multi_d_fn_t sdx4df;
 } FULLPEL_MOTION_SEARCH_PARAMS;
 
 void av1_make_default_fullpel_ms_params(