OSUOSL/Nero are experiencing Internet connectivity problems. This affects us as we're hosted with OSUOSL. We apologize for the inconvenience.

Commit d2352ecb authored by Ola Hugosson's avatar Ola Hugosson Committed by Thomas Davies

lv_map_multi: add 2 more eob coeff contexts

The EOB coefficient cannot be 0 and for that reason it has special base_cdf contexts.
Before this commit there was two contexts (DC and AC). This commit adds two additional
contexts to separate the AC into 3 bands (i<=N/8, i<=N/4, i<=N/2).

Change-Id: If088b20fd891920b7ea7fc988d29bf6d86d93bfc
parent 736ddef5
......@@ -75,7 +75,7 @@ extern "C" {
#define SIG_COEF_CONTEXTS_2D 26
#define SIG_COEF_CONTEXTS_1D 16
#if CONFIG_LV_MAP_MULTI
#define SIG_COEF_CONTEXTS_EOB 2
#define SIG_COEF_CONTEXTS_EOB 4
#define SIG_COEF_CONTEXTS \
(SIG_COEF_CONTEXTS_2D + SIG_COEF_CONTEXTS_1D + SIG_COEF_CONTEXTS_EOB)
#else
......
This diff is collapsed.
......@@ -448,8 +448,12 @@ static INLINE int get_nz_map_ctx(const uint8_t *const levels,
const TX_TYPE tx_type) {
#endif
#if CONFIG_LV_MAP_MULTI
if (is_eob)
return scan[scan_idx] == 0 ? SIG_COEF_CONTEXTS - 2 : SIG_COEF_CONTEXTS - 1;
if (is_eob) {
if (scan_idx == 0) return SIG_COEF_CONTEXTS - 4;
if (scan_idx <= (height << bwl) / 8) return SIG_COEF_CONTEXTS - 3;
if (scan_idx <= (height << bwl) / 4) return SIG_COEF_CONTEXTS - 2;
return SIG_COEF_CONTEXTS - 1;
}
#endif
const int coeff_idx = scan[scan_idx];
const int row = coeff_idx >> bwl;
......
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