Adds macro to test cb4x4 w/o sub8x8 txtype search

USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4 macro added to turn
tx_type search on/off for sub8x8 in cb4x4 mode.

The purpose is mainly to analyze the coding gains from cb4x4
but this later can be made into a speed feature as well.

Change-Id: Ic22026c373eebba87f324689ac5686a2844315b6
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index dad002b..3f72609 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -635,11 +635,12 @@
   0, 3, -1, -1, 2, 1
 };
 
+#define USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4 1
 static INLINE TxSetType get_ext_tx_set_type(TX_SIZE tx_size, BLOCK_SIZE bs,
                                             int is_inter, int use_reduced_set) {
   const TX_SIZE tx_size2 = txsize_sqr_up_map[tx_size];
   tx_size = txsize_sqr_map[tx_size];
-#if CONFIG_CB4X4
+#if CONFIG_CB4X4 && USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4
   (void)bs;
   if (tx_size > TX_32X32) return EXT_TX_SET_DCTONLY;
 #else
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 42d906d..d9e1b27 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2185,7 +2185,6 @@
 #if CONFIG_PVQ
   od_encode_checkpoint(&x->daala_enc, &buf);
 #endif
-
   for (tx_type = DCT_DCT; tx_type < TX_TYPES; ++tx_type) {
     RD_STATS this_rd_stats;
 #if CONFIG_REF_MV
@@ -2203,6 +2202,9 @@
       best_tx_type = tx_type;
       best_tx = mbmi->tx_size;
     }
+#if CONFIG_CB4X4 && !USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4
+    if (mbmi->sb_type < BLOCK_8X8 && is_inter) break;
+#endif  // USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4
   }
 
   mbmi->tx_size = best_tx;