Adjust rd calculation in choose_tx_size_from_rd

Consider tha case in which skipping transform coefficients is more
efficient.

derflr +0.13%
hevclr +0.11%
hevcmr +0.14%
hevchr +0.22%

with ext-tx, the impact is -0.02%.

Change-Id: I0aa2965cf9e152396623c2fee62545bd3a3a7f07
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c
index 3c2a1cc..2c23af1 100644
--- a/vp10/encoder/rdopt.c
+++ b/vp10/encoder/rdopt.c
@@ -698,6 +698,9 @@
       rd = RDCOST(x->rdmult, x->rddiv, r + s0, d);
     }
 
+    if (is_inter_block(mbmi) && !xd->lossless && !s)
+      rd = VPXMIN(rd, RDCOST(x->rdmult, x->rddiv, s1, sse));
+
     // Early termination in transform size search.
     if (cpi->sf.tx_size_search_breakout &&
         (rd== INT64_MAX ||