Commit 2e08d96d authored by Sarah Parker's avatar Sarah Parker
Browse files

Add macros to turn off inter and intra mrc_dct separately

This will aid in testing different masking methods for inter
and intra blocks.

Change-Id: Ic038da77e55405e3303177e6cd260bd5e19311c1
parent bd57abe0
......@@ -28,11 +28,11 @@ typedef struct txfm_param {
int lossless;
int bd;
#if CONFIG_MRC_TX || CONFIG_LGT
int is_inter;
int stride;
uint8_t *dst;
#endif // CONFIG_MRC_TX || CONFIG_LGT
#if CONFIG_LGT
int is_inter;
int mode;
#endif
// for inverse transforms only
......
......@@ -818,6 +818,11 @@ static INLINE int supertx_enabled(const MB_MODE_INFO *mbmi) {
static INLINE int is_rect_tx(TX_SIZE tx_size) { return tx_size >= TX_SIZES; }
#endif // CONFIG_RECT_TX
#if CONFIG_MRC_TX
#define USE_MRC_INTRA 0
#define USE_MRC_INTER 1
#endif // CONFIG_MRC_TX
#if CONFIG_EXT_TX
#define ALLOW_INTRA_EXT_TX 1
......@@ -906,8 +911,12 @@ static INLINE TxSetType get_ext_tx_set_type(TX_SIZE tx_size, BLOCK_SIZE bs,
if (use_reduced_set)
return is_inter ? EXT_TX_SET_DCT_IDTX : EXT_TX_SET_DTT4_IDTX;
#if CONFIG_MRC_TX
if (tx_size == TX_32X32)
return is_inter ? EXT_TX_SET_MRC_DCT_IDTX : EXT_TX_SET_MRC_DCT;
if (tx_size == TX_32X32) {
if (is_inter && USE_MRC_INTER)
return EXT_TX_SET_MRC_DCT_IDTX;
else if (!is_inter && USE_MRC_INTRA)
return EXT_TX_SET_MRC_DCT;
}
#endif // CONFIG_MRC_TX
if (tx_size_sqr_up == TX_32X32)
return is_inter ? EXT_TX_SET_DCT_IDTX : EXT_TX_SET_DCTONLY;
......@@ -1275,6 +1284,9 @@ static INLINE TX_TYPE av1_get_tx_type(PLANE_TYPE plane_type,
#if CONFIG_EXT_TX
#if CONFIG_MRC_TX
if (mbmi->tx_type == MRC_DCT) {
assert(((is_inter_block(mbmi) && USE_MRC_INTER) ||
(!is_inter_block(mbmi) && USE_MRC_INTRA)) &&
"INVALID BLOCK TYPE FOR MRC_DCT");
if (plane_type == PLANE_TYPE_Y) {
assert(tx_size == TX_32X32);
return mbmi->tx_type;
......
......@@ -2237,6 +2237,7 @@ void av1_inverse_transform_block(const MACROBLOCKD *xd,
#if CONFIG_LGT || CONFIG_MRC_TX
txfm_param.dst = dst;
txfm_param.stride = stride;
txfm_param.is_inter = is_inter_block(&xd->mi[0]->mbmi);
#endif // CONFIG_LGT || CONFIG_MRC_TX
#if CONFIG_LGT
txfm_param.mode = mode;
......
......@@ -628,11 +628,11 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
txfm_param.tx_size = tx_size;
txfm_param.lossless = xd->lossless[mbmi->segment_id];
#if CONFIG_MRC_TX || CONFIG_LGT
txfm_param.is_inter = is_inter_block(mbmi);
txfm_param.dst = dst;
txfm_param.stride = dst_stride;
#endif // CONFIG_MRC_TX || CONFIG_LGT
#if CONFIG_LGT
txfm_param.is_inter = is_inter_block(mbmi);
txfm_param.mode = get_prediction_mode(xd->mi[0], plane, tx_size, block);
#endif
......
......@@ -2451,7 +2451,10 @@ static int skip_txfm_search(const AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs,
#if CONFIG_MRC_TX
// MRC_DCT only implemented for TX_32X32 so only include this tx in
// the search for TX_32X32
if (tx_type == MRC_DCT && tx_size != TX_32X32) return 1;
if (tx_type == MRC_DCT &&
((is_inter && !USE_MRC_INTER) || (!is_inter && !USE_MRC_INTRA) ||
tx_size != TX_32X32))
return 1;
#endif // CONFIG_MRC_TX
if (mbmi->ref_mv_idx > 0 && tx_type != DCT_DCT) return 1;
if (FIXED_TX_TYPE && tx_type != get_default_tx_type(0, xd, 0, tx_size))
......@@ -5224,7 +5227,10 @@ static void select_tx_type_yrd(const AV1_COMP *cpi, MACROBLOCK *x,
#if CONFIG_MRC_TX
// MRC_DCT only implemented for TX_32X32 so only include this tx in
// the search for TX_32X32
if (tx_type == MRC_DCT && max_tx_size != TX_32X32) continue;
if (tx_type == MRC_DCT &&
(max_tx_size != TX_32X32 || (is_inter && !USE_MRC_INTER) ||
(!is_inter && !USE_MRC_INTRA)))
continue;
#endif // CONFIG_MRC_TX
#if CONFIG_EXT_TX
if (is_inter) {
......
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