Commit c87b340e authored by Cheng Chen's avatar Cheng Chen

JNT_COMP: reduce context model number

Reduce context model number from 9 to 6.
Let context be two kinds: two reference frames are equal distance
or not.
Also, give equal distance compound weight {9, 7} instead of {8, 8}/16

Reducing context model gives neutral performance.
New compound weight provides -0.14% gain.

Change-Id: I8a3f3021eac9e446ac826e5992f42931af4c8962
parent cce312fb
......@@ -1846,8 +1846,8 @@ static const int intra_mode_context[INTRA_MODES] = {
// the unit tests need to be changed accordingly.
static const double quant_dist_category[4] = { 1.5, 2.5, 3.5, 255 };
static const int quant_dist_lookup_table[2][4][2] = {
{ { 8, 8 }, { 11, 5 }, { 12, 4 }, { 13, 3 } },
{ { 8, 8 }, { 5, 11 }, { 4, 12 }, { 3, 13 } },
{ { 9, 7 }, { 11, 5 }, { 12, 4 }, { 13, 3 } },
{ { 7, 9 }, { 5, 11 }, { 4, 12 }, { 3, 13 } },
};
#endif // CONFIG_JNT_COMP
......
......@@ -1629,13 +1629,10 @@ static const aom_cdf_prob
{ AOM_ICDF(24576), AOM_ICDF(32768), 0 },
{ AOM_ICDF(16384), AOM_ICDF(32768), 0 },
{ AOM_ICDF(8192), AOM_ICDF(32768), 0 },
{ AOM_ICDF(24576), AOM_ICDF(32768), 0 },
{ AOM_ICDF(16384), AOM_ICDF(32768), 0 },
{ AOM_ICDF(8192), AOM_ICDF(32768), 0 }
};
#endif // CONFIG_NEW_MULTISYMBOL
static const aom_prob default_compound_idx_probs[COMP_INDEX_CONTEXTS] = {
192, 128, 64, 192, 128, 64, 192, 128, 64,
192, 128, 64, 192, 128, 64
};
#endif // CONFIG_JNT_COMP
......
......@@ -606,7 +606,7 @@ typedef enum ATTRIBUTE_PACKED {
#endif // CONFIG_EXT_SKIP
#if CONFIG_JNT_COMP
#define COMP_INDEX_CONTEXTS 9
#define COMP_INDEX_CONTEXTS 6
#endif // CONFIG_JNT_COMP
#define NMV_CONTEXTS 3
......
......@@ -107,11 +107,7 @@ static INLINE int get_comp_index_context(const AV1_COMMON *cm,
const MODE_INFO *const left_mi = xd->left_mi;
int above_ctx = 0, left_ctx = 0;
int offset = (fwd > bck) ? 0 : 1;
if (fwd < (bck >> 1) + bck && bck < (fwd >> 1) + fwd) {
offset = 2;
}
const int offset = (fwd == bck);
if (above_mi) {
const MB_MODE_INFO *above_mbmi = &above_mi->mbmi;
......
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