shithub: libvpx

Download patch

ref: e5034f65e54234d5ef6a99ddb405208c91bf812e
parent: 9c0fbd573fcb051bfa2bdcc81b00b7d475cfe131
author: Yaowu Xu <yaowu@google.com>
date: Fri Jan 24 06:34:41 EST 2014

Fixed integer overflow for large input video

The sum of squared mv components can go beyond int range for large
 input resolution. This commit changed the type to int64 to avoid
overflow.

Change-Id: Ib21ea2817845cea1435f893064e6417c79c5bc64

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -471,7 +471,7 @@
 
   int sum_mvr = 0, sum_mvc = 0;
   int sum_mvr_abs = 0, sum_mvc_abs = 0;
-  int sum_mvrs = 0, sum_mvcs = 0;
+  int64_t sum_mvrs = 0, sum_mvcs = 0;
   int mvcount = 0;
   int intercount = 0;
   int second_ref_count = 0;
--