From cf50989eb3d780374e5e5bafb8331db86abc03bc Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Sat, 15 Apr 2017 16:09:12 -0700 Subject: [PATCH] Fix rd bug in av1_search_txk_type Change-Id: I585999b1709303dee8d1c7bf626b5cd0ef36341c --- av1/encoder/encodetxb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c index 68ac8bd9d..9e4789cd5 100644 --- a/av1/encoder/encodetxb.c +++ b/av1/encoder/encodetxb.c @@ -751,7 +751,8 @@ int64_t av1_search_txk_type(const AV1_COMP *cpi, MACROBLOCK *x, int plane, get_scan(cm, tx_size, tx_type, is_inter_block(mbmi)); this_rd_stats.rate = av1_cost_coeffs( cpi, x, plane, block, tx_size, scan_order, a, l, use_fast_coef_costing); - int rd = RDCOST(x->rdmult, x->rddiv, 0, this_rd_stats.dist); + int rd = + RDCOST(x->rdmult, x->rddiv, this_rd_stats.rate, this_rd_stats.dist); if (rd < best_rd) { best_rd = rd; *rd_stats = this_rd_stats;