shithub: libvpx

Download patch

ref: 968a5d6bc2c54c8ec8e01572009abfe0a1f3b5c1
parent: 4753c2398307b12066f3505bcb7db19c720f4a22
parent: ffe0f9b7fb4933a8f9137587e6a351f4f86a69e9
author: Jerome Jiang <[email protected]>
date: Mon Jun 5 23:47:30 EDT 2017

Merge "Fix valgrind failure on uninitialized variables."

--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -444,7 +444,7 @@
       cost_list[2] != INT_MAX && cost_list[3] != INT_MAX &&
       cost_list[4] != INT_MAX && is_cost_list_wellbehaved(cost_list)) {
     int ir, ic;
-    unsigned int minpt;
+    unsigned int minpt = INT_MAX;
     get_cost_surf_min(cost_list, &ir, &ic, 2);
     if (ir != 0 || ic != 0) {
       CHECK_BETTER(minpt, tr + 2 * ir, tc + 2 * ic);
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1758,7 +1758,7 @@
           cpi->oxcf.rc_mode == VPX_CBR) {
         int tmp_sad;
         uint32_t dis;
-        int cost_list[5];
+        int cost_list[5] = { INT_MAX };
 
         if (bsize < BLOCK_16X16) continue;