static int rdcost_plane(VP9_COMMON * const cm, MACROBLOCK *x, int plane,
BLOCK_SIZE_TYPE bsize, TX_SIZE tx_size) {
MACROBLOCKD * const xd = &x->e_mbd;
- const int bwl = b_width_log2(bsize) - xd->plane[plane].subsampling_x;
- const int bhl = b_height_log2(bsize) - xd->plane[plane].subsampling_y;
+ const int bwl = plane_block_width_log2by4(bsize, &xd->plane[plane]);
+ const int bhl = plane_block_height_log2by4(bsize, &xd->plane[plane]);
const int bw = 1 << bwl, bh = 1 << bhl;
+ int i;
struct rdcost_block_args args = { cm, x, { 0 }, { 0 }, tx_size, bw, bh,
0, 0, 0, INT64_MAX, 0 };
BLOCK_SIZE_TYPE bsize, TX_SIZE tx_size) {
MACROBLOCKD *const xd = &x->e_mbd;
struct macroblockd_plane *const pd = &xd->plane[0];
- const int bwl = b_width_log2(bsize) - xd->plane[0].subsampling_x;
- const int bhl = b_height_log2(bsize) - xd->plane[0].subsampling_y;
+ const int bwl = plane_block_width_log2by4(bsize, pd);
+ const int bhl = plane_block_height_log2by4(bsize, pd);
const int bw = 1 << bwl, bh = 1 << bhl;
+ int i;
struct rdcost_block_args args = { cm, x, { 0 }, { 0 }, tx_size, bw, bh,
0, 0, 0, ref_best_rd, 0 };
xd->mode_info_context->mbmi.txfm_size = tx_size;
vpx_memcpy(tempa, ta, sizeof(ta));
vpx_memcpy(templ, tl, sizeof(tl));
- for (idy = 0; idy < bh; ++idy) {
- for (idx = 0; idx < bw; ++idx) {
+ 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;
block = ib + idy * 2 + idx;
xd->mode_info_context->bmi[block].as_mode = mode;