ref: 2d70e16595e73f577d46906a98c7591f0d5aa026
parent: 46c71e5eba67f4a98eba275e99cbeb9a40cb0a54
parent: e993fb5e24123bd988e370ee0a0be567f6d73623
author: Yaowu Xu <yaowu@google.com>
date: Fri Mar 21 07:13:43 EDT 2014
Merge "Fix a valgrind error"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2699,8 +2699,8 @@
const int mis = cm->mode_info_stride;
PARTITION_TYPE partition;
BLOCK_SIZE subsize;
- int rate;
- int64_t dist;
+ int rate = INT_MAX;
+ int64_t dist = INT64_MAX;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
@@ -2747,7 +2747,6 @@
break;
case PARTITION_SPLIT:
subsize = get_subsize(bsize, PARTITION_SPLIT);
-
*get_sb_index(x, subsize) = 0;
nonrd_use_partition(cpi, tile, mi_8x8, tp, mi_row, mi_col,
subsize, output_enabled, totrate, totdist);
@@ -2804,8 +2803,8 @@
// Code each SB in the row
for (mi_col = tile->mi_col_start; mi_col < tile->mi_col_end;
mi_col += MI_BLOCK_SIZE) {
- int dummy_rate;
- int64_t dummy_dist;
+ int dummy_rate = 0;
+ int64_t dummy_dist = 0;
const int idx_str = cm->mode_info_stride * mi_row + mi_col;
MODE_INFO **mi_8x8 = cm->mi_grid_visible + idx_str;
MODE_INFO **prev_mi_8x8 = cm->prev_mi_grid_visible + idx_str;
@@ -2822,8 +2821,8 @@
else if (cpi->sf.partition_search_type == REFERENCE_PARTITION) {
if (cpi->sf.partition_check) {
MACROBLOCK *x = &cpi->mb;
- int rate1, rate2, rate3;
- int64_t dist1, dist2, dist3;
+ int rate1 = 0, rate2 = 0, rate3 = 0;
+ int64_t dist1 = 0, dist2 = 0, dist3 = 0;
set_fixed_partitioning(cpi, tile, mi_8x8, mi_row, mi_col, BLOCK_8X8);
nonrd_use_partition(cpi, tile, mi_8x8, tp, mi_row, mi_col, BLOCK_64X64,
0, &rate1, &dist1);
--
⑨