shithub: libvpx

Download patch

ref: 519b2e48a814e13a24177b1afd264edba7a86ef5
parent: 91aa1fae2a88e0a125161dc1ec3f8f73c3508707
author: hui su <huisu@google.com>
date: Mon Jan 23 06:25:31 EST 2017

Fix an overflow warning in optimize_b()

BUG=webm:1361

Change-Id: Ib840bf3b39f7b3c8c017d3488a83434e9a0f45f5

--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -102,7 +102,7 @@
   const int16_t *const nb = so->neighbors;
   const int dq_step[2] = { dequant_ptr[0] >> shift, dequant_ptr[1] >> shift };
   int next = eob, sz = 0;
-  const int64_t rdmult = (mb->rdmult * plane_rd_mult[ref][type]) >> 1;
+  const int64_t rdmult = ((int64_t)mb->rdmult * plane_rd_mult[ref][type]) >> 1;
   const int64_t rddiv = mb->rddiv;
   int64_t rd_cost0, rd_cost1;
   int rate0, rate1;