shithub: libvpx

Download patch

ref: c5fae00227ca6f991953674f5393ec2df3175170
parent: 5a9f21db548f1a3d9b31dfc4f758a0af83bab725
parent: 754eb9510559d3bf44183d0ef33c7191d54c3a57
author: Yaowu Xu <[email protected]>
date: Fri Jun 17 15:29:19 EDT 2016

Merge "Fix ubsan warnings: vp9/encoder/vp9_encoder.c"

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2253,7 +2253,7 @@
 static void encoder_highbd_variance64(const uint8_t *a8, int  a_stride,
                                       const uint8_t *b8, int  b_stride,
                                       int w, int h, uint64_t *sse,
-                                      uint64_t *sum) {
+                                      int64_t *sum) {
   int i, j;
 
   uint16_t *a = CONVERT_TO_SHORTPTR(a8);
@@ -2277,7 +2277,7 @@
                                       int w, int h,
                                       unsigned int *sse, int *sum) {
   uint64_t sse_long = 0;
-  uint64_t sum_long = 0;
+  int64_t sum_long = 0;
   encoder_highbd_variance64(a8, a_stride, b8, b_stride, w, h,
                             &sse_long, &sum_long);
   *sse = (unsigned int)sse_long;