Commit 350731e8 authored by Dmitry Kovalev's avatar Dmitry Kovalev

Organizing all scan tables into lookup table.

Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
parent 0a64f943
......@@ -185,22 +185,18 @@ static int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
return combine_entropy_contexts(above_ec, left_ec);
}
static void get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
PLANE_TYPE type, int block_idx,
const int16_t **scan, const int16_t **scan_nb) {
static const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
PLANE_TYPE type, int block_idx) {
const MODE_INFO *const mi = xd->mi_8x8[0];
const MB_MODE_INFO *const mbmi = &mi->mbmi;
const scan_order *so;
if (is_inter_block(mbmi) || type != PLANE_TYPE_Y_WITH_DC || xd->lossless) {
so = &inter_scan_orders[tx_size];
return &vp9_default_scan_orders[tx_size];
} else {
const MB_PREDICTION_MODE mode =
mbmi->sb_type < BLOCK_8X8 ? mi->bmi[block_idx].as_mode : mbmi->mode;
so = &intra_scan_orders[tx_size][mode];
return &vp9_scan_orders[tx_size][mode2txfm_map[mode]];
}
*scan = so->scan;
*scan_nb = so->neighbors;
}
#endif // VP9_COMMON_VP9_ENTROPY_H_
......@@ -73,7 +73,8 @@ typedef enum {
DCT_DCT = 0, // DCT in both horizontal and vertical
ADST_DCT = 1, // ADST in vertical, DCT in horizontal
DCT_ADST = 2, // DCT in vertical, ADST in horizontal
ADST_ADST = 3 // ADST in both directions
ADST_ADST = 3, // ADST in both directions
TX_TYPES = 4
} TX_TYPE;
typedef enum {
......
This diff is collapsed.
......@@ -19,184 +19,16 @@
#define MAX_NEIGHBORS 2
extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_row_scan_4x4[16]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_8x8[64]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_8x8[64]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_row_scan_8x8[64]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_16x16[256]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_16x16[256]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_row_scan_16x16[256]);
extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_32x32[1024]);
extern DECLARE_ALIGNED(16, int16_t, vp9_default_iscan_4x4[16]);
extern DECLARE_ALIGNED(16, int16_t, vp9_col_iscan_4x4[16]);
extern DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_4x4[16]);
extern DECLARE_ALIGNED(16, int16_t, vp9_default_iscan_8x8[64]);
extern DECLARE_ALIGNED(16, int16_t, vp9_col_iscan_8x8[64]);
extern DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_8x8[64]);
extern DECLARE_ALIGNED(16, int16_t, vp9_default_iscan_16x16[256]);
extern DECLARE_ALIGNED(16, int16_t, vp9_col_iscan_16x16[256]);
extern DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_16x16[256]);
extern DECLARE_ALIGNED(16, int16_t, vp9_default_iscan_32x32[1024]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_default_scan_4x4_neighbors[17 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_col_scan_4x4_neighbors[17 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_row_scan_4x4_neighbors[17 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_col_scan_8x8_neighbors[65 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_row_scan_8x8_neighbors[65 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_default_scan_8x8_neighbors[65 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_col_scan_16x16_neighbors[257 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_row_scan_16x16_neighbors[257 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_default_scan_16x16_neighbors[257 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int16_t,
vp9_default_scan_32x32_neighbors[1025 * MAX_NEIGHBORS]);
void vp9_init_neighbors();
typedef struct {
const int16_t *scan;
const int16_t *iscan;
const int16_t *neighbors;
} scan_order;
extern const scan_order intra_scan_orders[TX_SIZES][INTRA_MODES];
extern const scan_order inter_scan_orders[TX_SIZES];
static INLINE const int16_t* get_scan_4x4(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_scan_4x4;
case DCT_ADST:
return vp9_col_scan_4x4;
default:
return vp9_default_scan_4x4;
}
}
static INLINE void get_scan_nb_4x4(TX_TYPE tx_type,
const int16_t **scan, const int16_t **nb) {
switch (tx_type) {
case ADST_DCT:
*scan = vp9_row_scan_4x4;
*nb = vp9_row_scan_4x4_neighbors;
break;
case DCT_ADST:
*scan = vp9_col_scan_4x4;
*nb = vp9_col_scan_4x4_neighbors;
break;
default:
*scan = vp9_default_scan_4x4;
*nb = vp9_default_scan_4x4_neighbors;
break;
}
}
static INLINE const int16_t* get_iscan_4x4(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_iscan_4x4;
case DCT_ADST:
return vp9_col_iscan_4x4;
default:
return vp9_default_iscan_4x4;
}
}
static INLINE const int16_t* get_scan_8x8(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_scan_8x8;
case DCT_ADST:
return vp9_col_scan_8x8;
default:
return vp9_default_scan_8x8;
}
}
static INLINE void get_scan_nb_8x8(TX_TYPE tx_type,
const int16_t **scan, const int16_t **nb) {
switch (tx_type) {
case ADST_DCT:
*scan = vp9_row_scan_8x8;
*nb = vp9_row_scan_8x8_neighbors;
break;
case DCT_ADST:
*scan = vp9_col_scan_8x8;
*nb = vp9_col_scan_8x8_neighbors;
break;
default:
*scan = vp9_default_scan_8x8;
*nb = vp9_default_scan_8x8_neighbors;
break;
}
}
static INLINE const int16_t* get_iscan_8x8(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_iscan_8x8;
case DCT_ADST:
return vp9_col_iscan_8x8;
default:
return vp9_default_iscan_8x8;
}
}
static INLINE const int16_t* get_scan_16x16(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_scan_16x16;
case DCT_ADST:
return vp9_col_scan_16x16;
default:
return vp9_default_scan_16x16;
}
}
static INLINE void get_scan_nb_16x16(TX_TYPE tx_type,
const int16_t **scan, const int16_t **nb) {
switch (tx_type) {
case ADST_DCT:
*scan = vp9_row_scan_16x16;
*nb = vp9_row_scan_16x16_neighbors;
break;
case DCT_ADST:
*scan = vp9_col_scan_16x16;
*nb = vp9_col_scan_16x16_neighbors;
break;
default:
*scan = vp9_default_scan_16x16;
*nb = vp9_default_scan_16x16_neighbors;
break;
}
}
static INLINE const int16_t* get_iscan_16x16(TX_TYPE tx_type) {
switch (tx_type) {
case ADST_DCT:
return vp9_row_iscan_16x16;
case DCT_ADST:
return vp9_col_iscan_16x16;
default:
return vp9_default_iscan_16x16;
}
}
extern const scan_order vp9_default_scan_orders[TX_SIZES];
extern const scan_order vp9_scan_orders[TX_SIZES][TX_TYPES];
static INLINE int get_coef_context(const int16_t *neighbors,
const uint8_t *token_cache, int c) {
......
......@@ -108,14 +108,16 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
counts->coef[tx_size][type][ref];
unsigned int (*eob_branch_count)[PREV_COEF_CONTEXTS] =
counts->eob_branch[tx_size][type][ref];
const int16_t *scan, *nb;
const uint8_t *cat6;
const uint8_t *band_translate = get_band_translate(tx_size);
const int dq_shift = (tx_size == TX_32X32);
const scan_order *so = get_scan(xd, tx_size, type, block_idx);
const int16_t *scan = so->scan;
const int16_t *nb = so->neighbors;
int v;
int16_t dqv = dq[0];
get_scan(xd, tx_size, type, block_idx, &scan, &nb);
while (c < seg_eob) {
int val;
......
......@@ -152,16 +152,18 @@ static void optimize_b(MACROBLOCK *mb,
PLANE_TYPE type = pd->plane_type;
int err_mult = plane_rd_mult[type];
const int default_eob = 16 << (tx_size << 1);
const int16_t *scan, *nb;
const int mul = 1 + (tx_size == TX_32X32);
uint8_t token_cache[1024];
const int16_t *dequant_ptr = pd->dequant;
const uint8_t *const band_translate = get_band_translate(tx_size);
const scan_order *so = get_scan(xd, tx_size, type, block);
const int16_t *scan = so->scan;
const int16_t *nb = so->neighbors;
assert((!type && !plane) || (type && plane));
dqcoeff_ptr = BLOCK_OFFSET(pd->dqcoeff, block);
qcoeff_ptr = BLOCK_OFFSET(pd->qcoeff, block);
get_scan(xd, tx_size, type, block, &scan, &nb);
assert(eob <= default_eob);
/* Now set up a Viterbi trellis to evaluate alternative roundings. */
......@@ -368,7 +370,7 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
int16_t *coeff = BLOCK_OFFSET(p->coeff, block);
int16_t *qcoeff = BLOCK_OFFSET(pd->qcoeff, block);
int16_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
const int16_t *scan, *iscan;
const scan_order *so;
uint16_t *eob = &pd->eobs[block];
const int bwl = b_width_log2(plane_bsize), bw = 1 << bwl;
const int twl = bwl - tx_size, twmask = (1 << twl) - 1;
......@@ -377,8 +379,7 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
switch (tx_size) {
case TX_32X32:
scan = vp9_default_scan_32x32;
iscan = vp9_default_iscan_32x32;
so = &vp9_default_scan_orders[TX_32X32];
block >>= 6;
xoff = 32 * (block & twmask);
yoff = 32 * (block >> twl);
......@@ -389,11 +390,11 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fdct32x32(src_diff, coeff, bw * 4);
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan,
so->iscan);
break;
case TX_16X16:
scan = vp9_default_scan_16x16;
iscan = vp9_default_iscan_16x16;
so = &vp9_default_scan_orders[TX_16X16];
block >>= 4;
xoff = 16 * (block & twmask);
yoff = 16 * (block >> twl);
......@@ -401,11 +402,10 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fdct16x16(src_diff, coeff, bw * 4);
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
break;
case TX_8X8:
scan = vp9_default_scan_8x8;
iscan = vp9_default_iscan_8x8;
so = &vp9_default_scan_orders[TX_8X8];
block >>= 2;
xoff = 8 * (block & twmask);
yoff = 8 * (block >> twl);
......@@ -413,18 +413,17 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fdct8x8(src_diff, coeff, bw * 4);
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
break;
case TX_4X4:
scan = vp9_default_scan_4x4;
iscan = vp9_default_iscan_4x4;
so = &vp9_default_scan_orders[TX_4X4];
xoff = 4 * (block & twmask);
yoff = 4 * (block >> twl);
src_diff = p->src_diff + 4 * bw * yoff + xoff;
x->fwd_txm4x4(src_diff, coeff, bw * 4);
vp9_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
break;
default:
assert(0);
......@@ -547,7 +546,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
int16_t *coeff = BLOCK_OFFSET(p->coeff, block);
int16_t *qcoeff = BLOCK_OFFSET(pd->qcoeff, block);
int16_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
const int16_t *scan, *iscan;
const scan_order *so;
TX_TYPE tx_type;
MB_PREDICTION_MODE mode;
const int bwl = b_width_log2(plane_bsize);
......@@ -569,8 +568,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
switch (tx_size) {
case TX_32X32:
scan = vp9_default_scan_32x32;
iscan = vp9_default_iscan_32x32;
so = &vp9_default_scan_orders[TX_32X32];
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 6;
vp9_predict_intra_block(xd, block, bwl, TX_32X32, mode,
......@@ -585,15 +583,15 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fdct32x32(src_diff, coeff, diff_stride);
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan,
so->iscan);
}
if (!x->skip_encode && *eob)
vp9_idct32x32_add(dqcoeff, dst, pd->dst.stride, *eob);
break;
case TX_16X16:
tx_type = get_tx_type_16x16(pd->plane_type, xd);
scan = get_scan_16x16(tx_type);
iscan = get_iscan_16x16(tx_type);
so = &vp9_scan_orders[TX_16X16][tx_type];
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 4;
vp9_predict_intra_block(xd, block, bwl, TX_16X16, mode,
......@@ -604,15 +602,14 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fht16x16(tx_type, src_diff, coeff, diff_stride);
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
p->quant, p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
}
if (!x->skip_encode && *eob)
vp9_iht16x16_add(tx_type, dqcoeff, dst, pd->dst.stride, *eob);
break;
case TX_8X8:
tx_type = get_tx_type_8x8(pd->plane_type, xd);
scan = get_scan_8x8(tx_type);
iscan = get_iscan_8x8(tx_type);
so = &vp9_scan_orders[TX_8X8][tx_type];
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 2;
vp9_predict_intra_block(xd, block, bwl, TX_8X8, mode,
......@@ -623,15 +620,14 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_fht8x8(tx_type, src_diff, coeff, diff_stride);
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant,
p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
}
if (!x->skip_encode && *eob)
vp9_iht8x8_add(tx_type, dqcoeff, dst, pd->dst.stride, *eob);
break;
case TX_4X4:
tx_type = get_tx_type_4x4(pd->plane_type, xd, block);
scan = get_scan_4x4(tx_type);
iscan = get_iscan_4x4(tx_type);
so = &vp9_scan_orders[TX_4X4][tx_type];
if (mbmi->sb_type < BLOCK_8X8 && plane == 0)
mode = xd->mi_8x8[0]->bmi[block].as_mode;
else
......@@ -649,7 +645,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
x->fwd_txm4x4(src_diff, coeff, diff_stride);
vp9_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant,
p->quant_shift, qcoeff, dqcoeff,
pd->dequant, p->zbin_extra, eob, scan, iscan);
pd->dequant, p->zbin_extra, eob, so->scan, so->iscan);
}
if (!x->skip_encode && *eob) {
......
......@@ -682,6 +682,7 @@ static void txfm_rd_in_plane(MACROBLOCK *x,
const BLOCK_SIZE bs = get_plane_block_size(bsize, pd);
const int num_4x4_w = num_4x4_blocks_wide_lookup[bs];
const int num_4x4_h = num_4x4_blocks_high_lookup[bs];
const scan_order *so;
init_rdcost_stack(x, tx_size, num_4x4_w, num_4x4_h,
ref_best_rd, rd_stack);
......@@ -692,7 +693,9 @@ static void txfm_rd_in_plane(MACROBLOCK *x,
pd->above_context, pd->left_context,
num_4x4_w, num_4x4_h);
get_scan(xd, tx_size, pd->plane_type, 0, &rd_stack->scan, &rd_stack->nb);
so = get_scan(xd, tx_size, pd->plane_type, 0);
rd_stack->scan = so->scan;
rd_stack->nb = so->neighbors;
foreach_transformed_block_in_plane(xd, bsize, plane,
block_yrd_txfm, rd_stack);
......@@ -1069,8 +1072,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
for (idy = 0; idy < num_4x4_blocks_high; ++idy) {
for (idx = 0; idx < num_4x4_blocks_wide; ++idx) {
int64_t ssz;
const int16_t *scan;
const int16_t *nb;
const scan_order *so;
const uint8_t *src = src_init + idx * 4 + idy * 4 * src_stride;
uint8_t *dst = dst_init + idx * 4 + idy * 4 * dst_stride;
const int block = ib + idy * 2 + idx;
......@@ -1088,17 +1090,17 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
dst, dst_stride);
tx_type = get_tx_type_4x4(PLANE_TYPE_Y_WITH_DC, xd, block);
get_scan_nb_4x4(tx_type, &scan, &nb);
so = &vp9_scan_orders[TX_4X4][tx_type];
if (tx_type != DCT_DCT)
vp9_short_fht4x4(src_diff, coeff, 8, tx_type);
else
x->fwd_txm4x4(src_diff, coeff, 8);
vp9_regular_quantize_b_4x4(x, 4, block, scan, get_iscan_4x4(tx_type));
vp9_regular_quantize_b_4x4(x, 4, block, so->scan, so->iscan);
ratey += cost_coeffs(x, 0, block,
tempa + idx, templ + idy, TX_4X4, scan, nb);
ratey += cost_coeffs(x, 0, block, tempa + idx, templ + idy, TX_4X4,
so->scan, so->neighbors);
distortion += vp9_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, block),
16, &ssz) >> 2;
if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd)
......@@ -1559,6 +1561,7 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
pd->dst.stride)];
int64_t thisdistortion = 0, thissse = 0;
int thisrate = 0, ref;
const scan_order *so = &vp9_default_scan_orders[TX_4X4];
const int is_compound = has_second_ref(&mi->mbmi);
for (ref = 0; ref < 1 + is_compound; ++ref) {
const uint8_t *pre = &pd->pre[ref].buf[raster_block_offset(BLOCK_8X8, i,
......@@ -1585,16 +1588,12 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
coeff = BLOCK_OFFSET(p->coeff, k);
x->fwd_txm4x4(raster_block_offset_int16(BLOCK_8X8, k, p->src_diff),
coeff, 8);
vp9_regular_quantize_b_4x4(x, 4, k, get_scan_4x4(DCT_DCT),
get_iscan_4x4(DCT_DCT));
vp9_regular_quantize_b_4x4(x, 4, k, so->scan, so->iscan);
thisdistortion += vp9_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, k),
16, &ssz);
thissse += ssz;
thisrate += cost_coeffs(x, 0, k,
ta + (k & 1),
tl + (k >> 1), TX_4X4,
vp9_default_scan_4x4,
vp9_default_scan_4x4_neighbors);
thisrate += cost_coeffs(x, 0, k, ta + (k & 1), tl + (k >> 1), TX_4X4,
so->scan, so->neighbors);
rd1 = RDCOST(x->rdmult, x->rddiv, thisrate, thisdistortion >> 2);
rd2 = RDCOST(x->rdmult, x->rddiv, 0, thissse >> 2);
rd = MIN(rd1, rd2);
......
......@@ -112,11 +112,13 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize,
const int segment_id = mbmi->segment_id;
const int16_t *scan, *nb;
const scan_order *so;
vp9_coeff_count *const counts = cpi->coef_counts[tx_size];
vp9_coeff_probs_model *const coef_probs = cpi->common.fc.coef_probs[tx_size];
const int ref = is_inter_block(mbmi);
const uint8_t *const band_translate = get_band_translate(tx_size);
const int seg_eob = get_tx_eob(&cpi->common.seg, segment_id, tx_size);
int aoff, loff;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &aoff, &loff);
......@@ -124,7 +126,10 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize,
pt = get_entropy_context(tx_size, pd->above_context + aoff,
pd->left_context + loff);
get_scan(xd, tx_size, type, block, &scan, &nb);
so = get_scan(xd, tx_size, type, block);
scan = so->scan;
nb = so->neighbors;
c = 0;
do {
const int band = band_translate[c];
......
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