Use per tile model update for coeff_br coding
Change-Id: Ie52d52bc25e3fdfdea877349215431d8edc064a3
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 8097431..3154ca0 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -2217,6 +2217,9 @@
AVERAGE_TILE_CDFS(dc_sign_cdf)
AVERAGE_TILE_CDFS(coeff_base_cdf)
AVERAGE_TILE_CDFS(coeff_lps_cdf)
+#if BR_NODE
+ AVERAGE_TILE_CDFS(coeff_br_cdf)
+#endif
#else
AVERAGE_TILE_CDFS(coef_head_cdfs)
AVERAGE_TILE_CDFS(coef_tail_cdfs)
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index b42d4fb..3b23898 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -220,10 +220,10 @@
for (idx = 0; idx < BASE_RANGE_SETS; ++idx) {
#if LV_MAP_PROB
if (aom_read_symbol(r,
- cm->fc->coeff_br_cdf[txs_ctx][plane_type][idx][ctx],
+ ec_ctx->coeff_br_cdf[txs_ctx][plane_type][idx][ctx],
2, ACCT_STR))
#else // LV_MAP_PROB
- if (aom_read(r, cm->fc->coeff_br[txs_ctx][plane_type][idx][ctx],
+ if (aom_read(r, ec_ctx->coeff_br[txs_ctx][plane_type][idx][ctx],
ACCT_STR))
#endif // LV_MAP_PROB
{
@@ -235,10 +235,10 @@
for (tok = 0; tok < extra_bits; ++tok) {
#if LV_MAP_PROB
if (aom_read_symbol(r,
- cm->fc->coeff_lps_cdf[txs_ctx][plane_type][ctx],
+ ec_ctx->coeff_lps_cdf[txs_ctx][plane_type][ctx],
2, ACCT_STR))
#else
- if (aom_read(r, cm->fc->coeff_lps[txs_ctx][plane_type][ctx],
+ if (aom_read(r, ec_ctx->coeff_lps[txs_ctx][plane_type][ctx],
ACCT_STR))
#endif
{
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index df25c7e..dc91659 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -245,7 +245,7 @@
for (idx = 0; idx < BASE_RANGE_SETS; ++idx) {
aom_write_symbol(w, idx == br_set_idx,
- cm->fc->coeff_br_cdf[txs_ctx][plane_type][idx][ctx], 2);
+ ec_ctx->coeff_br_cdf[txs_ctx][plane_type][idx][ctx], 2);
if (idx == br_set_idx) {
br_base = br_index_to_coeff[br_set_idx];
br_offset = base_range - br_base;
@@ -253,11 +253,11 @@
for (int tok = 0; tok < extra_bits; ++tok) {
if (tok == br_offset) {
aom_write_symbol(
- w, 1, cm->fc->coeff_lps_cdf[txs_ctx][plane_type][ctx], 2);
+ w, 1, ec_ctx->coeff_lps_cdf[txs_ctx][plane_type][ctx], 2);
break;
}
aom_write_symbol(w, 0,
- cm->fc->coeff_lps_cdf[txs_ctx][plane_type][ctx], 2);
+ ec_ctx->coeff_lps_cdf[txs_ctx][plane_type][ctx], 2);
}
// aom_write_literal(w, br_offset, br_extra_bits[idx]);
break;