Revert "Prevent out-of-boundary mem access in ext-inter"

This reverts commit 6a632e2097790595d00d1ed0e14712d46deb8ef7.

This fails to build after the required change was reverted on top of
which this was rebased on submit:
1b6ccfcfa Revert "Fix separation between ext-inter group of expts."

Change-Id: I5fc50bccc019a31386aad35b12fed8402a09a217
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 239f178..80590c7 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -126,9 +126,7 @@
 #endif  // CONFIG_EXT_INTRA
 #if CONFIG_EXT_INTER
 static struct av1_token interintra_mode_encodings[INTERINTRA_MODES];
-#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 static struct av1_token compound_type_encodings[COMPOUND_TYPES];
-#endif  // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
 static struct av1_token motion_mode_encodings[MOTION_MODES];
@@ -179,9 +177,7 @@
 #endif  // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
 #if CONFIG_EXT_INTER
   av1_tokens_from_tree(interintra_mode_encodings, av1_interintra_mode_tree);
-#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
   av1_tokens_from_tree(compound_type_encodings, av1_compound_type_tree);
-#endif  // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
   av1_tokens_from_tree(motion_mode_encodings, av1_motion_mode_tree);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 4764d44..1015542 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -8765,7 +8765,7 @@
     int best_tmp_rate_mv = rate_mv;
     int tmp_skip_txfm_sb;
     int64_t tmp_skip_sse_sb;
-    int compound_type_cost[COMPOUND_TYPES] = { 0 };
+    int compound_type_cost[COMPOUND_TYPES];
     uint8_t pred0[2 * MAX_SB_SQUARE];
     uint8_t pred1[2 * MAX_SB_SQUARE];
     uint8_t *preds0[1] = { pred0 };
@@ -8778,10 +8778,10 @@
     best_mv[0].as_int = cur_mv[0].as_int;
     best_mv[1].as_int = cur_mv[1].as_int;
     memset(&best_compound_data, 0, sizeof(INTERINTER_COMPOUND_DATA));
+    av1_cost_tokens(compound_type_cost, cm->fc->compound_type_prob[bsize],
+                    av1_compound_type_tree);
 
     if (masked_compound_used) {
-      av1_cost_tokens(compound_type_cost, cm->fc->compound_type_prob[bsize],
-                      av1_compound_type_tree);
       // get inter predictors to use for masked compound modes
       av1_build_inter_predictors_for_planes_single_buf(
           xd, bsize, 0, 0, mi_row, mi_col, 0, preds0, strides);
@@ -8794,7 +8794,6 @@
       tmp_rate_mv = rate_mv;
       best_rd_cur = INT64_MAX;
       mbmi->interinter_compound_data.type = cur_type;
-
       rs2 = av1_cost_literal(get_interinter_compound_type_bits(
                 bsize, mbmi->interinter_compound_data.type)) +
             (masked_compound_used