Merge "Adds speed 8 to vp9 as reference"
This commit is contained in:
@@ -88,14 +88,27 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
mvp_full.row >>= 3;
|
||||
|
||||
if (cpi->sf.search_method == FAST_HEX) {
|
||||
vp9_fast_hex_search(x, &mvp_full, step_param, sadpb, &cpi->fn_ptr[bsize],
|
||||
1, &ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
bestsme = vp9_fast_hex_search(x, &mvp_full, step_param, sadpb,
|
||||
&cpi->fn_ptr[bsize], 1,
|
||||
&ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
} else if (cpi->sf.search_method == HEX) {
|
||||
bestsme = vp9_hex_search(x, &mvp_full, step_param, sadpb, 1,
|
||||
&cpi->fn_ptr[bsize], 1,
|
||||
&ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
} else if (cpi->sf.search_method == SQUARE) {
|
||||
bestsme = vp9_square_search(x, &mvp_full, step_param, sadpb, 1,
|
||||
&cpi->fn_ptr[bsize], 1,
|
||||
&ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
} else if (cpi->sf.search_method == BIGDIA) {
|
||||
bestsme = vp9_bigdia_search(x, &mvp_full, step_param, sadpb, 1,
|
||||
&cpi->fn_ptr[bsize], 1,
|
||||
&ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
} else {
|
||||
vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param, sadpb, further_steps,
|
||||
1, &cpi->fn_ptr[bsize], &ref_mv.as_mv,
|
||||
&tmp_mv->as_mv);
|
||||
bestsme = vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param,
|
||||
sadpb, further_steps, 1,
|
||||
&cpi->fn_ptr[bsize],
|
||||
&ref_mv.as_mv, &tmp_mv->as_mv);
|
||||
}
|
||||
|
||||
x->mv_col_min = tmp_col_min;
|
||||
x->mv_col_max = tmp_col_max;
|
||||
x->mv_row_min = tmp_row_min;
|
||||
@@ -189,8 +202,8 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
static const int flag_list[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG,
|
||||
VP9_ALT_FLAG };
|
||||
int64_t best_rd = INT64_MAX;
|
||||
int64_t this_rd;
|
||||
static const int cost[4]= { 0, 50, 75, 100 };
|
||||
int64_t this_rd = INT64_MAX;
|
||||
static const int cost[4]= { 0, 2, 4, 6 };
|
||||
|
||||
const int64_t inter_mode_thresh = 300;
|
||||
const int64_t intra_mode_cost = 50;
|
||||
@@ -228,7 +241,6 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
|
||||
for (ref_frame = LAST_FRAME; ref_frame <= LAST_FRAME ; ++ref_frame) {
|
||||
int rate_mv = 0;
|
||||
|
||||
if (!(cpi->ref_frame_flags & flag_list[ref_frame]))
|
||||
continue;
|
||||
|
||||
@@ -241,11 +253,15 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
mbmi->ref_frame[0] = ref_frame;
|
||||
|
||||
for (this_mode = NEARESTMV; this_mode <= NEWMV; ++this_mode) {
|
||||
int rate = cost[INTER_OFFSET(this_mode)];
|
||||
int rate = cost[INTER_OFFSET(this_mode)]
|
||||
<< (num_pels_log2_lookup[bsize] - 4);
|
||||
int64_t dist;
|
||||
if (cpi->sf.disable_inter_mode_mask[bsize] &
|
||||
(1 << INTER_OFFSET(this_mode)))
|
||||
continue;
|
||||
|
||||
if (this_mode == NEWMV) {
|
||||
if (this_rd < 500)
|
||||
if (this_rd < (1 << num_pels_log2_lookup[bsize]))
|
||||
continue;
|
||||
|
||||
x->mode_sad[ref_frame][INTER_OFFSET(NEWMV)] =
|
||||
@@ -312,6 +328,5 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return INT64_MAX;
|
||||
}
|
||||
|
Reference in New Issue
Block a user