Change-Id: I3326f0912627981fd604b16ddbf668d2262d4287
#if CONFIG_NON_GREEDY_MV
cpi->feature_score_loc_alloc = 0;
+ cpi->tpl_ready = 0;
#endif // CONFIG_NON_GREEDY_MV
for (i = 0; i < MAX_ARF_GOP_SIZE; ++i) cpi->tpl_stats[i].tpl_stats_ptr = NULL;
mc_flow_dispenser(cpi, gf_picture, frame_idx, cpi->tpl_bsize);
}
#if CONFIG_NON_GREEDY_MV
+ cpi->tpl_ready = 1;
#if DUMP_TPL_STATS
dump_tpl_stats(cpi, tpl_group_frames, gf_picture, cpi->tpl_bsize);
#endif // DUMP_TPL_STATS
YV12_BUFFER_CONFIG *tpl_recon_frames[REF_FRAMES];
EncFrameBuf enc_frame_buf[REF_FRAMES];
#if CONFIG_NON_GREEDY_MV
+ int tpl_ready;
int feature_score_loc_alloc;
FEATURE_SCORE_LOC *feature_score_loc_arr;
FEATURE_SCORE_LOC **feature_score_loc_sort;
#if CONFIG_NON_GREEDY_MV
(void)mode_mv;
(void)this_mv;
- if (this_mode == NEWMV && bsize >= BLOCK_8X8) {
+ if (this_mode == NEWMV && bsize >= BLOCK_8X8 && cpi->tpl_ready) {
const int gf_group_idx = cpi->twopass.gf_group.index;
const int gf_rf_idx = ref_frame_to_gf_rf_idx(ref_frame);
const TplDepFrame tpl_frame = cpi->tpl_stats[gf_group_idx];