JNT_COMP: 4. add context and entropy read/write
Change-Id: I0e6f7ab981e31f7120105515f6204568b6dc82d3
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index ce4c03d..f4d001c 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -8462,6 +8462,14 @@
}
#endif // CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_JNT_COMP
+ if (is_comp_pred) {
+ const int comp_index_ctx = get_comp_index_context(cm, xd);
+ rd_stats->rate += av1_cost_bit(cm->fc->compound_index_probs[comp_index_ctx],
+ mbmi->compound_idx);
+ }
+#endif // CONFIG_JNT_COMP
+
if (this_mode == NEAREST_NEARESTMV) {
if (mbmi_ext->ref_mv_count[ref_frame_type] > 0) {
cur_mv[0] = mbmi_ext->ref_mv_stack[ref_frame_type][0].this_mv;