}
#endif
+#if CONFIG_NON_GREEDY_MV
uint32_t motion_compensated_prediction(VP9_COMP *cpi, ThreadData *td,
int frame_idx, uint8_t *cur_frame_buf,
uint8_t *ref_frame_buf, int stride,
- MV *mv, BLOCK_SIZE bsize, int mi_row,
- int mi_col) {
+ BLOCK_SIZE bsize, int mi_row, int mi_col,
+ TplDepStats *tpl_stats, int rf_idx) {
+ MV *mv = &tpl_stats->mv_arr[rf_idx].as_mv;
+#else // CONFIG_NON_GREEDY_MV
+uint32_t motion_compensated_prediction(VP9_COMP *cpi, ThreadData *td,
+ int frame_idx, uint8_t *cur_frame_buf,
+ uint8_t *ref_frame_buf, int stride,
+ BLOCK_SIZE bsize, int mi_row, int mi_col,
+ MV *mv) {
+#endif // CONFIG_NON_GREEDY_MV
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv;
prepare_nb_full_mvs(&cpi->tpl_stats[frame_idx], mi_row, mi_col, nb_full_mvs);
vp9_full_pixel_diamond_new(cpi, x, &best_ref_mv1_full, step_param, lambda,
MAX_MVSEARCH_STEPS - 1 - step_param, 1,
- &cpi->fn_ptr[bsize], nb_full_mvs, mv);
+ &cpi->fn_ptr[bsize], nb_full_mvs, tpl_stats,
+ rf_idx);
#else
(void)frame_idx;
(void)mi_row;
continue;
}
+#if CONFIG_NON_GREEDY_MV
motion_compensated_prediction(
cpi, td, frame_idx, xd->cur_buf->y_buffer + mb_y_offset,
- ref_frame[rf_idx]->y_buffer + mb_y_offset, xd->cur_buf->y_stride,
- &mv.as_mv, bsize, mi_row, mi_col);
+ ref_frame[rf_idx]->y_buffer + mb_y_offset, xd->cur_buf->y_stride, bsize,
+ mi_row, mi_col, tpl_stats, rf_idx);
+ mv.as_int = tpl_stats->mv_arr[rf_idx].as_int;
+#else
+ motion_compensated_prediction(
+ cpi, td, frame_idx, xd->cur_buf->y_buffer + mb_y_offset,
+ ref_frame[rf_idx]->y_buffer + mb_y_offset, xd->cur_buf->y_stride, bsize,
+ mi_row, mi_col, &mv.as_mv);
+#endif
// TODO(jingning): Not yet support high bit-depth in the next three
// steps.
#if CONFIG_NON_GREEDY_MV
tpl_stats->inter_cost_arr[rf_idx] = inter_cost;
- tpl_stats->mv_arr[rf_idx].as_int = mv.as_int;
get_quantize_error(x, 0, coeff, qcoeff, dqcoeff, tx_size,
&tpl_stats->recon_error_arr[rf_idx],
&tpl_stats->sse_arr[rf_idx]);
#if CONFIG_NON_GREEDY_MV
#define NB_MVS_NUM 4
+struct TplDepStats;
double vp9_refining_search_sad_new(const MACROBLOCK *x, MV *best_full_mv,
double lambda, int search_range,
const vp9_variance_fn_ptr_t *fn_ptr,
MV *mvp_full, int step_param, double lambda,
int further_steps, int do_refine,
const vp9_variance_fn_ptr_t *fn_ptr,
- const int_mv *nb_full_mvs, MV *dst_mv);
+ const int_mv *nb_full_mvs,
+ struct TplDepStats *tpl_stats, int rf_idx);
#endif // CONFIG_NON_GREEDY_MV
#ifdef __cplusplus
} // extern "C"