Move filter_ref initialization
To outside the loop to avoid repeating the operations. Change-Id: I66c1986e98ce0d7594caad3d3b45de655b299bff
This commit is contained in:
parent
3f79359e0a
commit
065809d286
@ -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,
|
|||||||
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,
|
|||||||
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];
|
||||||
|
Loading…
Reference in New Issue
Block a user