Commit e29c9260 authored by Jingning Han's avatar Jingning Han

Use per tile model update for coeff_br coding

Change-Id: Ie52d52bc25e3fdfdea877349215431d8edc064a3
parent 2e40574e
......@@ -2217,6 +2217,9 @@ void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
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)
......
......@@ -220,10 +220,10 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
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 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
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
{
......
......@@ -245,7 +245,7 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
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 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment