Re-arrange tx_type valid check
Avoid the potential use of tx_type when txk-sel is on. No coding
stats are changed.
BUG=aomedia:1086
Change-Id: Iae1b83fee4bd55bd480ac49e5fe86377d77a9f1e
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index d4b3c1e..640f947 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -970,13 +970,8 @@
const struct macroblockd_plane *const pd = &xd->plane[plane_type];
const BLOCK_SIZE plane_bsize = get_plane_block_size(mbmi->sb_type, pd);
- // TODO(sarahparker) This assumes reduced_tx_set_used == 0. I will do a
- // follow up refactor to make the actual value of reduced_tx_set_used
- // within this function.
const TxSetType tx_set_type =
get_ext_tx_set_type(tx_size, plane_bsize, is_inter_block(mbmi), 0);
- if (is_inter_block(mbmi) && !av1_ext_tx_used[tx_set_type][mbmi->tx_type])
- return DCT_DCT;
#if CONFIG_TXK_SEL
TX_TYPE tx_type;
@@ -1001,6 +996,12 @@
return tx_type;
#endif // CONFIG_TXK_SEL
+ // TODO(sarahparker) This assumes reduced_tx_set_used == 0. I will do a
+ // follow up refactor to make the actual value of reduced_tx_set_used
+ // within this function.
+ if (is_inter_block(mbmi) && !av1_ext_tx_used[tx_set_type][mbmi->tx_type])
+ return DCT_DCT;
+
#if FIXED_TX_TYPE
return get_default_tx_type(plane_type, xd, tx_size);
#endif // FIXED_TX_TYPE