Commit eeae6f94 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

fix a problem where an invalid mv used in search

The commit added reset of pred_mv at the beginning of each SB64x64
partition mv search, also limited the usage of pred_mv only when
search on the largest partition is already done. This is to fix
a crash at speed 1/2 encoder where an invalid mv is used in mv

Change-Id: I39010177da76d054e3c90b7899a44feb2e3a5b1b
parent c73e4412
......@@ -2051,6 +2051,8 @@ static void encode_sb_row(VP9_COMP *cpi, int mi_row, TOKENEXTRA **tp,
int dummy_rate;
int64_t dummy_dist;
vpx_memset(cpi->mb.pred_mv, 0, sizeof(cpi->mb.pred_mv));
if (cpi->sf.reference_masking)
rd_pick_reference_frame(cpi, mi_row, mi_col);
......@@ -2096,7 +2096,8 @@ static void mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
int row_offset, col_offset;
int num_mv_refs = MAX_MV_REF_CANDIDATES +
(cpi->sf.adaptive_motion_search &&
cpi->common.show_frame && block_size < BLOCK_64X64);
cpi->common.show_frame &&
block_size < cpi->sf.max_partition_size);
// Get the sad for each candidate reference mv
for (i = 0; i < num_mv_refs; i++) {
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