]> granicus.if.org Git - libvpx/commitdiff
Re-use switchable rate value in handle_inter_mode
authorJingning Han <jingning@google.com>
Tue, 26 Aug 2014 23:06:28 +0000 (16:06 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Wed, 27 Aug 2014 22:03:16 +0000 (15:03 -0700)
The value of switchable rate has been stored in a local variable.
This change skips the second call to vp9_get_switchable_rate() by
reusing the local variable.

Change-Id: Ib7d3fef7621cc4bde94c6d6e6b3a71f1fd4559f2

vp9/encoder/vp9_rdopt.c

index 053dbbbd05b1b1cffcde70e1879153f7ca5c403b..3a34e6feb118dfdff371607b0b908abc8615e29a 100644 (file)
@@ -2366,7 +2366,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   }
 
   if (cm->interp_filter == SWITCHABLE)
-    *rate2 += vp9_get_switchable_rate(cpi);
+    *rate2 += rs;
 
   if (!is_comp_pred) {
     if (cpi->allow_encode_breakout)