Commit 26fa8cad authored by Deb Mukherjee's avatar Deb Mukherjee
Browse files

Fixes static analysis issues

Removes some unused variables and assignments

Change-Id: I228f43d658ce50237d65ce8dc8ab2ccf0a0b21ca
parent c610a3b0
......@@ -705,8 +705,6 @@ static int vp9_pattern_search(const MACROBLOCK *x,
best_mv->row = br;
best_mv->col = bc;
this_offset = base_offset + (best_mv->row * in_what_stride) +
best_mv->col;
this_mv.row = best_mv->row * 8;
this_mv.col = best_mv->col * 8;
return bestsad;
......@@ -1382,7 +1380,6 @@ int vp9_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv,
if (sad < best_sad) {
best_sad = sad;
*best_mv = this_mv;
best_address = check_here;
}
}
}
......@@ -1451,10 +1448,8 @@ int vp9_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv,
bestsad = thissad;
best_mv->row = r;
best_mv->col = c;
bestaddress = check_here;
}
}
check_here++;
c++;
}
......@@ -1473,7 +1468,6 @@ int vp9_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv,
bestsad = thissad;
best_mv->row = r;
best_mv->col = c;
bestaddress = check_here;
}
}
......@@ -1548,7 +1542,6 @@ int vp9_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv,
bestsad = thissad;
best_mv->row = r;
best_mv->col = c;
bestaddress = check_here;
}
}
......@@ -1574,7 +1567,6 @@ int vp9_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv,
bestsad = thissad;
best_mv->row = r;
best_mv->col = c;
bestaddress = check_here;
}
}
......@@ -1596,7 +1588,6 @@ int vp9_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv,
bestsad = thissad;
best_mv->row = r;
best_mv->col = c;
bestaddress = check_here;
}
}
......@@ -1659,7 +1650,6 @@ int vp9_refining_search_sad_c(const MACROBLOCK *x,
} else {
ref_mv->row += neighbors[best_site].row;
ref_mv->col += neighbors[best_site].col;
best_address = &in_what[ref_mv->row * in_what_stride + ref_mv->col];
}
}
return bestsad;
......@@ -1822,7 +1812,6 @@ int vp9_refining_search_8p_c(const MACROBLOCK *x,
} else {
ref_mv->row += neighbors[best_site].row;
ref_mv->col += neighbors[best_site].col;
best_address = &in_what[ref_mv->row * in_what_stride + ref_mv->col];
}
}
return bestsad;
......
......@@ -88,31 +88,31 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
if (cpi->sf.search_method == FAST_HEX) {
// NOTE: this returns SAD
bestsme = vp9_fast_hex_search(x, &mvp_full, step_param, sadpb, 0,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
vp9_fast_hex_search(x, &mvp_full, step_param, sadpb, 0,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
} else if (cpi->sf.search_method == HEX) {
// NOTE: this returns SAD
bestsme = vp9_hex_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
vp9_hex_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
} else if (cpi->sf.search_method == SQUARE) {
// NOTE: this returns SAD
bestsme = vp9_square_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
vp9_square_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
} else if (cpi->sf.search_method == BIGDIA) {
// NOTE: this returns SAD
bestsme = vp9_bigdia_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
vp9_bigdia_search(x, &mvp_full, step_param, sadpb, 1,
&cpi->fn_ptr[bsize], 1,
&ref_mv, &tmp_mv->as_mv);
} else {
int further_steps = (cpi->sf.max_step_search_steps - 1) - step_param;
// NOTE: this returns variance
bestsme = vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param,
sadpb, further_steps, 1,
&cpi->fn_ptr[bsize],
&ref_mv, &tmp_mv->as_mv);
vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param,
sadpb, further_steps, 1,
&cpi->fn_ptr[bsize],
&ref_mv, &tmp_mv->as_mv);
}
x->mv_col_min = tmp_col_min;
x->mv_col_max = tmp_col_max;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment