Refactor ext-inter to loop through all masked modes in rdopt
No change in performance
Change-Id: Ie105a7baf6a2c2258d3ef117e727957e4393f51b
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index acce688..d7d3701 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1599,18 +1599,18 @@
#if CONFIG_EXT_INTER
if (cpi->common.reference_mode != SINGLE_REFERENCE &&
- is_inter_compound_mode(mbmi->mode) &&
+ is_inter_compound_mode(mbmi->mode)
#if CONFIG_MOTION_VAR
- mbmi->motion_mode == SIMPLE_TRANSLATION &&
+ && mbmi->motion_mode == SIMPLE_TRANSLATION
#endif // CONFIG_MOTION_VAR
- is_interinter_wedge_used(bsize)) {
- av1_write_token(w, av1_compound_type_tree,
- cm->fc->compound_type_prob[bsize],
- &compound_type_encodings[mbmi->interinter_compound]);
- if (mbmi->interinter_compound == COMPOUND_WEDGE) {
- aom_write_literal(w, mbmi->interinter_wedge_index,
+ ) {
+ av1_write_token(
+ w, av1_compound_type_tree, cm->fc->compound_type_prob[bsize],
+ &compound_type_encodings[mbmi->interinter_compound_data.type]);
+ if (mbmi->interinter_compound_data.type == COMPOUND_WEDGE) {
+ aom_write_literal(w, mbmi->interinter_compound_data.wedge_index,
get_wedge_bits_lookup(bsize));
- aom_write_bit(w, mbmi->interinter_wedge_sign);
+ aom_write_bit(w, mbmi->interinter_compound_data.wedge_sign);
}
}
#endif // CONFIG_EXT_INTER
@@ -4232,10 +4232,9 @@
}
if (cm->reference_mode != SINGLE_REFERENCE) {
for (i = 0; i < BLOCK_SIZES; i++)
- if (is_interinter_wedge_used(i))
- prob_diff_update(av1_compound_type_tree, fc->compound_type_prob[i],
- cm->counts.compound_interinter[i], COMPOUND_TYPES,
- probwt, header_bc);
+ prob_diff_update(av1_compound_type_tree, fc->compound_type_prob[i],
+ cm->counts.compound_interinter[i], COMPOUND_TYPES,
+ probwt, header_bc);
}
#endif // CONFIG_EXT_INTER