Make rd_debug aligned to var-tx
Fix the corner case and use the right rate cost udpate for rd_debug.
This would make the var-tx pass rd_debug test.
Change-Id: Ib0fbd2d73030c0d150222c6b7c2dfffc0c6af085
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index ab4e47e..8bfb0e4 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2946,7 +2946,7 @@
for (tx_size = 0; tx_size <= max_tx_size; ++tx_size) {
av1_coeff_stats frame_branch_ct[PLANE_TYPES];
av1_coeff_probs_model frame_coef_probs[PLANE_TYPES];
- if (cpi->td.counts->tx_size_totals[tx_size] <= 20 ||
+ if (cpi->td.counts->tx_size_totals[tx_size] <= 20 || CONFIG_RD_DEBUG ||
(tx_size >= TX_16X16 && cpi->sf.tx_size_search_method == USE_TX_8X8)) {
aom_write_bit(w, 0);
} else {