[NORMATIVE, jnt-comp] Disable compound_idx if !enable_jnt_comp If enable_jnt_comp is 0, the code still signals the compound_idx symbol, but both choices result in the exact same compound prediction. This patch fixes that redundancy by forcing compound_idx = 1 whenever enable_jnt_comp = 0. Also add an assert in bitstream.c, to make sure that the encoder always selects the correct value of compound_idx. BUG=aomedia:1442 Change-Id: I905052f7f85c53eadbd6ba43c905dabd4c3cb65c
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index 6220340..c461273 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -1290,9 +1290,13 @@ if (mbmi->compound_idx) assert(mbmi->interinter_compound_type == COMPOUND_AVERAGE); - const int comp_index_ctx = get_comp_index_context(cm, xd); - aom_write_symbol(w, mbmi->compound_idx, - ec_ctx->compound_index_cdf[comp_index_ctx], 2); + if (cm->seq_params.enable_jnt_comp) { + const int comp_index_ctx = get_comp_index_context(cm, xd); + aom_write_symbol(w, mbmi->compound_idx, + ec_ctx->compound_index_cdf[comp_index_ctx], 2); + } else { + assert(mbmi->compound_idx == 1); + } } else { assert(cpi->common.reference_mode != SINGLE_REFERENCE && is_inter_compound_mode(mbmi->mode) &&