new-multisymbol: Don't signal ext-comp-refs probs
Currently, when new-multisymbol and ext-comp-refs are
both enabled, the comp_ref_type_prob and uni_comp_ref_prob
arrays are forward updated in the compressed header, but
their values are never used.
We can save a tiny bit of space by not signalling the
forward updates at all; as a side benefit, we can wrap
the whole of read_frame_reference_mode_probs() in
a #if !CONFIG_NEW_MULTISYMBOL block.
Note: It seems the encoder already does this; I think
the reason it doesn't cause mismatches is because we
effectively pad the compressed header out to a full byte,
and av1_diff_update_prob() reads a bit with a very high
probability of being 0.
Change-Id: Ia1fca05ee498609c98c7ea1f89578f6783357d7f
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index f1b19af..8492ad3 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -200,15 +200,11 @@
}
}
+#if !CONFIG_NEW_MULTISYMBOL
static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
-#if CONFIG_NEW_MULTISYMBOL && !CONFIG_EXT_COMP_REFS
- (void)r;
-#else
FRAME_CONTEXT *const fc = cm->fc;
int i;
-#endif
-#if !CONFIG_NEW_MULTISYMBOL
if (cm->reference_mode == REFERENCE_MODE_SELECT)
for (i = 0; i < COMP_INTER_CONTEXTS; ++i)
av1_diff_update_prob(r, &fc->comp_inter_prob[i], ACCT_STR);
@@ -221,7 +217,6 @@
}
}
}
-#endif
if (cm->reference_mode != SINGLE_REFERENCE) {
#if CONFIG_EXT_COMP_REFS
@@ -235,7 +230,6 @@
}
#endif // CONFIG_EXT_COMP_REFS
-#if !CONFIG_NEW_MULTISYMBOL
for (i = 0; i < REF_CONTEXTS; ++i) {
int j;
#if CONFIG_EXT_REFS
@@ -248,11 +242,9 @@
av1_diff_update_prob(r, &fc->comp_ref_prob[i][j], ACCT_STR);
#endif // CONFIG_EXT_REFS
}
-#endif // CONFIG_NEW_MULTISYMBOL
}
}
-#if !CONFIG_NEW_MULTISYMBOL
static void update_mv_probs(aom_prob *p, int n, aom_reader *r) {
int i;
for (i = 0; i < n; ++i) av1_diff_update_prob(r, &p[i], ACCT_STR);
@@ -5061,7 +5053,9 @@
if (cm->reference_mode != SINGLE_REFERENCE)
setup_compound_reference_mode(cm);
+#if !CONFIG_NEW_MULTISYMBOL
read_frame_reference_mode_probs(cm, &r);
+#endif
#if CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
for (i = 0; i < COMP_INTER_MODE_CONTEXTS; i++)