input_file_t in[2];
double peak = 255.0;
+ memset(in, 0, sizeof(in));
+
if (argc < 2) {
fprintf(stderr,
"Usage: %s file1.{yuv|y4m} file2.{yuv|y4m}"
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO best_mbmode;
- int_mv best_ref_mv_sb[2];
+ int_mv best_ref_mv_sb[2] = { { 0 }, { 0 } };
int_mv mode_mv_sb[2][MB_MODE_COUNT];
int_mv best_ref_mv;
int_mv *mode_mv;
/* search range got from mv_pred(). It uses step_param levels. (0-7) */
int sr = 0;
- unsigned char *plane[4][3];
+ unsigned char *plane[4][3] = { { 0, 0 } };
int ref_frame_map[4];
int sign_bias = 0;
int dot_artifact_candidate = 0;
}
}
#endif
+ assert(plane[LAST_FRAME][0] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_y, stride, plane[LAST_FRAME][0], mb_row, mb_col, 0);
// If not found in Y channel, check UV channel.
if (!dot_artifact_candidate) {
+ assert(plane[LAST_FRAME][1] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_u, stride_uv, plane[LAST_FRAME][1], mb_row, mb_col, 1);
if (!dot_artifact_candidate) {
+ assert(plane[LAST_FRAME][2] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_v, stride_uv, plane[LAST_FRAME][2], mb_row, mb_col,
2);
br += rate;
for (i = 0; i < label_count; ++i) {
- int_mv mode_mv[B_MODE_COUNT];
+ int_mv mode_mv[B_MODE_COUNT] = { { 0 }, { 0 } };
int best_label_rd = INT_MAX;
B_PREDICTION_MODE mode_selected = ZERO4X4;
int bestlabelyrate = 0;
/* search range got from mv_pred(). It uses step_param levels. (0-7) */
int sr = 0;
- unsigned char *plane[4][3];
+ unsigned char *plane[4][3] = { { 0, 0 } };
int ref_frame_map[4];
int sign_bias = 0;
/* everything but intra */
if (x->e_mbd.mode_info_context->mbmi.ref_frame) {
+ assert(plane[this_ref_frame][0] != NULL &&
+ plane[this_ref_frame][1] != NULL &&
+ plane[this_ref_frame][2] != NULL);
x->e_mbd.pre.y_buffer = plane[this_ref_frame][0];
x->e_mbd.pre.u_buffer = plane[this_ref_frame][1];
x->e_mbd.pre.v_buffer = plane[this_ref_frame][2];
VP9_COMMON *const cm = &pbi->common;
const BLOCK_SIZE bsize = mi->sb_type;
const int allow_hp = cm->allow_high_precision_mv;
- int_mv best_ref_mvs[2];
+ int_mv best_ref_mvs[2] = { { 0 }, { 0 } };
int ref, is_compound;
uint8_t inter_mode_ctx;
const POSITION *const mv_ref_search = mv_ref_blocks[bsize];
sub_pel = (y >> (INTERP_PRECISION_BITS - SUBPEL_BITS)) & SUBPEL_MASK;
filter = interp_filters[sub_pel];
sum = 0;
- for (k = 0; k < INTERP_TAPS; ++k)
+ for (k = 0; k < INTERP_TAPS; ++k) {
+ assert(int_pel - INTERP_TAPS / 2 + 1 + k < inlength);
sum += filter[k] * input[(int_pel - INTERP_TAPS / 2 + 1 + k < 0
? 0
: int_pel - INTERP_TAPS / 2 + 1 + k)];
+ }
*optr++ = clip_pixel_highbd(ROUND_POWER_OF_TWO(sum, FILTER_BITS), bd);
}
// Middle part.
else
i = recenter_nonneg(MAX_PROB - 1 - v, MAX_PROB - 1 - m) - 1;
+ assert(i >= 0 && (size_t)i < sizeof(map_table));
i = map_table[i];
return i;
}