ref: bbca74d4129ce13be9c9dd10fbe6ab96ca63240a
parent: 36b998f2eb5ba0870ea36d3929be1f5f5f729d15
author: Jingning Han <jingning@google.com>
date: Tue May 15 09:04:49 EDT 2018
Use the updated best rd cost for transform block search The compression performance change is +/-0.01% for both speed 0/1. Locally tested the encoding speed: ped_1080p 150 frames speed 0 79544 b/f 41.339 dB 503072 ms -> 79566 b/f 41.338 dB 493009 ms. speed 1 79789 b/f 41.152 dB 104583 ms -> 79770 b/f 41.153 dB 102607 ms Change-Id: Ief200b613608643e5708cebe979982eb4a84831b
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -847,7 +847,7 @@
{ INT64_MAX, INT64_MAX } };
int n;
int s0, s1;
- int64_t best_rd = INT64_MAX;
+ int64_t best_rd = ref_best_rd;
TX_SIZE best_tx = max_tx_size;
int start_tx, end_tx;
const int tx_size_ctx = get_tx_size_context(xd);
@@ -868,8 +868,8 @@
for (n = start_tx; n >= end_tx; n--) {
const int r_tx_size = cpi->tx_size_cost[max_tx_size - 1][tx_size_ctx][n];
- txfm_rd_in_plane(cpi, x, &r[n][0], &d[n], &s[n], &sse[n], ref_best_rd, 0,
- bs, n, cpi->sf.use_fast_coef_costing);
+ txfm_rd_in_plane(cpi, x, &r[n][0], &d[n], &s[n], &sse[n], best_rd, 0, bs, n,
+ cpi->sf.use_fast_coef_costing);
r[n][1] = r[n][0];
if (r[n][0] < INT_MAX) {
r[n][1] += r_tx_size;