shithub: libvpx

Download patch

ref: 92145006c3c6163720d8f2a63223557b511f8cd3
parent: 33a9394eb1db0f2f537bf4e94533cb9deef93e94
parent: efe1982e63b73680ac0190ccd5e747e1992a4394
author: Paul Wilkins <paulwilkins@google.com>
date: Thu Jun 22 12:30:39 EDT 2017

Merge "Fix int overflow in rate control for high bit rates."

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -209,7 +209,7 @@
   const int bpm =
       (int)(vp9_rc_bits_per_mb(frame_type, q, correction_factor, bit_depth));
   return VPXMAX(FRAME_OVERHEAD_BITS,
-                (int)((uint64_t)bpm * mbs) >> BPER_MB_NORMBITS);
+                (int)(((uint64_t)bpm * mbs) >> BPER_MB_NORMBITS));
 }
 
 int vp9_rc_clamp_pframe_target_size(const VP9_COMP *const cpi, int target) {