Re-design inter mode context for compound modes
Unify the context model referencing for both single and compound
inter modes. Make the context model for compound inter mode coding
independent of the single ones search.
Need to train the model in the final run. Currently provides 0.05%
compression performance improvements.
Change-Id: I9597df4aa293fc7aa2b1becb6dfd68f911d6f278
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index e240c02..289bb28 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1354,11 +1354,16 @@
write_ref_frames(cm, xd, w);
+#if CONFIG_OPT_REF_MV
+ mode_ctx =
+ av1_mode_context_analyzer(mbmi_ext->mode_context, mbmi->ref_frame);
+#else
if (is_compound)
mode_ctx = mbmi_ext->compound_mode_context[mbmi->ref_frame[0]];
else
mode_ctx =
av1_mode_context_analyzer(mbmi_ext->mode_context, mbmi->ref_frame);
+#endif
// If segment skip is not enabled code the mode.
if (!segfeature_active(seg, segment_id, SEG_LVL_SKIP)) {