Commit 55859e84 authored by Alex Converse's avatar Alex Converse
Browse files

Use whole pixel only at speed 8 screen content.

+5.857% BD-RATE on SCREEN_CONTENT

Leaving this off for non-screen content because:
+25.300% on TWITCH120
+37.833% BD-RATE on RTC

Change-Id: Ie0a312182d6cc859fb04298e4cd81d02b39e23fe
parent 9917842f
...@@ -383,6 +383,51 @@ static void get_cost_surf_min(int *cost_list, int *ir, int *ic, ...@@ -383,6 +383,51 @@ static void get_cost_surf_min(int *cost_list, int *ir, int *ic,
(cost_list[4] - 2 * cost_list[0] + cost_list[2])); (cost_list[4] - 2 * cost_list[0] + cost_list[2]));
} }
int vp9_skip_sub_pixel_tree(
const MACROBLOCK *x,
MV *bestmv, const MV *ref_mv,
int allow_hp,
int error_per_bit,
const vp9_variance_fn_ptr_t *vfp,
int forced_stop,
int iters_per_step,
int *cost_list,
int *mvjcost, int *mvcost[2],
int *distortion,
unsigned int *sse1,
const uint8_t *second_pred,
int w, int h) {
SETUP_SUBPEL_SEARCH;
besterr = setup_center_error(xd, bestmv, ref_mv, error_per_bit, vfp,
z, src_stride, y, y_stride, second_pred,
w, h, offset, mvjcost, mvcost,
sse1, distortion);
(void) halfiters;
(void) quarteriters;
(void) eighthiters;
(void) whichdir;
(void) allow_hp;
(void) forced_stop;
(void) hstep;
(void) rr;
(void) rc;
(void) minr;
(void) minc;
(void) maxr;
(void) maxc;
(void) tr;
(void) tc;
(void) sse;
(void) thismse;
(void) cost_list;
if ((abs(bestmv->col - ref_mv->col) > (MAX_FULL_PEL_VAL << 3)) ||
(abs(bestmv->row - ref_mv->row) > (MAX_FULL_PEL_VAL << 3)))
return INT_MAX;
return besterr;
}
int vp9_find_best_sub_pixel_tree_pruned_evenmore( int vp9_find_best_sub_pixel_tree_pruned_evenmore(
const MACROBLOCK *x, const MACROBLOCK *x,
MV *bestmv, const MV *ref_mv, MV *bestmv, const MV *ref_mv,
......
...@@ -92,6 +92,7 @@ extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree; ...@@ -92,6 +92,7 @@ extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree;
extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned; extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned;
extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned_more; extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned_more;
extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned_evenmore; extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree_pruned_evenmore;
extern fractional_mv_step_fp vp9_skip_sub_pixel_tree;
typedef int (*vp9_full_search_fn_t)(const MACROBLOCK *x, typedef int (*vp9_full_search_fn_t)(const MACROBLOCK *x,
const MV *ref_mv, int sad_per_bit, const MV *ref_mv, int sad_per_bit,
......
...@@ -441,7 +441,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, ...@@ -441,7 +441,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
} }
if (speed >= 8) { if (speed >= 8) {
sf->adaptive_rd_thresh = 4; sf->adaptive_rd_thresh = 4;
sf->mv.subpel_force_stop = 2; sf->mv.subpel_force_stop = (content == VP9E_CONTENT_SCREEN) ? 3 : 2;
sf->lpf_pick = LPF_PICK_MINIMAL_LPF; sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
} }
} }
...@@ -607,7 +607,10 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) { ...@@ -607,7 +607,10 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
sf->optimize_coefficients = 0; sf->optimize_coefficients = 0;
} }
if (sf->mv.subpel_search_method == SUBPEL_TREE) { if (sf->mv.subpel_force_stop == 3) {
// Whole pel only
cpi->find_fractional_mv_step = vp9_skip_sub_pixel_tree;
} else if (sf->mv.subpel_search_method == SUBPEL_TREE) {
cpi->find_fractional_mv_step = vp9_find_best_sub_pixel_tree; cpi->find_fractional_mv_step = vp9_find_best_sub_pixel_tree;
} else if (sf->mv.subpel_search_method == SUBPEL_TREE_PRUNED) { } else if (sf->mv.subpel_search_method == SUBPEL_TREE_PRUNED) {
cpi->find_fractional_mv_step = vp9_find_best_sub_pixel_tree_pruned; cpi->find_fractional_mv_step = vp9_find_best_sub_pixel_tree_pruned;
......
...@@ -188,7 +188,11 @@ typedef struct MV_SPEED_FEATURES { ...@@ -188,7 +188,11 @@ typedef struct MV_SPEED_FEATURES {
// Maximum number of steps in logarithmic subpel search before giving up. // Maximum number of steps in logarithmic subpel search before giving up.
int subpel_iters_per_step; int subpel_iters_per_step;
// Control when to stop subpel search // Control when to stop subpel search:
// 0: Full subpel search.
// 1: Stop at quarter pixel.
// 2: Stop at half pixel.
// 3: Stop at full pixel.
int subpel_force_stop; int subpel_force_stop;
// This variable sets the step_param used in full pel motion search. // This variable sets the step_param used in full pel motion search.
......
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