]> granicus.if.org Git - libvpx/commitdiff
Properly reset rate and distortion value for zero pred residual case
authorJingning Han <jingning@google.com>
Fri, 8 Jul 2016 05:41:56 +0000 (22:41 -0700)
committerJingning Han <jingning@google.com>
Fri, 8 Jul 2016 16:09:18 +0000 (09:09 -0700)
When the prediction residuals are all zero, reset the coeff rate
cost and the distortion value to be zero. This change doesn't affect
lowres set significantly, but improves several clips in the midres
set, like sintel_480p and mobisode2_480p, by a few percents. The
average performance for midres set is improved by 0.2%.

Change-Id: Idd5ebf2652e556a1b1c569fe3c48dacef3f11c32

vp10/encoder/rdopt.c

index 7cc65e65ed0f6f6ee010a686d07598ac6876b388..304816eaf0323b0269e8845358ecbeef862a2bda 100644 (file)
@@ -7899,6 +7899,10 @@ static int64_t handle_inter_mode(VP10_COMP *cpi, MACROBLOCK *x,
       *rate2 += vp10_cost_bit(vp10_get_skip_prob(cm, xd), 1);
 
       *distortion = skip_sse_sb;
+      *psse = skip_sse_sb;
+      *rate_y = 0;
+      *rate_uv = 0;
+      *skippable = 1;
     }
 
 #if CONFIG_OBMC || CONFIG_WARPED_MOTION