Commit 037ee412 authored by David Barker's avatar David Barker
Browse files

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

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
parent db5d66fe
......@@ -200,15 +200,11 @@ static REFERENCE_MODE read_frame_reference_mode(
static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
FRAME_CONTEXT *const fc = cm->fc;
int i;
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 @@ static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
if (cm->reference_mode != SINGLE_REFERENCE) {
......@@ -235,7 +230,6 @@ static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
for (i = 0; i < REF_CONTEXTS; ++i) {
int j;
......@@ -248,11 +242,9 @@ static void read_frame_reference_mode_probs(AV1_COMMON *cm, aom_reader *r) {
av1_diff_update_prob(r, &fc->comp_ref_prob[i][j], ACCT_STR);
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 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
if (cm->reference_mode != SINGLE_REFERENCE)
read_frame_reference_mode_probs(cm, &r);
for (i = 0; i < COMP_INTER_MODE_CONTEXTS; i++)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment