From 8e273b23ad68fef472f216be093c3bd561861a73 Mon Sep 17 00:00:00 2001 From: hui su Date: Tue, 22 Sep 2015 09:50:44 -0700 Subject: [PATCH] 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 --- vp10/encoder/rdopt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 3c2a1cc7b..2c23af1d3 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -698,6 +698,9 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x, 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 || -- 2.40.0