Commit 717d744a authored by John Koleszar's avatar John Koleszar

Fix use of get_uv_tx_size in loopfilter

Change the argument of get_uv_tx_size() to be an MBMI pointer, so that the
correct column's MBMI can be passed to the function.

Change-Id: Ied6b8ec33b77cdd353119e8fd2d157811815fc98
parent de6ec27d
......@@ -562,8 +562,7 @@ static TX_TYPE get_tx_type_16x16(const MACROBLOCKD *xd, int ib) {
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) {
......@@ -639,8 +638,9 @@ static INLINE void foreach_transformed_block_in_plane(
// 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;
......
......@@ -687,7 +687,8 @@ static void filter_block_plane(VP9_COMMON *cm, MACROBLOCKD *xd,
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,
......
......@@ -395,8 +395,9 @@ void vp9_optimize_init(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
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) {
......
......@@ -319,7 +319,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
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);
}
......
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