ref: ffe0f9b7fb4933a8f9137587e6a351f4f86a69e9
parent: e30781ff80d931bc113a2dcb6970b1760c1feb1e
author: Jerome Jiang <jianj@google.com>
date: Mon Jun 5 07:41:02 EDT 2017
Fix valgrind failure on uninitialized variables. BUG=webm:1440 Change-Id: I7074e42bdfa8dd25f11bbb3f2ab1b41d6f4c12e4
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -441,7 +441,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;