Skip unnecessary computation in search_txk_type()
No need to reconstruct a intra tx block if it's the last one in the
macroblock.
On speed 1, improve keyframe encoding speed by 15%; overall encoding
by 2.5%.
Change-Id: Ie109c2e0be59b918c226b24c7ded6cf8e1ee06e0
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 0709a44..9ebf0e2 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2044,7 +2044,9 @@
}
RECON_INTRA:
- if (!is_inter && best_eob) {
+ if (!is_inter && best_eob &&
+ (blk_row + tx_size_high_unit[tx_size] < mi_size_high[plane_bsize] ||
+ blk_col + tx_size_wide_unit[tx_size] < mi_size_wide[plane_bsize])) {
// intra mode needs decoded result such that the next transform block
// can use it for prediction.
if (cpi->sf.optimize_coefficients != FULL_TRELLIS_OPT) {