return res;
}
-/* TODO(jkoleszar): Probably best to remove instances that require this,
- * as the data likely becomes per-plane and stored in the per-plane structures.
- * This is a stub to work with the existing code.
- */
-static INLINE int old_block_idx_4x4(MACROBLOCKD* const xd, int block_size_b,
- int plane, int i) {
- const int luma_blocks = 1 << block_size_b;
- assert(xd->plane[0].subsampling_x == 0);
- assert(xd->plane[0].subsampling_y == 0);
- assert(xd->plane[1].subsampling_x == 1);
- assert(xd->plane[1].subsampling_y == 1);
- assert(xd->plane[2].subsampling_x == 1);
- assert(xd->plane[2].subsampling_y == 1);
- return plane == 0 ? i :
- plane == 1 ? luma_blocks + i :
- luma_blocks * 5 / 4 + i;
-}
-
typedef void (*foreach_transformed_block_visitor)(int plane, int block,
BLOCK_SIZE_TYPE bsize,
int ss_txfrm_size,
int ss_txfrm_size,
void *argv) {
const struct decode_block_args* const arg = argv;
- const int bw = b_width_log2(bsize), bh = b_height_log2(bsize);
- const int old_block_idx = old_block_idx_4x4(arg->xd, bw + bh,
- plane, block);
+ const int bw = b_width_log2(bsize);
// find the maximum eob for this transform size, adjusted by segment
const int segment_id = arg->xd->mode_info_context->mbmi.segment_id;
const int aoff = (off & ((1 << mod) - 1)) << ss_tx_size;
const int loff = (off >> mod) << ss_tx_size;
- const int eob = decode_coefs(arg->pbi, arg->xd, arg->r, old_block_idx,
+ const int eob = decode_coefs(arg->pbi, arg->xd, arg->r, block,
arg->xd->plane[plane].plane_type, seg_eob,
BLOCK_OFFSET(qcoeff_base, block, 16),
ss_tx_size, arg->xd->plane[plane].dequant,
PLANE_TYPE type = plane ? PLANE_TYPE_UV : PLANE_TYPE_Y_WITH_DC;
TX_SIZE tx_size = ss_txfrm_size / 2;
int dry_run = args->dry_run;
- int ib = old_block_idx_4x4(xd, b_width_log2(bsize) + b_height_log2(bsize),
- plane, block);
MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
int pt; /* near block/prev token context index */
default:
case TX_4X4: {
tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
- get_tx_type_4x4(xd, ib) : DCT_DCT;
+ get_tx_type_4x4(xd, block) : DCT_DCT;
above_ec = A[0] != 0;
left_ec = L[0] != 0;
seg_eob = 16;
}
case TX_8X8: {
const int sz = 1 + b_width_log2(sb_type);
- const int x = ib & ((1 << sz) - 1), y = ib - x;
+ const int x = block & ((1 << sz) - 1), y = block - x;
tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_8x8(xd, y + (x >> 1)) : DCT_DCT;
above_ec = (A[0] + A[1]) != 0;
}
case TX_16X16: {
const int sz = 2 + b_width_log2(sb_type);
- const int x = ib & ((1 << sz) - 1), y = ib - x;
+ const int x = block & ((1 << sz) - 1), y = block - x;
tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_16x16(xd, y + (x >> 2)) : DCT_DCT;
above_ec = (A[0] + A[1] + A[2] + A[3]) != 0;