Commit fcdda9dc authored by Angie Chiang's avatar Angie Chiang
Browse files

Add default_eob_extra probability model

Change-Id: Ic8670dcfed8efa37050816bbb8062f9092886ef7
parent 89150ec8
......@@ -387,6 +387,43 @@ static const aom_prob
{ 92, 181, 200, 233, 232, 235, 249, 253, 253, 255, 254, 238, 228,
255, 251, 240, 128, 242, 233, 211, 171, 214, 179, 46, 128 } }
};
#if CONFIG_EOB_FIRST
static const aom_prob
default_eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
{ {
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
},
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
} },
{ {
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
},
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
} },
{ {
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
},
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
} },
{ {
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
},
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
} }
};
#endif
#else
const aom_prob default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
{
......@@ -6294,6 +6331,9 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->txb_skip, default_txb_skip);
av1_copy(fc->nz_map, default_nz_map);
av1_copy(fc->eob_flag, default_eob_flag);
#if CONFIG_EOB_FIRST
av1_copy(fc->eob_extra, default_eob_extra);
#endif
av1_copy(fc->dc_sign, default_dc_sign);
av1_copy(fc->coeff_base, default_coeff_base);
av1_copy(fc->coeff_lps, default_coeff_lps);
......
......@@ -149,6 +149,9 @@ typedef struct frame_contexts {
aom_prob txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS];
aom_prob nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS];
aom_prob eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS];
#if CONFIG_EOB_FIRST
aom_prob eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS];
#endif
aom_prob dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS];
aom_prob coeff_base[TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS]
[COEFF_BASE_CONTEXTS];
......@@ -417,6 +420,9 @@ typedef struct FRAME_COUNTS {
unsigned int txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS][2];
unsigned int nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS][2];
unsigned int eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS][2];
#if CONFIG_EOB_FIRST
unsigned int eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS][2];
#endif
unsigned int dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS][2];
unsigned int coeff_base[TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS]
[COEFF_BASE_CONTEXTS][2];
......
......@@ -152,7 +152,8 @@ void av1_init_txb_probs(FRAME_CONTEXT *fc) {
#if CONFIG_EOB_FIRST
for (ctx = 0; ctx < EOB_COEF_CONTEXTS; ++ctx) {
fc->eob_extra_cdf[tx_size][plane][ctx][0] = AOM_ICDF(128 * 145);
fc->eob_extra_cdf[tx_size][plane][ctx][0] =
AOM_ICDF(128 * (aom_cdf_prob)fc->eob_extra[tx_size][plane][ctx]);
fc->eob_extra_cdf[tx_size][plane][ctx][1] = AOM_ICDF(32768);
fc->eob_extra_cdf[tx_size][plane][ctx][2] = 0;
}
......
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