summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2016-07-06 12:46:48 -0700
committerJingning Han <jingning@google.com>2016-07-07 12:25:33 -0700
commit44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e (patch)
tree85e6598a44999fb6e7b2bef8cc4fa23a67c2270a /vp9/encoder
parent62aa642d71bbbdc72dc01da4fb0416be550cd2e2 (diff)
downloadlibvpx-44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e.tar
libvpx-44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e.tar.gz
libvpx-44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e.tar.bz2
libvpx-44354ee7bfa01caf97e6c0a92c4a39c474fa5a7e.zip
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
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodemb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index 4f031d045..171cc1178 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -314,17 +314,18 @@ int vp9_optimize_b(MACROBLOCK *mb, int plane, int block,
* 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;