Merge "Make cpi->speed always positive"
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 84a0e60..69372bd 100644
--- 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.
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index dfe39e8..a3e879b 100644
--- 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;