Adding FAST_COEFF_UPDATE enum.

Change-Id: I75ad328c6d719df81cc24f3ae21c152af4ebdacc
This commit is contained in:
Dmitry Kovalev 2014-04-04 10:31:34 -07:00
parent 9848d67bb3
commit 107929dc6b
3 changed files with 24 additions and 11 deletions

View File

@ -521,7 +521,7 @@ static void update_coef_probs_common(vp9_writer* const bc, VP9_COMP *cpi,
const int entropy_nodes_update = UNCONSTRAINED_NODES;
int i, j, k, l, t;
switch (cpi->sf.use_fast_coef_updates) {
case 0: {
case TWO_LOOP: {
/* dry run to see if there is any udpate at all needed */
int savings = 0;
int update[2] = {0, 0};
@ -596,14 +596,14 @@ static void update_coef_probs_common(vp9_writer* const bc, VP9_COMP *cpi,
return;
}
case 1:
case 2: {
case ONE_LOOP:
case ONE_LOOP_REDUCED: {
const int prev_coef_contexts_to_update =
cpi->sf.use_fast_coef_updates == 2 ? COEFF_CONTEXTS >> 1
: COEFF_CONTEXTS;
cpi->sf.use_fast_coef_updates == ONE_LOOP_REDUCED ?
COEFF_CONTEXTS >> 1 : COEFF_CONTEXTS;
const int coef_band_to_update =
cpi->sf.use_fast_coef_updates == 2 ? COEF_BANDS >> 1
: COEF_BANDS;
cpi->sf.use_fast_coef_updates == ONE_LOOP_REDUCED ?
COEF_BANDS >> 1 : COEF_BANDS;
int updates = 0;
int noupdates_before_first = 0;
for (i = 0; i < PLANE_TYPES; ++i) {

View File

@ -111,7 +111,7 @@ static void set_good_speed_feature(VP9_COMP *cpi,
sf->adaptive_rd_thresh = 3;
sf->mode_skip_start = 6;
sf->use_fast_coef_updates = 2;
sf->use_fast_coef_updates = ONE_LOOP_REDUCED;
sf->use_fast_coef_costing = 1;
}
// Additions or changes for speed 3 and above
@ -220,7 +220,7 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
sf->use_uv_intra_rd_estimate = 1;
sf->skip_encode_sb = 1;
sf->subpel_iters_per_step = 1;
sf->use_fast_coef_updates = 2;
sf->use_fast_coef_updates = ONE_LOOP_REDUCED;
sf->adaptive_rd_thresh = 4;
sf->mode_skip_start = 6;
sf->allow_skip_recode = 0;
@ -328,7 +328,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->use_uv_intra_rd_estimate = 0;
sf->allow_skip_recode = 0;
sf->lpf_pick = LPF_PICK_FROM_FULL_IMAGE;
sf->use_fast_coef_updates = 0;
sf->use_fast_coef_updates = TWO_LOOP;
sf->use_fast_coef_costing = 0;
sf->mode_skip_start = MAX_MODES; // Mode index at which mode skip mask set
sf->use_nonrd_pick_mode = 0;

View File

@ -113,6 +113,19 @@ typedef enum {
VAR_BASED_PARTITION
} PARTITION_SEARCH_TYPE;
typedef enum {
// Does a dry run to see if any of the contexts need to be updated or not,
// before the final run.
TWO_LOOP = 0,
// No dry run conducted.
ONE_LOOP = 1,
// No dry run, also only half the coef contexts and bands are updated.
// The rest are not updated at all.
ONE_LOOP_REDUCED = 2
} FAST_COEFF_UPDATE;
typedef struct {
// Frame level coding parameter update
int frame_parameter_update;
@ -291,7 +304,7 @@ typedef struct {
// This feature limits the number of coefficients updates we actually do
// by only looking at counts from 1/2 the bands.
int use_fast_coef_updates; // 0: 2-loop, 1: 1-loop, 2: 1-loop reduced
FAST_COEFF_UPDATE use_fast_coef_updates;
// This flag controls the use of non-RD mode decision.
int use_nonrd_pick_mode;