diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 6ba2a4fc9558241bd54a344058983711bc525650..8eab71c2651afa4a500ef552519d3c39eb61e443 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -1580,7 +1580,7 @@ void define_fixed_arf_period(VP9_COMP *cpi) { // Analyse and define a gf/arf group. static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { - FIRSTPASS_STATS next_frame; + FIRSTPASS_STATS next_frame = { 0 }; FIRSTPASS_STATS *start_pos; int i; double boost_score = 0.0; @@ -1616,8 +1616,6 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { start_pos = cpi->twopass.stats_in; - vpx_memset(&next_frame, 0, sizeof(next_frame)); // assure clean - // Load stats for the current frame. mod_frame_err = calculate_modified_err(cpi, this_frame); diff --git a/vp9/encoder/vp9_mbgraph.c b/vp9/encoder/vp9_mbgraph.c index 57fa0106ed820e40081954de862a9f09f61d288a..1baea643d8c584ab8ddf5ed2cf9789090263ddd6 100644 --- a/vp9/encoder/vp9_mbgraph.c +++ b/vp9/encoder/vp9_mbgraph.c @@ -241,9 +241,7 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, int mb_col, mb_row, offset = 0; int mb_y_offset = 0, arf_y_offset = 0, gld_y_offset = 0; int_mv arf_top_mv, gld_top_mv; - MODE_INFO mi_local; - - vp9_zero(mi_local); + MODE_INFO mi_local = { { 0 } }; // Set up limit values for motion vectors to prevent them extending outside the UMV borders arf_top_mv.as_int = 0; @@ -309,7 +307,7 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, static void separate_arf_mbs(VP9_COMP *cpi) { VP9_COMMON *const cm = &cpi->common; int mb_col, mb_row, offset, i; - int ncnt[4]; + int ncnt[4] = { 0 }; int n_frames = cpi->mbgraph_n_frames; int *arf_not_zz; @@ -345,7 +343,6 @@ static void separate_arf_mbs(VP9_COMP *cpi) { } } - vpx_memset(ncnt, 0, sizeof(ncnt)); for (offset = 0, mb_row = 0; mb_row < cm->mb_rows; offset += cm->mb_cols, mb_row++) { for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) { diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index b2fe0092532be9824ff697b091af13470067d682..e0ff090e19151a360490c8b27214c7de35898919 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3142,7 +3142,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x, int comp_pred, i; int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES]; struct buf_2d yv12_mb[4][MAX_MB_PLANE]; - int_mv single_newmv[MAX_REF_FRAMES]; + int_mv single_newmv[MAX_REF_FRAMES] = { { 0 } }; static const int flag_list[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG, VP9_ALT_FLAG }; int idx_list[4] = {0, @@ -3157,7 +3157,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x, int64_t best_pred_rd[NB_PREDICTION_TYPES]; int64_t best_filter_rd[VP9_SWITCHABLE_FILTERS + 1]; int64_t best_filter_diff[VP9_SWITCHABLE_FILTERS + 1]; - MB_MODE_INFO best_mbmode; + MB_MODE_INFO best_mbmode = { 0 }; int j; int mode_index, best_mode_index = 0; unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES]; @@ -3202,8 +3202,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x, estimate_ref_frame_costs(cpi, segment_id, ref_costs_single, ref_costs_comp, &comp_mode_p); - vpx_memset(&best_mbmode, 0, sizeof(best_mbmode)); - vpx_memset(&single_newmv, 0, sizeof(single_newmv)); for (i = 0; i < NB_PREDICTION_TYPES; ++i) best_pred_rd[i] = INT64_MAX; diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c index 9564edc849dec0d516aae108fff90ff4b2a3b971..3db91cacaf5ba9778216283a9769e4ff7ee6a99c 100644 --- a/vp9/encoder/vp9_segmentation.c +++ b/vp9/encoder/vp9_segmentation.c @@ -217,9 +217,9 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { int i, tile_col, mi_row, mi_col; - int temporal_predictor_count[PREDICTION_PROBS][2]; - int no_pred_segcounts[MAX_SEGMENTS]; - int t_unpred_seg_counts[MAX_SEGMENTS]; + int temporal_predictor_count[PREDICTION_PROBS][2] = { { 0 } }; + int no_pred_segcounts[MAX_SEGMENTS] = { 0 }; + int t_unpred_seg_counts[MAX_SEGMENTS] = { 0 }; vp9_prob no_pred_tree[SEG_TREE_PROBS]; vp9_prob t_pred_tree[SEG_TREE_PROBS]; @@ -233,10 +233,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs)); vpx_memset(seg->pred_probs, 255, sizeof(seg->pred_probs)); - vpx_memset(no_pred_segcounts, 0, sizeof(no_pred_segcounts)); - vpx_memset(t_unpred_seg_counts, 0, sizeof(t_unpred_seg_counts)); - vpx_memset(temporal_predictor_count, 0, sizeof(temporal_predictor_count)); - // First of all generate stats regarding how well the last segment map // predicts this one for (tile_col = 0; tile_col < 1 << cm->log2_tile_cols; tile_col++) {