ref: 44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e
parent: 62aa642d71bbbdc72dc01da4fb0416be550cd2e2
author: Jingning Han <[email protected]>
date: Wed Jul 6 08:46:48 EDT 2016
Use precise context to estimate coeff rate cost Use the precise context to estimate the zero token cost in trellis optimization process. This improves the speed 0 coding performance by 0.15% for lowres and 0.1% for midres. It improves the speed 1 coding performance by 0.2% for midres and hdres. Change-Id: I59c7c08702fc79dc4f8534b64ca594da909e2c91
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -314,17 +314,18 @@
* add a new trellis node, but we do need to update the costs.
*/
band = band_translate[i + 1];
+ pt = get_coef_context(nb, token_cache, i + 1);
t0 = tokens[next][0].token;
t1 = tokens[next][1].token;
/* Update the cost of each path if we're past the EOB token. */
if (t0 != EOB_TOKEN) {
tokens[next][0].rate +=
- mb->token_costs[tx_size][type][ref][band][1][0][t0];
+ mb->token_costs[tx_size][type][ref][band][1][pt][t0];
tokens[next][0].token = ZERO_TOKEN;
}
if (t1 != EOB_TOKEN) {
tokens[next][1].rate +=
- mb->token_costs[tx_size][type][ref][band][1][0][t1];
+ mb->token_costs[tx_size][type][ref][band][1][pt][t1];
tokens[next][1].token = ZERO_TOKEN;
}
best_index[i][0] = best_index[i][1] = 0;