summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2013-08-30 15:19:49 -0700
committerYunqing Wang <yunqingwang@google.com>2013-08-30 15:25:13 -0700
commit0ca7855f67a3a084b0f8de45cec14f8467619c71 (patch)
tree7cf908c974e94878ae96d531c19799815f44bee6 /vp9
parent2b9baca4f00a417eef615aedcaec1e6befdbeb1c (diff)
downloadlibvpx-0ca7855f67a3a084b0f8de45cec14f8467619c71.tar
libvpx-0ca7855f67a3a084b0f8de45cec14f8467619c71.tar.gz
libvpx-0ca7855f67a3a084b0f8de45cec14f8467619c71.tar.bz2
libvpx-0ca7855f67a3a084b0f8de45cec14f8467619c71.zip
Use correct bit cost while static-thresh is on
While static-thresh is on, we only need to transmit skip flag if skip = 1. The cost of skip bit is added to the total rate cost. Change-Id: I64e73e482bc297eba22907026298a15fa8cc3920
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_rdopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 39b6544f6..647265bf6 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2916,8 +2916,8 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
(sse_v - var_v < thresh_dc || sse_v == var_v)) {
x->skip = 1;
- *rate2 = 500;
- *rate_uv = 0;
+ // The cost of skip bit needs to be added.
+ *rate2 += vp9_cost_bit(vp9_get_pred_prob_mbskip(cm, xd), 1);
// Scaling factor for SSE from spatial domain to frequency domain
// is 16. Adjust distortion accordingly.