Commit 8682cd91 authored by Jingning Han's avatar Jingning Han
Browse files

Properly update eob state in first pass coeff decode

Update the last coefficient position whose level is above
NUM_BASE_LEVELS in the first pass decoding. This increases the
lv-map txb decode speed by 10%.

Change-Id: Ib35409a1d374c1e171ee45ac805a3a318793935e
parent 6e5ade98
......@@ -180,7 +180,11 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][0]>>7,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][1]>>7,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][2]>>7);
if (level < 3) cul_level += level;
if (level < 3) {
cul_level += level;
} else if (update_eob < 0) {
update_eob = c;
}
#else
int is_nz;
int coeff_ctx = get_nz_map_ctx(levels, c, scan, bwl, height, tx_type);
......@@ -216,14 +220,13 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
}
levels[get_paded_idx(scan[c], bwl)] = k + 1;
*max_scan_line = AOMMAX(*max_scan_line, scan[c]);
if (update_eob < 0 && k == NUM_BASE_LEVELS) update_eob = c;
}
#endif
#endif
}
#if USE_CAUSAL_BASE_CTX
update_eob = *eob - 1;
#else
#if !USE_CAUSAL_BASE_CTX
int i;
for (i = 0; i < NUM_BASE_LEVELS; ++i) {
av1_get_base_level_counts(levels, i, width, height, level_counts);
......
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