shithub: libvpx

Download patch

ref: bd8a6a93aa17b5b366e94cbd7cbb7752dbd5b58e
parent: e59c053e3c6f493908cca51209dc732ef892b07a
parent: 6dbb9e4d4478f44fb3d30a098c217763fdfdb8cd
author: Paul Wilkins <[email protected]>
date: Mon Oct 13 22:40:12 EDT 2014

Merge "Clamp rate error estimate."

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2478,6 +2478,7 @@
   if (rc->total_actual_bits) {
     rc->rate_error_estimate =
       (int)((rc->vbr_bits_off_target * 100) / rc->total_actual_bits);
+    rc->rate_error_estimate = clamp(rc->rate_error_estimate, -100, 100);
   } else {
     rc->rate_error_estimate = 0;
   }