Fix the code to allow a 3rd compound mode

It is possible down the road new compound modes are added in addition to
COMPOUND_AVERAGE and COMPOUND_WEDGE.

Change-Id: I85985d4c104effd34df13845344aac2a08d28019
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index c1a9f9f..a0c4e10 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -632,7 +632,7 @@
 
 #if CONFIG_EXT_INTER
           if (ref && is_interinter_wedge_used(mi->mbmi.sb_type) &&
-              mi->mbmi.interinter_compound)
+              mi->mbmi.interinter_compound == COMPOUND_WEDGE)
             av1_make_masked_inter_predictor(
                 pre, pre_buf->stride, dst, dst_buf->stride, subpel_x, subpel_y,
                 sf, w, h, mi->mbmi.interp_filter, xs, ys,
@@ -698,7 +698,7 @@
 
 #if CONFIG_EXT_INTER
     if (ref && is_interinter_wedge_used(mi->mbmi.sb_type) &&
-        mi->mbmi.interinter_compound)
+        mi->mbmi.interinter_compound == COMPOUND_WEDGE)
       av1_make_masked_inter_predictor(pre, pre_buf->stride, dst,
                                       dst_buf->stride, subpel_x, subpel_y, sf,
                                       w, h, mi->mbmi.interp_filter, xs, ys,
@@ -1283,7 +1283,7 @@
   if (is_interintra_pred(mbmi)) {
     mbmi->ref_frame[1] = NONE;
   } else if (has_second_ref(mbmi) && is_interinter_wedge_used(mbmi->sb_type) &&
-             mbmi->interinter_compound) {
+             mbmi->interinter_compound == COMPOUND_WEDGE) {
     mbmi->interinter_compound = COMPOUND_AVERAGE;
     mbmi->ref_frame[1] = NONE;
   }
@@ -2048,7 +2048,7 @@
   uint8_t *const dst = dst_buf->buf + dst_buf->stride * y + x;
 
   if (is_compound && is_interinter_wedge_used(mbmi->sb_type) &&
-      mbmi->interinter_compound) {
+      mbmi->interinter_compound == COMPOUND_WEDGE) {
 #if CONFIG_AOM_HIGHBITDEPTH
     if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
       build_masked_compound_wedge_highbd(
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 56311e7..eacffd9 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1773,7 +1773,7 @@
         r, av1_compound_type_tree, cm->fc->compound_type_prob[bsize], ACCT_STR);
     if (xd->counts)
       xd->counts->compound_interinter[bsize][mbmi->interinter_compound]++;
-    if (mbmi->interinter_compound) {
+    if (mbmi->interinter_compound == COMPOUND_WEDGE) {
       mbmi->interinter_wedge_index =
           aom_read_literal(r, get_wedge_bits_lookup(bsize), ACCT_STR);
       mbmi->interinter_wedge_sign = aom_read_bit(r, ACCT_STR);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 6829a80..36e0236 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1607,7 +1607,7 @@
       av1_write_token(w, av1_compound_type_tree,
                       cm->fc->compound_type_prob[bsize],
                       &compound_type_encodings[mbmi->interinter_compound]);
-      if (mbmi->interinter_compound) {
+      if (mbmi->interinter_compound == COMPOUND_WEDGE) {
         aom_write_literal(w, mbmi->interinter_wedge_index,
                           get_wedge_bits_lookup(bsize));
         aom_write_bit(w, mbmi->interinter_wedge_sign);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 5ddb4d1..74e159e 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -7513,7 +7513,7 @@
 
     *compmode_wedge_cost = compound_type_cost[mbmi->interinter_compound];
 
-    if (mbmi->interinter_compound)
+    if (mbmi->interinter_compound == COMPOUND_WEDGE)
       *compmode_wedge_cost +=
           av1_cost_literal(get_interinter_wedge_bits(bsize));
   }