Commit eb6b443b authored by Aℓex Converse's avatar Aℓex Converse Committed by Gerrit Code Review
Browse files

Merge "Convert simple_model_rd_from_var from a speed check to a speed feature."

parents a71c5c0e c827c59e
...@@ -234,7 +234,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize, ...@@ -234,7 +234,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
total_sse += sum_sse; total_sse += sum_sse;
// Fast approximate the modelling function. // Fast approximate the modelling function.
if (cpi->oxcf.speed > 4) { if (cpi->sf.simple_model_rd_from_var) {
int64_t rate; int64_t rate;
const int64_t square_error = sum_sse; const int64_t square_error = sum_sse;
int quantizer = (pd->dequant[1] >> 3); int quantizer = (pd->dequant[1] >> 3);
......
...@@ -193,6 +193,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm, ...@@ -193,6 +193,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
sf->use_fast_coef_costing = 1; sf->use_fast_coef_costing = 1;
sf->motion_field_mode_search = !boosted; sf->motion_field_mode_search = !boosted;
sf->partition_search_breakout_rate_thr = 300; sf->partition_search_breakout_rate_thr = 300;
sf->simple_model_rd_from_var = 1;
} }
if (speed >= 5) { if (speed >= 5) {
...@@ -335,6 +336,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, ...@@ -335,6 +336,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
sf->inter_mode_mask[BLOCK_64X64] = INTER_NEAREST; sf->inter_mode_mask[BLOCK_64X64] = INTER_NEAREST;
sf->max_intra_bsize = BLOCK_32X32; sf->max_intra_bsize = BLOCK_32X32;
sf->allow_skip_recode = 1; sf->allow_skip_recode = 1;
sf->simple_model_rd_from_var = 1;
} }
if (speed >= 5) { if (speed >= 5) {
...@@ -507,6 +509,7 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) { ...@@ -507,6 +509,7 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
sf->tx_size_search_breakout = 0; sf->tx_size_search_breakout = 0;
sf->partition_search_breakout_dist_thr = 0; sf->partition_search_breakout_dist_thr = 0;
sf->partition_search_breakout_rate_thr = 0; sf->partition_search_breakout_rate_thr = 0;
sf->simple_model_rd_from_var = 0;
if (oxcf->mode == REALTIME) if (oxcf->mode == REALTIME)
set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content); set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
......
...@@ -415,6 +415,9 @@ typedef struct SPEED_FEATURES { ...@@ -415,6 +415,9 @@ typedef struct SPEED_FEATURES {
// Allow skipping partition search for still image frame // Allow skipping partition search for still image frame
int allow_partition_search_skip; int allow_partition_search_skip;
// Fast approximation of vp9_model_rd_from_var_lapndz
int simple_model_rd_from_var;
} SPEED_FEATURES; } SPEED_FEATURES;
struct VP9_COMP; struct VP9_COMP;
......
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