Commit 86777f2e authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review
Browse files

Merge "Move filter_ref initialization"

parents 9363425d 065809d2
...@@ -493,7 +493,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -493,7 +493,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
const int8_t segment_id = mbmi->segment_id; const int8_t segment_id = mbmi->segment_id;
const int *const rd_threshes = cpi->rd.threshes[segment_id][bsize]; const int *const rd_threshes = cpi->rd.threshes[segment_id][bsize];
const int *const rd_thresh_freq_fact = cpi->rd.thresh_freq_fact[bsize]; const int *const rd_thresh_freq_fact = cpi->rd.thresh_freq_fact[bsize];
INTERP_FILTER filter_ref = cm->interp_filter; INTERP_FILTER filter_ref;
const int bsl = mi_width_log2_lookup[bsize]; const int bsl = mi_width_log2_lookup[bsize];
const int pred_filter_search = cm->interp_filter == SWITCHABLE ? const int pred_filter_search = cm->interp_filter == SWITCHABLE ?
(((mi_row + mi_col) >> bsl) + (((mi_row + mi_col) >> bsl) +
...@@ -536,6 +536,13 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -536,6 +536,13 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH; x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
x->skip = 0; x->skip = 0;
if (xd->up_available)
filter_ref = xd->mi[-xd->mi_stride].src_mi->mbmi.interp_filter;
else if (xd->left_available)
filter_ref = xd->mi[-1].src_mi->mbmi.interp_filter;
else
filter_ref = cm->interp_filter;
// initialize mode decisions // initialize mode decisions
vp9_rd_cost_reset(&best_rdc); vp9_rd_cost_reset(&best_rdc);
vp9_rd_cost_reset(&this_rdc); vp9_rd_cost_reset(&this_rdc);
...@@ -556,11 +563,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, ...@@ -556,11 +563,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
frame_mv[NEWMV][ref_frame].as_int = INVALID_MV; frame_mv[NEWMV][ref_frame].as_int = INVALID_MV;
frame_mv[ZEROMV][ref_frame].as_int = 0; frame_mv[ZEROMV][ref_frame].as_int = 0;
if (xd->up_available)
filter_ref = xd->mi[-xd->mi_stride].src_mi->mbmi.interp_filter;
else if (xd->left_available)
filter_ref = xd->mi[-1].src_mi->mbmi.interp_filter;
if (cpi->ref_frame_flags & flag_list[ref_frame]) { if (cpi->ref_frame_flags & flag_list[ref_frame]) {
const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame);
int_mv *const candidates = mbmi->ref_mvs[ref_frame]; int_mv *const candidates = mbmi->ref_mvs[ref_frame];
......
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