Prefer using get_tx_size()
Change-Id: Ifcdd3ce2953c1ecb1d0962da412a4b5ba2cda912
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 7a9f04d..d218eb0 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2219,8 +2219,7 @@
}
#endif // CONFIG_RD_DEBUG
} else {
- TX_SIZE tx = plane ? get_uv_tx_size(&m->mbmi, &xd->plane[plane])
- : m->mbmi.tx_size;
+ TX_SIZE tx = get_tx_size(plane, xd);
const int bkw = tx_size_wide_unit[tx];
const int bkh = tx_size_high_unit[tx];
#if CONFIG_PALETTE && CONFIG_PALETTE_THROUGHPUT
@@ -2252,8 +2251,7 @@
}
}
#else
- TX_SIZE tx =
- plane ? get_uv_tx_size(&m->mbmi, &xd->plane[plane]) : m->mbmi.tx_size;
+ TX_SIZE tx = get_tx_size(plane, xd);
TOKEN_STATS token_stats;
#if CONFIG_PALETTE && CONFIG_PALETTE_THROUGHPUT
const struct macroblockd_plane *const pd = &xd->plane[plane];
@@ -2319,8 +2317,7 @@
if (!m->mbmi.skip) {
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
PVQ_INFO *pvq;
- TX_SIZE tx_size =
- plane ? get_uv_tx_size(&m->mbmi, &xd->plane[plane]) : m->mbmi.tx_size;
+ TX_SIZE tx_size = get_tx_size(plane, xd);
int idx, idy;
const struct macroblockd_plane *const pd = &xd->plane[plane];
int max_blocks_wide;
@@ -2731,8 +2728,7 @@
const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
int row, col;
- TX_SIZE tx =
- plane ? get_uv_tx_size(mbmi, &xd->plane[plane]) : mbmi->tx_size;
+ TX_SIZE tx = get_tx_size(plane, xd);
BLOCK_SIZE txb_size = txsize_to_bsize[tx];
const int stepr = tx_size_high_unit[txb_size];