Commit 4ca633dc authored by Jingning Han's avatar Jingning Han
Browse files

Fix txb_skip context model

Change-Id: I2ad279d27fb34c9c6bcee6029a40377541f066a7
parent a9ba58ec
......@@ -22,12 +22,12 @@
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
const aom_prob default_txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS] = {
{ 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 },
{ 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 },
{ 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 },
{ 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 },
{ 255, 86, 115, 175, 148, 203, 249, 35, 126, 219, 14, 79, 185 },
{ 255, 76, 109, 162, 150, 201, 244, 26, 118, 218, 12, 72, 187 },
{ 253, 78, 124, 165, 170, 211, 245, 34, 135, 223, 15, 98, 212 },
{ 243, 46, 143, 173, 205, 226, 250, 52, 182, 240, 15, 100, 220 },
#if CONFIG_TX64X64
{ 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 },
{ 243, 46, 143, 173, 205, 226, 250, 52, 182, 240, 15, 100, 220 },
#endif
};
const aom_prob default_dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS] = {
......
......@@ -565,7 +565,9 @@ static INLINE void get_txb_ctx(BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
const int txb_h_unit = tx_size_high_unit[tx_size];
int ctx_offset = (plane == 0) ? 0 : 7;
if (plane_bsize > txsize_to_bsize[tx_size]) ctx_offset += 3;
if (num_pels_log2_lookup[plane_bsize] >
num_pels_log2_lookup[txsize_to_bsize[tx_size]])
ctx_offset += 3;
int dc_sign = 0;
for (int k = 0; k < txb_w_unit; ++k) {
......
......@@ -648,6 +648,18 @@ int main(int argc, const char **argv) {
"default_coeff_base_cdf[TX_SIZES][PLANE_TYPES][NUM_BASE_"
"LEVELS][COEFF_BASE_CONTEXTS][CDF_SIZE(2)]");
cts_each_dim[0] = TX_SIZES;
cts_each_dim[1] = TXB_SKIP_CONTEXTS;
cts_each_dim[2] = 2;
optimize_entropy_table(
&fc.txb_skip[0][0][0], probsfile, 3, cts_each_dim, NULL, 1,
"static const aom_prob "
"default_txk_skip[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS]");
optimize_cdf_table(&fc.txb_skip[0][0][0], probsfile, 3, cts_each_dim,
"static const aom_cdf_prob "
"default_nz_map_cdf[TX_SIZES][PLANE_TYPES][SIG_COEF_"
"CONTEXTS][CDF_SIZE(2)]");
cts_each_dim[0] = TX_SIZES;
cts_each_dim[1] = PLANE_TYPES;
cts_each_dim[2] = SIG_COEF_CONTEXTS;
......
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