Commit 0fad6a9d authored by Jim Bankoski's avatar Jim Bankoski Committed by Gerrit Code Review
Browse files

fix to set up new speed feature

This uses the speed feature functionality for code.

Change-Id: I9cd16c0c5f98520ae27ebba81aa2c178546587f8
parent df2314cf
......@@ -1397,10 +1397,11 @@ static void encode_sb_row(VP9_COMP *cpi, int mi_row,
for (mi_col = cm->cur_tile_mi_col_start;
mi_col < cm->cur_tile_mi_col_end; mi_col += 64 / MI_SIZE) {
int dummy_rate, dummy_dist;
if (cpi->speed < 5) {
if (!cpi->sf.use_lastframe_partitioning) {
rd_pick_partition(cpi, tp, mi_row, mi_col, BLOCK_SIZE_SB64X64,
&dummy_rate, &dummy_dist);
} else {
const int idx_str = cm->mode_info_stride * mi_row + mi_col;
MODE_INFO *m = cm->mi + idx_str;
MODE_INFO *p = cm->prev_mi + idx_str;
......
......@@ -539,6 +539,9 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
int speed_multiplier = speed + 1;
int i;
if (speed == 2)
speed_multiplier = 1;
// Set baseline threshold values
for (i = 0; i < MAX_MODES; ++i)
sf->thresh_mult[i] = mode == 0 ? -500 : 0;
......@@ -595,18 +598,21 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
for (i = 0; i < MAX_MODES; ++i)
sf->thresh_mult[i] = INT_MAX;
sf->thresh_mult[THR_DC ] = 0;
sf->thresh_mult[THR_TM ] = 0;
sf->thresh_mult[THR_NEWMV ] = 4000;
sf->thresh_mult[THR_NEWG ] = 4000;
sf->thresh_mult[THR_NEWA ] = 4000;
sf->thresh_mult[THR_DC] = 0;
sf->thresh_mult[THR_TM] = 0;
sf->thresh_mult[THR_NEWMV] = 4000;
sf->thresh_mult[THR_NEWG] = 4000;
sf->thresh_mult[THR_NEWA] = 4000;
sf->thresh_mult[THR_NEARESTMV] = 0;
sf->thresh_mult[THR_NEARESTG ] = 0;
sf->thresh_mult[THR_NEARESTA ] = 0;
sf->thresh_mult[THR_NEARMV ] = 2000;
sf->thresh_mult[THR_NEARG ] = 2000;
sf->thresh_mult[THR_NEARA ] = 2000;
sf->thresh_mult[THR_NEARESTG] = 0;
sf->thresh_mult[THR_NEARESTA] = 0;
sf->thresh_mult[THR_NEARMV] = 2000;
sf->thresh_mult[THR_NEARG] = 2000;
sf->thresh_mult[THR_NEARA] = 2000;
sf->thresh_mult[THR_COMP_NEARESTLA] = 2000;
sf->thresh_mult[THR_SPLITMV] = 2500;
sf->thresh_mult[THR_SPLITG] = 2500;
sf->thresh_mult[THR_SPLITA] = 2500;
sf->recode_loop = 0;
}
......@@ -681,6 +687,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_AB4X4;
sf->adpative_rd_thresh = 0;
sf->use_lastframe_partitioning = 0;
#if CONFIG_MULTIPLE_ARF
// Switch segmentation off.
......@@ -708,7 +715,10 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->optimize_coefficients = 0;
sf->first_step = 1;
}
break;
if (speed == 2)
sf->use_lastframe_partitioning = 1;
break;
}; /* switch */
......@@ -3327,7 +3337,7 @@ static void Pass2Encode(VP9_COMP *cpi, unsigned long *size,
vp9_second_pass(cpi);
encode_frame_to_data_rate(cpi, size, dest, frame_flags);
//vp9_print_modes_and_motion_vectors(&cpi->common, "encode.stt");
#ifdef DISABLE_RC_LONG_TERM_MEM
cpi->twopass.bits_left -= cpi->this_frame_target;
#else
......
......@@ -216,6 +216,7 @@ typedef struct {
int static_segmentation;
int comp_inter_joint_search_thresh;
int adpative_rd_thresh;
int use_lastframe_partitioning;
} SPEED_FEATURES;
enum BlockSize {
......
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