shithub: libvpx

Download patch

ref: 0876302e4e2b1d83bacdf0395c50ee118cfafef3
parent: 5306eda9daf6ef3e26e63f3843780b1ed3626215
parent: 56835f1bdd0737be67b7b86d472af51aa969d758
author: Deb Mukherjee <debargha@google.com>
date: Fri Feb 14 10:53:30 EST 2014

Merge "Make cpi->speed always positive"

--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1496,7 +1496,7 @@
     update_layer_context_change_config(cpi, cpi->oxcf.target_bandwidth);
   }
 
-  cpi->speed = cpi->oxcf.cpu_used;
+  cpi->speed = abs(cpi->oxcf.cpu_used);
 
   if (cpi->oxcf.lag_in_frames == 0) {
     // Force allow_lag to 0 if lag_in_frames is 0.
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -447,7 +447,7 @@
       x->pred_sse[ref] = sse;
 
     // Fast approximate the modelling function.
-    if (cpi->oxcf.cpu_used < -4) {
+    if (cpi->speed > 4) {
       int rate;
       int64_t dist;
       int64_t square_error = sse;
--