ref: 2f3cbfdde15bd54e96fa7e987f74e0f21b561e95
parent: c4e5b77d74c3865b591c112adea0409b0e6601ee
parent: 717d744a017c828e1a56ba53731917d08cff038a
author: John Koleszar <[email protected]>
date: Mon Jun 10 08:17:11 EDT 2013
Merge "Fix use of get_uv_tx_size in loopfilter" into experimental
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -562,8 +562,7 @@
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 @@
// 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;
--- a/vp9/common/vp9_loopfilter.c
+++ b/vp9/common/vp9_loopfilter.c
@@ -687,7 +687,8 @@
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,
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -395,8 +395,9 @@
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) {
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -319,7 +319,7 @@
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);
}