Commit 5641635f authored by Dake He's avatar Dake He

[lv_map_multi] adjust speed of prob adaptation

Use a lookup table to deterimine speed of adaptation in update_cdf.
Tests on 5 keyframes show improvement in BD-rate: consistently more
than -0.2% for google test sets (lowres, midres, hdres).

Change-Id: I6f8927fc6e876e22ebcf2f9340ed62e54cc79d28
parent 0db7d0eb
...@@ -215,7 +215,15 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) { ...@@ -215,7 +215,15 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) {
#if 1 #if 1
#if CONFIG_LV_MAP_MULTI #if CONFIG_LV_MAP_MULTI
rate = 3 + (cdf[nsymbs] > 15) + (cdf[nsymbs] > 31) + get_msb(nsymbs); // static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
// 3, 3, 3, 3, 4 };
// static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 2,
// 2, 2, 2, 3, 3, 3, 3, 3 };
static const int nsymbs2speed[17] = { 0, 0, 1, 1, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2 };
assert(nsymbs < 17);
rate = 3 + (cdf[nsymbs] > 15) + (cdf[nsymbs] > 31) +
nsymbs2speed[nsymbs]; // + get_msb(nsymbs);
tmp = AOM_ICDF(0); tmp = AOM_ICDF(0);
(void)rate2; (void)rate2;
(void)diff; (void)diff;
......
...@@ -771,13 +771,8 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, const MACROBLOCK *x, ...@@ -771,13 +771,8 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, const MACROBLOCK *x,
const LV_MAP_EOB_COST *const eob_costs = const LV_MAP_EOB_COST *const eob_costs =
&x->eob_costs[eob_multi_size][plane_type]; &x->eob_costs[eob_multi_size][plane_type];
#endif #endif
// eob must be greater than 0 here.
cost = 0; assert(eob > 0);
if (eob == 0) {
cost = coeff_costs->txb_skip_cost[txb_skip_ctx][1];
return cost;
}
cost = coeff_costs->txb_skip_cost[txb_skip_ctx][0]; cost = coeff_costs->txb_skip_cost[txb_skip_ctx][0];
av1_txb_init_levels(qcoeff, width, height, levels); av1_txb_init_levels(qcoeff, width, height, levels);
......
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