Drop repeated tx size search from intra mode txfm RD
When the coding block size is below 16x16, the current tx size
search loop may end up searching 4x4 transform size multiple times.
This commit skips the redundant search steps. Tested a a few
1080p clips at 4 Mbps, the encoding speed is up by 10% for key
frame coding, and 3% for overall.
Change-Id: Ifbb27bad1ec55ef0011b1e789d995f36b3f4605e
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 07fe17a..d40053a 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2498,6 +2498,7 @@
if (mbmi->sb_type < BLOCK_8X8 && is_inter) break;
#endif // !USE_TXTYPE_SEARCH_FOR_SUB8X8_IN_CB4X4
}
+ if (n == TX_4X4) break;
}
mbmi->tx_size = best_tx_size;
mbmi->tx_type = best_tx_type;