Commit da6df480 authored by Jingning Han's avatar Jingning Han Committed by Angie Chiang
Browse files

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
parent 12384b15
......@@ -970,13 +970,8 @@ static INLINE TX_TYPE av1_get_tx_type(PLANE_TYPE plane_type,
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 @@ static INLINE TX_TYPE av1_get_tx_type(PLANE_TYPE plane_type,
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
......
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