Commit 734938dc authored by Jingning Han's avatar Jingning Han
Browse files

Use more meaningful names for speed features

Use frame_parameter_update to precisely describe the functionality.

Change-Id: Ia9a55ba8efef7b987e30d949dd00ac716189bdb9
parent 3da25f29
...@@ -2546,7 +2546,7 @@ static void encode_frame_internal(VP9_COMP *cpi) { ...@@ -2546,7 +2546,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
vp9_tile_init(&tile, cm, tile_row, tile_col); vp9_tile_init(&tile, cm, tile_row, tile_col);
for (mi_row = tile.mi_row_start; for (mi_row = tile.mi_row_start;
mi_row < tile.mi_row_end; mi_row += 8) { mi_row < tile.mi_row_end; mi_row += 8) {
if (cpi->sf.super_fast_rtc) if (cpi->sf.use_pick_mode)
encode_rtc_sb_row(cpi, &tile, mi_row, &tp); encode_rtc_sb_row(cpi, &tile, mi_row, &tp);
else else
encode_sb_row(cpi, &tile, mi_row, &tp); encode_sb_row(cpi, &tile, mi_row, &tp);
...@@ -2604,7 +2604,7 @@ void vp9_encode_frame(VP9_COMP *cpi) { ...@@ -2604,7 +2604,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
} }
} }
if (cpi->sf.RD) { if (cpi->sf.frame_parameter_update) {
int i; int i;
REFERENCE_MODE reference_mode; REFERENCE_MODE reference_mode;
/* /*
...@@ -2811,7 +2811,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled, ...@@ -2811,7 +2811,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
const int mi_height = num_8x8_blocks_high_lookup[bsize]; const int mi_height = num_8x8_blocks_high_lookup[bsize];
x->skip_recode = !x->select_txfm_size && mbmi->sb_type >= BLOCK_8X8 && x->skip_recode = !x->select_txfm_size && mbmi->sb_type >= BLOCK_8X8 &&
(cpi->oxcf.aq_mode != COMPLEXITY_AQ) && (cpi->oxcf.aq_mode != COMPLEXITY_AQ) &&
!cpi->sf.super_fast_rtc; !cpi->sf.use_pick_mode;
x->skip_optimize = ctx->is_coded; x->skip_optimize = ctx->is_coded;
ctx->is_coded = 1; ctx->is_coded = 1;
x->use_lp32x32fdct = cpi->sf.use_lp32x32fdct; x->use_lp32x32fdct = cpi->sf.use_lp32x32fdct;
......
...@@ -842,11 +842,11 @@ static void set_rt_speed_feature(VP9_COMMON *cm, ...@@ -842,11 +842,11 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
sf->intra_y_mode_mask[i] = INTRA_DC_H_V; sf->intra_y_mode_mask[i] = INTRA_DC_H_V;
sf->intra_uv_mode_mask[i] = INTRA_DC_ONLY; sf->intra_uv_mode_mask[i] = INTRA_DC_ONLY;
} }
sf->RD = 0; sf->frame_parameter_update = 0;
} }
if (speed >= 6) { if (speed >= 6) {
sf->super_fast_rtc = 1;
sf->always_this_block_size = BLOCK_16X16; sf->always_this_block_size = BLOCK_16X16;
sf->use_pick_mode = 1;
} }
} }
...@@ -864,7 +864,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) { ...@@ -864,7 +864,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
cpi->mode_chosen_counts[i] = 0; cpi->mode_chosen_counts[i] = 0;
// best quality defaults // best quality defaults
sf->RD = 1; sf->frame_parameter_update = 1;
sf->search_method = NSTEP; sf->search_method = NSTEP;
sf->recode_loop = ALLOW_RECODE; sf->recode_loop = ALLOW_RECODE;
sf->subpel_search_method = SUBPEL_TREE; sf->subpel_search_method = SUBPEL_TREE;
...@@ -905,7 +905,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) { ...@@ -905,7 +905,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->use_fast_coef_updates = 0; sf->use_fast_coef_updates = 0;
sf->using_small_partition_info = 0; sf->using_small_partition_info = 0;
sf->mode_skip_start = MAX_MODES; // Mode index at which mode skip mask set sf->mode_skip_start = MAX_MODES; // Mode index at which mode skip mask set
sf->super_fast_rtc = 0; sf->use_pick_mode = 0;
switch (cpi->oxcf.mode) { switch (cpi->oxcf.mode) {
case MODE_BESTQUALITY: case MODE_BESTQUALITY:
...@@ -2875,7 +2875,7 @@ static void encode_with_recode_loop(VP9_COMP *cpi, ...@@ -2875,7 +2875,7 @@ static void encode_with_recode_loop(VP9_COMP *cpi,
if (cpi->sf.recode_loop >= ALLOW_RECODE_KFARFGF) { if (cpi->sf.recode_loop >= ALLOW_RECODE_KFARFGF) {
vp9_save_coding_context(cpi); vp9_save_coding_context(cpi);
cpi->dummy_packing = 1; cpi->dummy_packing = 1;
if (!cpi->sf.super_fast_rtc) if (!cpi->sf.use_pick_mode)
vp9_pack_bitstream(cpi, dest, size); vp9_pack_bitstream(cpi, dest, size);
cpi->rc.projected_frame_size = (*size) << 3; cpi->rc.projected_frame_size = (*size) << 3;
......
...@@ -209,8 +209,8 @@ typedef enum { ...@@ -209,8 +209,8 @@ typedef enum {
} RECODE_LOOP_TYPE; } RECODE_LOOP_TYPE;
typedef struct { typedef struct {
// This flag refers to whether or not to perform rd optimization. // Frame level coding parameter update
int RD; int frame_parameter_update;
// Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc). // Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc).
SEARCH_METHODS search_method; SEARCH_METHODS search_method;
...@@ -390,8 +390,8 @@ typedef struct { ...@@ -390,8 +390,8 @@ typedef struct {
// by only looking at counts from 1/2 the bands. // 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 int use_fast_coef_updates; // 0: 2-loop, 1: 1-loop, 2: 1-loop reduced
// This flag control the use of the new super fast rtc mode // This flag controls the use of non-RD mode decision.
int super_fast_rtc; int use_pick_mode;
} SPEED_FEATURES; } SPEED_FEATURES;
typedef struct { typedef struct {
......
...@@ -850,7 +850,7 @@ int vp9_rc_pick_q_and_adjust_q_bounds(const VP9_COMP *cpi, ...@@ -850,7 +850,7 @@ int vp9_rc_pick_q_and_adjust_q_bounds(const VP9_COMP *cpi,
// JBB : This is realtime mode. In real time mode the first frame // JBB : This is realtime mode. In real time mode the first frame
// should be larger. Q of 0 is disabled because we force tx size to be // should be larger. Q of 0 is disabled because we force tx size to be
// 16x16... // 16x16...
if (cpi->sf.super_fast_rtc) { if (cpi->sf.use_pick_mode) {
if (cpi->common.current_video_frame == 0) if (cpi->common.current_video_frame == 0)
q /= 3; q /= 3;
if (q == 0) if (q == 0)
......
...@@ -296,7 +296,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) { ...@@ -296,7 +296,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
fill_token_costs(x->token_costs, cm->fc.coef_probs); fill_token_costs(x->token_costs, cm->fc.coef_probs);
if (!cpi->sf.super_fast_rtc) { if (!cpi->sf.use_pick_mode) {
for (i = 0; i < PARTITION_CONTEXTS; i++) for (i = 0; i < PARTITION_CONTEXTS; i++)
vp9_cost_tokens(x->partition_cost[i], get_partition_probs(cm, i), vp9_cost_tokens(x->partition_cost[i], get_partition_probs(cm, i),
vp9_partition_tree); vp9_partition_tree);
...@@ -443,7 +443,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize, ...@@ -443,7 +443,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
if (i == 0) if (i == 0)
x->pred_sse[ref] = sse; x->pred_sse[ref] = sse;
if (cpi->sf.super_fast_rtc) { if (cpi->sf.use_pick_mode) {
dist_sum += (int)sse; dist_sum += (int)sse;
} else { } else {
int rate; int rate;
......
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