Disable compound mode in sub8x8 coding blocks

Disable the support of compound prediction modes for sub8x8 codking
blocks. Make the rate-distortion optimizations process account for
such constraints.

With the use 2x2 chroma prediction block, this makes the wrost case
number of inter predictors same as vp9. It affects the coding
gains by 0.35% for lowres, 0.17% for midres, and 0.08% for hdres.

The encoding speed is up by 10%.

Change-Id: Ieb2a83030676911baa403e586f1f800cbf485d81
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 835f56b..210d72f 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -10139,6 +10139,10 @@
 #if CONFIG_REF_MV
       int_mv backup_ref_mv[2];
 
+#if !SUB8X8_COMP_REF
+      if (bsize < BLOCK_8X8 && mbmi->ref_frame[1] > INTRA_FRAME) continue;
+#endif
+
       backup_ref_mv[0] = mbmi_ext->ref_mvs[ref_frame][0];
       if (comp_pred) backup_ref_mv[1] = mbmi_ext->ref_mvs[second_ref_frame][0];
 #endif
@@ -10410,7 +10414,12 @@
 
       if (this_rd == INT64_MAX) continue;
 
+#if SUB8X8_COMP_REF
       compmode_cost = av1_cost_bit(comp_mode_p, comp_pred);
+#else
+      if (mbmi->sb_type >= BLOCK_8X8)
+        compmode_cost = av1_cost_bit(comp_mode_p, comp_pred);
+#endif
 
       if (cm->reference_mode == REFERENCE_MODE_SELECT) rate2 += compmode_cost;
     }