JNT_COMP: 4. add context and entropy read/write
Change-Id: I0e6f7ab981e31f7120105515f6204568b6dc82d3
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index d2b0acb..a22f3ec 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -2221,6 +2221,16 @@
read_ref_frames(cm, xd, r, mbmi->segment_id, mbmi->ref_frame);
is_compound = has_second_ref(mbmi);
+#if CONFIG_JNT_COMP
+ if (is_compound) {
+ const int comp_index_ctx = get_comp_index_context(cm, xd);
+ mbmi->compound_idx =
+ aom_read(r, ec_ctx->compound_index_probs[comp_index_ctx], ACCT_STR);
+ if (xd->counts)
+ ++xd->counts->compound_index[comp_index_ctx][mbmi->compound_idx];
+ }
+#endif // CONFIG_JNT_COMP
+
#if CONFIG_EXT_COMP_REFS
#if !USE_UNI_COMP_REFS
// NOTE: uni-directional comp refs disabled