summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2016-02-03 20:40:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-02-03 20:40:10 +0000
commit6f49e8a186abbd5b1ec88ce481404e603396ccfd (patch)
treefeeb71436a130d5de9de91ce317338ae102f5678 /vp9/encoder
parent2231d1063c679302cea6a05df533dfe98cb90c07 (diff)
parentbcce658d3159be8435a557f26985e4d3f7b54b40 (diff)
downloadlibvpx-6f49e8a186abbd5b1ec88ce481404e603396ccfd.tar
libvpx-6f49e8a186abbd5b1ec88ce481404e603396ccfd.tar.gz
libvpx-6f49e8a186abbd5b1ec88ce481404e603396ccfd.tar.bz2
libvpx-6f49e8a186abbd5b1ec88ce481404e603396ccfd.zip
Merge "Use precise rate cost estimate for skip block mode"
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_rdopt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 3166f2740..f00a58ce2 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3355,15 +3355,19 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
}
if (!disable_skip) {
+ vpx_prob skip_prob = vp9_get_skip_prob(cm, xd);
if (skippable) {
// Back out the coefficient coding costs
rate2 -= (rate_y + rate_uv);
// Cost the skip mb case
- rate2 += vp9_cost_bit(vp9_get_skip_prob(cm, xd), 1);
+ rate2 += vp9_cost_bit(skip_prob, 1);
} else if (ref_frame != INTRA_FRAME && !xd->lossless) {
- if (RDCOST(x->rdmult, x->rddiv, rate_y + rate_uv, distortion2) <
- RDCOST(x->rdmult, x->rddiv, 0, total_sse)) {
+ if (RDCOST(x->rdmult, x->rddiv,
+ rate_y + rate_uv + vp9_cost_bit(skip_prob, 0),
+ distortion2) <
+ RDCOST(x->rdmult, x->rddiv,
+ vp9_cost_bit(skip_prob, 1), total_sse)) {
// Add in the cost of the no skip flag.
rate2 += vp9_cost_bit(vp9_get_skip_prob(cm, xd), 0);
} else {