A bug fix for var-tx
Fixes a crash with supertx, ext-tx and rect-tx
Change-Id: I6b5f4cfd6e209558541a791be685b55156aa0138
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 2966e77..5e3f285 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -3321,7 +3321,7 @@
TX_TYPE tx_type, best_tx_type = DCT_DCT;
const int is_inter = is_inter_block(mbmi);
TX_SIZE best_tx_size[MAX_MIB_SIZE][MAX_MIB_SIZE];
- TX_SIZE best_tx = TX_SIZES;
+ TX_SIZE best_tx = max_txsize_lookup[bsize];
uint8_t best_blk_skip[MAX_MIB_SIZE * MAX_MIB_SIZE * 4];
const int n4 = 1 << (num_pels_log2_lookup[bsize] - 4);
int idx, idy;
@@ -7707,6 +7707,7 @@
} else {
x->skip = 1;
*disable_skip = 1;
+ mbmi->tx_size = tx_size_from_tx_mode(bsize, cm->tx_mode, 1);
// The cost of skip bit needs to be added.
#if CONFIG_OBMC || CONFIG_WARPED_MOTION