diff --git a/av1/common/entropy.h b/av1/common/entropy.h index ad81dfd8a40dffb1d041f32be79cd33d8ff796c6..447ada6f1b4d507afad5a1b523a5c4d78c0589af 100644 --- a/av1/common/entropy.h +++ b/av1/common/entropy.h @@ -61,13 +61,13 @@ extern "C" { #if CONFIG_LV_MAP #define TXB_SKIP_CONTEXTS 13 #if CONFIG_EXT_TX -#define SIG_COEF_CONTEXTS_2D 20 -#define SIG_COEF_CONTEXTS_1D 20 +#define SIG_COEF_CONTEXTS_2D 16 +#define SIG_COEF_CONTEXTS_1D 16 #define SIG_COEF_CONTEXTS \ (SIG_COEF_CONTEXTS_2D + SIG_COEF_CONTEXTS_1D + SIG_COEF_CONTEXTS_1D) #else -#define SIG_COEF_CONTEXTS_2D 20 -#define SIG_COEF_CONTEXTS 20 +#define SIG_COEF_CONTEXTS_2D 16 +#define SIG_COEF_CONTEXTS 16 #endif #define EOB_COEF_CONTEXTS 25 #define COEFF_BASE_CONTEXTS 42 diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 4a695bc8e75020577ab61299fd5c638394aeef2a..ad5f7ac1a5112015d1a3ca9e8c3ba44caef24073 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c @@ -175,133 +175,178 @@ const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = { #if CONFIG_EXT_TX #if CONFIG_CHROMA_2X2 { - { 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37, + { + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, - 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37, + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, - 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37 }, + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, + }, - { 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50, + { + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, - 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50, + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, - 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50 }, + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, + }, }, #endif { - { 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37, + { + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, - 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37, + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, - 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37 }, + 34, 103, 61, 106, 62, 160, 112, 54, + 173, 121, 157, 92, 157, 129, 94, 65, + }, - { 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50, + { + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, - 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50, + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, - 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50 }, + 52, 124, 84, 136, 107, 197, 161, 82, + 183, 151, 153, 140, 152, 134, 109, 81, + }, }, { - { 34, 127, 74, 124, 74, 204, 153, 76, 226, 162, - 92, 207, 126, 91, 227, 192, 149, 108, 85, 55, + { + 34, 127, 74, 124, 74, 204, 153, 76, + 226, 162, 207, 126, 227, 192, 149, 108, - 34, 127, 74, 124, 74, 204, 153, 76, 226, 162, - 92, 207, 126, 91, 227, 192, 149, 108, 85, 55, + 34, 127, 74, 124, 74, 204, 153, 76, + 226, 162, 207, 126, 227, 192, 149, 108, - 34, 127, 74, 124, 74, 204, 153, 76, 226, 162, - 92, 207, 126, 91, 227, 192, 149, 108, 85, 55 }, + 34, 127, 74, 124, 74, 204, 153, 76, + 226, 162, 207, 126, 227, 192, 149, 108, + }, - { 43, 136, 115, 158, 130, 212, 187, 112, 231, 180, - 130, 202, 164, 130, 236, 204, 168, 139, 112, 114, + { + 43, 136, 115, 158, 130, 212, 187, 112, + 231, 180, 202, 164, 236, 204, 168, 139, - 43, 136, 115, 158, 130, 212, 187, 112, 231, 180, - 130, 202, 164, 130, 236, 204, 168, 139, 112, 114, + 43, 136, 115, 158, 130, 212, 187, 112, + 231, 180, 202, 164, 236, 204, 168, 139, - 43, 136, 115, 158, 130, 212, 187, 112, 231, 180, - 130, 202, 164, 130, 236, 204, 168, 139, 112, 114 }, + 43, 136, 115, 158, 130, 212, 187, 112, + 231, 180, 202, 164, 236, 204, 168, 139, + }, }, { - { 25, 117, 70, 120, 77, 215, 171, 102, 234, 156, - 105, 235, 155, 109, 247, 220, 176, 127, 92, 72, + { + 25, 117, 70, 120, 77, 215, 171, 102, + 234, 156, 235, 155, 247, 220, 176, 127, - 25, 117, 70, 120, 77, 215, 171, 102, 234, 156, - 105, 235, 155, 109, 247, 220, 176, 127, 92, 72, + 25, 117, 70, 120, 77, 215, 171, 102, + 234, 156, 235, 155, 247, 220, 176, 127, - 25, 117, 70, 120, 77, 215, 171, 102, 234, 156, - 105, 235, 155, 109, 247, 220, 176, 127, 92, 72 }, + 25, 117, 70, 120, 77, 215, 171, 102, + 234, 156, 235, 155, 247, 220, 176, 127, + }, - { 24, 88, 49, 100, 62, 202, 148, 62, 237, 178, - 102, 233, 168, 105, 244, 198, 162, 127, 103, 71, + { + 24, 88, 49, 100, 62, 202, 148, 62, + 237, 178, 233, 168, 244, 198, 162, 127, - 24, 88, 49, 100, 62, 202, 148, 62, 237, 178, - 102, 233, 168, 105, 244, 198, 162, 127, 103, 71, + 24, 88, 49, 100, 62, 202, 148, 62, + 237, 178, 233, 168, 244, 198, 162, 127, - 24, 88, 49, 100, 62, 202, 148, 62, 237, 178, - 102, 233, 168, 105, 244, 198, 162, 127, 103, 71 }, + 24, 88, 49, 100, 62, 202, 148, 62, + 237, 178, 233, 168, 244, 198, 162, 127, + }, }, { - { 11, 54, 17, 69, 26, 128, 125, 56, 232, 130, - 60, 237, 121, 66, 250, 168, 134, 114, 93, 53, + { + 11, 54, 17, 69, 26, 128, 125, 56, + 232, 130, 237, 121, 250, 168, 134, 114, - 11, 54, 17, 69, 26, 128, 125, 56, 232, 130, - 60, 237, 121, 66, 250, 168, 134, 114, 93, 53, + 11, 54, 17, 69, 26, 128, 125, 56, + 232, 130, 237, 121, 250, 168, 134, 114, - 11, 54, 17, 69, 26, 128, 125, 56, 232, 130, - 60, 237, 121, 66, 250, 168, 134, 114, 93, 53 }, + 11, 54, 17, 69, 26, 128, 125, 56, + 232, 130, 237, 121, 250, 168, 134, 114, + }, - { 21, 52, 32, 95, 64, 171, 152, 70, 247, 159, - 81, 252, 177, 100, 252, 221, 192, 143, 195, 146, + { + 21, 52, 32, 95, 64, 171, 152, 70, + 247, 159, 252, 177, 252, 221, 192, 143, - 21, 52, 32, 95, 64, 171, 152, 70, 247, 159, - 81, 252, 177, 100, 252, 221, 192, 143, 195, 146, + 21, 52, 32, 95, 64, 171, 152, 70, + 247, 159, 252, 177, 252, 221, 192, 143, - 21, 52, 32, 95, 64, 171, 152, 70, 247, 159, - 81, 252, 177, 100, 252, 221, 192, 143, 195, 146 }, + 21, 52, 32, 95, 64, 171, 152, 70, + 247, 159, 252, 177, 252, 221, 192, 143, + }, }, #else // CONFIG_EXT_TX #if CONFIG_CHROMA_2X2 { - { 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37 }, - { 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50 }, + { + 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, 157, 92, 157, 129, 94, + 65, + }, + + { + 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, 153, 140, 152, 134, + 109, 81, + }, }, #endif { - { 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, - 75, 157, 92, 75, 157, 129, 94, 65, 52, 37 }, - { 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, - 109, 153, 140, 103, 152, 134, 109, 81, 69, 50 }, + { + 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, 157, 92, 157, 129, 94, + 65, + }, + + { + 52, 124, 84, 136, 107, 197, 161, 82, 183, 151, 153, 140, 152, 134, + 109, 81, + }, }, { - { 34, 127, 74, 124, 74, 204, 153, 76, 226, 162, - 92, 207, 126, 91, 227, 192, 149, 108, 85, 55 }, - { 43, 136, 115, 158, 130, 212, 187, 112, 231, 180, - 130, 202, 164, 130, 236, 204, 168, 139, 112, 114 }, + { + 34, 127, 74, 124, 74, 204, 153, 76, 226, 162, 207, 126, 227, 192, 149, + 108, + }, + + { + 43, 136, 115, 158, 130, 212, 187, 112, 231, 180, 202, 164, 236, 204, + 168, 139, + }, }, { - { 25, 117, 70, 120, 77, 215, 171, 102, 234, 156, - 105, 235, 155, 109, 247, 220, 176, 127, 92, 72 }, - { 24, 88, 49, 100, 62, 202, 148, 62, 237, 178, - 102, 233, 168, 105, 244, 198, 162, 127, 103, 71 }, + { + 25, 117, 70, 120, 77, 215, 171, 102, 234, 156, 235, 155, 247, 220, + 176, 127, + }, + + { + 24, 88, 49, 100, 62, 202, 148, 62, 237, 178, 233, 168, 244, 198, 162, + 127, + }, }, { - { 11, 54, 17, 69, 26, 128, 125, 56, 232, 130, - 60, 237, 121, 66, 250, 168, 134, 114, 93, 53 }, - { 21, 52, 32, 95, 64, 171, 152, 70, 247, 159, - 81, 252, 177, 100, 252, 221, 192, 143, 195, 146 }, + { + 11, 54, 17, 69, 26, 128, 125, 56, 232, 130, 237, 121, 250, 168, 134, + 114, + }, + + { + 21, 52, 32, 95, 64, 171, 152, 70, 247, 159, 252, 177, 252, 221, 192, + 143, + }, }, #endif // CONFIG_EXT_TX }; diff --git a/av1/common/txb_common.h b/av1/common/txb_common.h index d2a05253a022ca51c1b6a6cb8ce71d600d15ef96..21dc1763b0817eff1ec43ff61502fa5363ccdea3 100644 --- a/av1/common/txb_common.h +++ b/av1/common/txb_common.h @@ -249,16 +249,15 @@ static INLINE int get_br_ctx(const tran_low_t *tcoeffs, return ctx; } -#define SIG_REF_OFFSET_NUM 11 +#define SIG_REF_OFFSET_NUM 7 static int sig_ref_offset[SIG_REF_OFFSET_NUM][2] = { - { -2, -1 }, { -2, 0 }, { -2, 1 }, { -1, -2 }, { -1, -1 }, { -1, 0 }, - { -1, 1 }, { 0, -2 }, { 0, -1 }, { 1, -2 }, { 1, -1 }, + { -2, -1 }, { -2, 0 }, { -1, -2 }, { -1, -1 }, + { -1, 0 }, { 0, -2 }, { 0, -1 }, }; static INLINE int get_nz_count(const tran_low_t *tcoeffs, int bwl, int height, - int row, int col, const int16_t *iscan) { + int row, int col) { int count = 0; - const int pos = (row << bwl) + col; for (int idx = 0; idx < SIG_REF_OFFSET_NUM; ++idx) { const int ref_row = row + sig_ref_offset[idx][0]; const int ref_col = col + sig_ref_offset[idx][1]; @@ -266,7 +265,7 @@ static INLINE int get_nz_count(const tran_low_t *tcoeffs, int bwl, int height, ref_col >= (1 << bwl)) continue; const int nb_pos = (ref_row << bwl) + ref_col; - if (iscan[nb_pos] < iscan[pos]) count += (tcoeffs[nb_pos] != 0); + count += (tcoeffs[nb_pos] != 0); } return count; } @@ -288,10 +287,8 @@ static INLINE TX_CLASS get_tx_class(TX_TYPE tx_type) { // TODO(angiebird): optimize this function by generate a table that maps from // count to ctx static INLINE int get_nz_map_ctx_from_count(int count, - const tran_low_t *tcoeffs, int coeff_idx, // raster order - int bwl, const int16_t *iscan, - TX_TYPE tx_type) { + int bwl, TX_TYPE tx_type) { (void)tx_type; const int row = coeff_idx >> bwl; const int col = coeff_idx - (row << bwl); @@ -311,19 +308,12 @@ static INLINE int get_nz_map_ctx_from_count(int count, if (row == 0 && col == 0) return offset + 0; - if (row == 0 && col == 1) return offset + 1 + (tcoeffs[0] != 0); + if (row == 0 && col == 1) return offset + 1 + count; - if (row == 1 && col == 0) return offset + 3 + (tcoeffs[0] != 0); + if (row == 1 && col == 0) return offset + 3 + count; if (row == 1 && col == 1) { - int pos; - ctx = (tcoeffs[0] != 0); - - if (iscan[1] < iscan[coeff_idx]) ctx += (tcoeffs[1] != 0); - pos = 1 << bwl; - if (iscan[pos] < iscan[coeff_idx]) ctx += (tcoeffs[pos] != 0); - - ctx = (ctx + 1) >> 1; + ctx = (count + 1) >> 1; assert(5 + ctx <= 7); @@ -333,33 +323,32 @@ static INLINE int get_nz_map_ctx_from_count(int count, if (row == 0) { ctx = (count + 1) >> 1; - assert(ctx < 3); + assert(ctx < 2); return offset + 8 + ctx; } if (col == 0) { ctx = (count + 1) >> 1; - assert(ctx < 3); - return offset + 11 + ctx; + assert(ctx < 2); + return offset + 10 + ctx; } ctx = count >> 1; - assert(14 + ctx < 20); + assert(12 + ctx < 16); - return offset + 14 + ctx; + return offset + 12 + ctx; } static INLINE int get_nz_map_ctx(const tran_low_t *tcoeffs, const int coeff_idx, // raster order const int bwl, const int height, - const int16_t *iscan, TX_TYPE tx_type) { + TX_TYPE tx_type) { const int row = coeff_idx >> bwl; const int col = coeff_idx - (row << bwl); - int count = get_nz_count(tcoeffs, bwl, height, row, col, iscan); - return get_nz_map_ctx_from_count(count, tcoeffs, coeff_idx, bwl, iscan, - tx_type); + int count = get_nz_count(tcoeffs, bwl, height, row, col); + return get_nz_map_ctx_from_count(count, coeff_idx, bwl, tx_type); } static INLINE int get_eob_ctx(const tran_low_t *tcoeffs, diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c index 29c4e81e1e0c4b4c5c4d7b98fced795339c2198d..928f11c007f1b8ee3a6d24db853e28c760033dd6 100644 --- a/av1/decoder/decodetxb.c +++ b/av1/decoder/decodetxb.c @@ -96,12 +96,10 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size); const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi); const int16_t *scan = scan_order->scan; - const int16_t *iscan = scan_order->iscan; for (c = 0; c < seg_eob; ++c) { int is_nz; - int coeff_ctx = - get_nz_map_ctx(tcoeffs, scan[c], bwl, height, iscan, tx_type); + int coeff_ctx = get_nz_map_ctx(tcoeffs, scan[c], bwl, height, tx_type); int eob_ctx = get_eob_ctx(tcoeffs, scan[c], txs_ctx); if (c < seg_eob - 1) { diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c index 432e9be9409442fe3f0867466445324604887138..2d09696de77f67d3cfac99669182078020de42d3 100644 --- a/av1/encoder/encodetxb.c +++ b/av1/encoder/encodetxb.c @@ -107,7 +107,6 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size); const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi); const int16_t *scan = scan_order->scan; - const int16_t *iscan = scan_order->iscan; int c; int is_nz; const int bwl = b_width_log2_lookup[txsize_to_bsize[tx_size]] + 2; @@ -137,8 +136,7 @@ void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, #endif for (c = 0; c < eob; ++c) { - int coeff_ctx = - get_nz_map_ctx(tcoeff, scan[c], bwl, height, iscan, tx_type); + int coeff_ctx = get_nz_map_ctx(tcoeff, scan[c], bwl, height, tx_type); int eob_ctx = get_eob_ctx(tcoeff, scan[c], txs_ctx); tran_low_t v = tcoeff[scan[c]]; @@ -376,7 +374,6 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCK *x, int plane, const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi); const int16_t *scan = scan_order->scan; - const int16_t *iscan = scan_order->iscan; LV_MAP_COEFF_COST *coeff_costs = &x->coeff_costs[txs_ctx][plane_type]; @@ -398,8 +395,7 @@ int av1_cost_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCK *x, int plane, int level = abs(v); if (c < seg_eob) { - int coeff_ctx = - get_nz_map_ctx(qcoeff, scan[c], bwl, height, iscan, tx_type); + int coeff_ctx = get_nz_map_ctx(qcoeff, scan[c], bwl, height, tx_type); cost += coeff_costs->nz_map_cost[coeff_ctx][is_nz]; } @@ -511,7 +507,6 @@ static INLINE int get_golomb_cost(int abs_qc) { void gen_txb_cache(TxbCache *txb_cache, TxbInfo *txb_info) { // gen_nz_count_arr const int16_t *scan = txb_info->scan_order->scan; - const int16_t *iscan = txb_info->scan_order->iscan; const int bwl = txb_info->bwl; const int height = txb_info->height; tran_low_t *qcoeff = txb_info->qcoeff; @@ -522,10 +517,10 @@ void gen_txb_cache(TxbCache *txb_cache, TxbInfo *txb_info) { const int row = coeff_idx >> bwl; const int col = coeff_idx - (row << bwl); txb_cache->nz_count_arr[coeff_idx] = - get_nz_count(qcoeff, bwl, height, row, col, iscan); + get_nz_count(qcoeff, bwl, height, row, col); const int nz_count = txb_cache->nz_count_arr[coeff_idx]; - txb_cache->nz_ctx_arr[coeff_idx] = get_nz_map_ctx_from_count( - nz_count, qcoeff, coeff_idx, bwl, iscan, txb_info->tx_type); + txb_cache->nz_ctx_arr[coeff_idx] = + get_nz_map_ctx_from_count(nz_count, coeff_idx, bwl, txb_info->tx_type); // gen_base_count_mag_arr if (!has_base(qcoeff[coeff_idx], 0)) continue; @@ -731,9 +726,8 @@ static int try_neighbor_level_down_nz(int coeff_idx, int nb_coeff_idx, const int count = txb_cache->nz_count_arr[coeff_idx]; assert(count > 0); txb_info->qcoeff[nb_coeff_idx] = get_lower_coeff(nb_coeff); - const int new_ctx = - get_nz_map_ctx_from_count(count - 1, txb_info->qcoeff, coeff_idx, - txb_info->bwl, iscan, txb_info->tx_type); + const int new_ctx = get_nz_map_ctx_from_count( + count - 1, coeff_idx, txb_info->bwl, txb_info->tx_type); txb_info->qcoeff[nb_coeff_idx] = nb_coeff; const int ctx = txb_cache->nz_ctx_arr[coeff_idx]; const int is_nz = abs_qc > 0; @@ -1038,11 +1032,10 @@ void update_level_down(int coeff_idx, TxbCache *txb_cache, TxbInfo *txb_info) { assert(txb_cache->nz_count_arr[nb_coeff_idx] >= 0); } const int count = txb_cache->nz_count_arr[nb_coeff_idx]; - txb_cache->nz_ctx_arr[nb_coeff_idx] = - get_nz_map_ctx_from_count(count, txb_info->qcoeff, nb_coeff_idx, - txb_info->bwl, iscan, txb_info->tx_type); + txb_cache->nz_ctx_arr[nb_coeff_idx] = get_nz_map_ctx_from_count( + count, nb_coeff_idx, txb_info->bwl, txb_info->tx_type); // int ref_ctx = get_nz_map_ctx(txb_info->qcoeff, nb_coeff_idx, - // txb_info->bwl, iscan, tx_type); + // txb_info->bwl, tx_type); // if (ref_ctx != txb_cache->nz_ctx_arr[nb_coeff_idx]) // printf("nz ctx %d ref_ctx %d\n", // txb_cache->nz_ctx_arr[nb_coeff_idx], ref_ctx); @@ -1130,12 +1123,11 @@ static int get_coeff_cost(tran_low_t qc, int scan_idx, TxbInfo *txb_info, const tran_low_t abs_qc = abs(qc); int cost = 0; const int16_t *scan = txb_info->scan_order->scan; - const int16_t *iscan = txb_info->scan_order->iscan; if (scan_idx < txb_info->seg_eob) { int coeff_ctx = get_nz_map_ctx(txb_info->qcoeff, scan[scan_idx], txb_info->bwl, - txb_info->height, iscan, txb_info->tx_type); + txb_info->height, txb_info->tx_type); cost += txb_costs->nz_map_cost[coeff_ctx][is_nz]; } @@ -1571,7 +1563,6 @@ void av1_update_and_record_txb_context(int plane, int block, int blk_row, av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size); const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi); const int16_t *scan = scan_order->scan; - const int16_t *iscan = scan_order->iscan; const int seg_eob = av1_get_tx_eob(&cpi->common.seg, segment_id, tx_size); int c, i; TXB_CTX txb_ctx; @@ -1611,8 +1602,7 @@ void av1_update_and_record_txb_context(int plane, int block, int blk_row, for (c = 0; c < eob; ++c) { tran_low_t v = qcoeff[scan[c]]; int is_nz = (v != 0); - int coeff_ctx = - get_nz_map_ctx(tcoeff, scan[c], bwl, height, iscan, tx_type); + int coeff_ctx = get_nz_map_ctx(tcoeff, scan[c], bwl, height, tx_type); int eob_ctx = get_eob_ctx(tcoeff, scan[c], txsize_ctx); if (c == seg_eob - 1) break;