Make var-tx context update support lv-map context sets
Properly update the inter transform block context model used by
the level-map coding in the recursive transform block partition
system.
Change-Id: Ib647ead8f6778189b6098bf5e6d691144e899c4b
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 0c3a334..e047247 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4384,7 +4384,12 @@
rd_stats->rate +=
av1_cost_bit(cpi->common.fc->txfm_partition_prob[ctx], 0);
this_rd = RDCOST(x->rdmult, rd_stats->rate, rd_stats->dist);
+#if CONFIG_LV_MAP
+ tmp_eob = p->txb_entropy_ctx[block];
+#else
tmp_eob = p->eobs[block];
+#endif
+
#if CONFIG_TXK_SEL
best_tx_type = mbmi->txk_type[txk_idx];
#endif
@@ -4529,8 +4534,15 @@
if (this_rd < sum_rd) {
int idx, idy;
- for (i = 0; i < tx_size_wide_unit[tx_size]; ++i) pta[i] = !(tmp_eob == 0);
- for (i = 0; i < tx_size_high_unit[tx_size]; ++i) ptl[i] = !(tmp_eob == 0);
+
+#if CONFIG_LV_MAP
+ p->txb_entropy_ctx[block] = tmp_eob;
+#else
+ p->eobs[block] = tmp_eob;
+#endif
+
+ av1_set_txb_context(x, plane, block, tx_size, pta, ptl);
+
txfm_partition_update(tx_above + blk_col, tx_left + blk_row, tx_size,
tx_size);
inter_tx_size[0][0] = tx_size;