void vp9_setup_block_dptrs(MACROBLOCKD *xd,
int subsampling_x, int subsampling_y);
-static TX_SIZE get_uv_tx_size(const MACROBLOCKD *xd) {
- MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
+static TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) {
const TX_SIZE size = mbmi->txfm_size;
switch (mbmi->sb_type) {
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
// transform size varies per plane, look it up in a common way.
- const TX_SIZE tx_size =
- plane ? get_uv_tx_size(xd) : xd->mode_info_context->mbmi.txfm_size;
+ const MB_MODE_INFO* mbmi = &xd->mode_info_context->mbmi;
+ const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi)
+ : mbmi->txfm_size;
const int block_size_b = bw + bh;
const int txfrm_size_b = tx_size * 2;
const int block_edge_above = b_height_log2(mi[c].mbmi.sb_type) ?
!(r & ((1 << (b_height_log2(mi[c].mbmi.sb_type)-1)) - 1)) : 1;
const int skip_this_r = skip_this && !block_edge_above;
- const TX_SIZE tx_size = plane ? get_uv_tx_size(xd) : mi[c].mbmi.txfm_size;
+ const TX_SIZE tx_size = plane ? get_uv_tx_size(&mi[c].mbmi)
+ : mi[c].mbmi.txfm_size;
// Filter level can vary per MI
if (!build_lfi(cm, &mi[c].mbmi,
const struct macroblockd_plane* const plane = &xd->plane[p];
const int bwl = b_width_log2(bsize) - plane->subsampling_x;
const int bhl = b_height_log2(bsize) - plane->subsampling_y;
- const TX_SIZE tx_size = p ? get_uv_tx_size(xd)
- : xd->mode_info_context->mbmi.txfm_size;
+ const MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
+ const TX_SIZE tx_size = p ? get_uv_tx_size(mbmi)
+ : mbmi->txfm_size;
int i, j;
for (i = 0; i < 1 << bwl; i += 1 << tx_size) {
if (type == PLANE_TYPE_Y_WITH_DC) {
assert(xd->mode_info_context->mbmi.txfm_size == tx_size);
} else {
- TX_SIZE tx_size_uv = get_uv_tx_size(xd);
+ TX_SIZE tx_size_uv = get_uv_tx_size(mbmi);
assert(tx_size == tx_size_uv);
}