Avoid sending bits for the compound type for sub 8x8 blocks
The only compound mode used with sub 8x8 blocks is COMPOUND_AVERAGE, so
we don't have to send anything in this case
Change-Id: I90d0162e5f7f1ad205e65094293cde2a48eb77b1
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index d59bd9e..bec0423 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1940,29 +1940,33 @@
#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
#if CONFIG_EXT_INTER
- mbmi->interinter_compound_data.type = COMPOUND_AVERAGE;
if (cm->reference_mode != SINGLE_REFERENCE &&
is_inter_compound_mode(mbmi->mode)
#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
&& mbmi->motion_mode == SIMPLE_TRANSLATION
#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
) {
- mbmi->interinter_compound_data.type = aom_read_tree(
- r, av1_compound_type_tree, cm->fc->compound_type_prob[bsize], ACCT_STR);
+ if (is_any_masked_compound_used(bsize)) {
+ mbmi->interinter_compound_data.type =
+ aom_read_tree(r, av1_compound_type_tree,
+ cm->fc->compound_type_prob[bsize], ACCT_STR);
+ if (mbmi->interinter_compound_data.type == COMPOUND_WEDGE) {
+ mbmi->interinter_compound_data.wedge_index =
+ aom_read_literal(r, get_wedge_bits_lookup(bsize), ACCT_STR);
+ mbmi->interinter_compound_data.wedge_sign = aom_read_bit(r, ACCT_STR);
+ }
+#if CONFIG_COMPOUND_SEGMENT
+ else if (mbmi->interinter_compound_data.type == COMPOUND_SEG) {
+ mbmi->interinter_compound_data.mask_type =
+ aom_read_literal(r, MAX_SEG_MASK_BITS, ACCT_STR);
+ }
+#endif // CONFIG_COMPOUND_SEGMENT
+ } else {
+ mbmi->interinter_compound_data.type = COMPOUND_AVERAGE;
+ }
if (xd->counts)
xd->counts->compound_interinter[bsize]
[mbmi->interinter_compound_data.type]++;
- if (mbmi->interinter_compound_data.type == COMPOUND_WEDGE) {
- mbmi->interinter_compound_data.wedge_index =
- aom_read_literal(r, get_wedge_bits_lookup(bsize), ACCT_STR);
- mbmi->interinter_compound_data.wedge_sign = aom_read_bit(r, ACCT_STR);
- }
-#if CONFIG_COMPOUND_SEGMENT
- else if (mbmi->interinter_compound_data.type == COMPOUND_SEG) {
- mbmi->interinter_compound_data.mask_type =
- aom_read_literal(r, MAX_SEG_MASK_BITS, ACCT_STR);
- }
-#endif // CONFIG_COMPOUND_SEGMENT
}
#endif // CONFIG_EXT_INTER