A few fixes for ext-inter

* When wedge and compound-segment are disabled, we don't use
  compound_type_cdf, but it still gets copied around, averaged, etc.
  It's slightly nicer to avoid that when it isn't necessary.

* Fix an anomaly with cb4x4: We had (schematically)
  'if (bsize < 8X8 && CB4X4)', which is backwards when compared to
  other similar conditions elsewhere in the code.
  Change this to 'if (bsize < 8X8 && !CB4X4)" to match other code.

Change-Id: If802cf4f305c30cd642d0d5dd6610b547b52a027
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 9b21d61..3b85d6c 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -3065,7 +3065,9 @@
 #if CONFIG_EXT_INTER
   AVERAGE_TILE_CDFS(inter_compound_mode_cdf)
 
+#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
   AVERAGE_TILE_CDFS(compound_type_cdf)
+#endif  // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 #if CONFIG_COMPOUND_SINGLEREF
   AVERAGE_TILE_CDFS(inter_singleref_comp_mode_cdf)
 #endif
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index b97e8a8..9c5e164 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -649,9 +649,6 @@
       { AOM_ICDF(32640), AOM_ICDF(32768), 0 },
       { AOM_ICDF(32640), AOM_ICDF(32768), 0 },
     };
-#else
-static const aom_cdf_prob default_compound_type_cdf[BLOCK_SIZES_ALL]
-                                                   [CDF_SIZE(COMPOUND_TYPES)];
 #endif  // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
 
 #if CONFIG_INTERINTRA
@@ -4710,7 +4707,9 @@
            default_inter_singleref_comp_mode_cdf);
 #endif  // CONFIG_COMPOUND_SINGLEREF
   av1_copy(fc->compound_type_prob, default_compound_type_probs);
+#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
   av1_copy(fc->compound_type_cdf, default_compound_type_cdf);
+#endif  // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 #if CONFIG_INTERINTRA
   av1_copy(fc->interintra_prob, default_interintra_prob);
   av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob);
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 3177c7e..03ace80 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -202,7 +202,9 @@
       INTER_SINGLEREF_COMP_MODES)];
 #endif  // CONFIG_COMPOUND_SINGLEREF
   aom_prob compound_type_prob[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1];
+#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
   aom_cdf_prob compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)];
+#endif  // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 #if CONFIG_INTERINTRA
   aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
   aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL];
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 848772b..3a3e071 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -2347,7 +2347,7 @@
   }
 
 #if CONFIG_EXT_INTER
-  if ((bsize < BLOCK_8X8 && unify_bsize) ||
+  if ((bsize < BLOCK_8X8 && !unify_bsize) ||
       (mbmi->mode != ZEROMV && mbmi->mode != ZERO_ZEROMV))
 #else
   if ((bsize < BLOCK_8X8 && !unify_bsize) || mbmi->mode != ZEROMV)