diff options
author | Yunqing Wang <yunqingwang@google.com> | 2014-09-30 11:59:05 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-09-30 11:59:05 -0700 |
commit | b1b6fd85db40601485d17d5f7991d2273d8d7f05 (patch) | |
tree | f9b2eeef1bdb69bb9a5932230663658e99c04c47 /vp9 | |
parent | c8d01b1eaf5850414201b102ab1fc4b49814cb46 (diff) | |
parent | 1fcbf6ed56266939403e75957a363de633f455b2 (diff) | |
download | libvpx-b1b6fd85db40601485d17d5f7991d2273d8d7f05.tar libvpx-b1b6fd85db40601485d17d5f7991d2273d8d7f05.tar.gz libvpx-b1b6fd85db40601485d17d5f7991d2273d8d7f05.tar.bz2 libvpx-b1b6fd85db40601485d17d5f7991d2273d8d7f05.zip |
Merge "Skip the partition search for still frames"
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 6 | ||||
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 3 | ||||
-rw-r--r-- | vp9/encoder/vp9_speed_features.c | 3 | ||||
-rw-r--r-- | vp9/encoder/vp9_speed_features.h | 3 |
5 files changed, 12 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 825fcf306..2100099ac 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -2577,7 +2577,7 @@ static void encode_rd_sb_row(VP9_COMP *cpi, const TileInfo *const tile, sf->always_this_block_size); rd_use_partition(cpi, tile, mi, tp, mi_row, mi_col, BLOCK_64X64, &dummy_rate, &dummy_dist, 1, cpi->pc_root); - } else if ((sf->use_lastframe_partitioning && cpi->skippable_frame) || + } else if (cpi->partition_search_skippable_frame || sf->partition_search_type == VAR_BASED_FIXED_PARTITION) { BLOCK_SIZE bsize; set_offsets(cpi, tile, mi_row, mi_col, BLOCK_64X64); diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index da57370b0..2e86fd146 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -1382,7 +1382,7 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf) { vp9_rc_init(&cpi->oxcf, oxcf->pass, &cpi->rc); cm->current_video_frame = 0; - cpi->skippable_frame = 0; + cpi->partition_search_skippable_frame = 0; // Create the encoder segmentation map and set all entries to 0 CHECK_MEM_ERROR(cm, cpi->segmentation_map, @@ -3020,9 +3020,9 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, // Check if the current frame is skippable for the partition search in the // second pass according to the first pass stats - if (oxcf->pass == 2 && + if (cpi->sf.allow_partition_search_skip && oxcf->pass == 2 && (!cpi->use_svc || is_two_pass_svc(cpi))) { - cpi->skippable_frame = is_skippable_frame(cpi); + cpi->partition_search_skippable_frame = is_skippable_frame(cpi); } // For 1 pass CBR, check if we are dropping this frame. diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index 9bd16bc27..49df5b0f1 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -241,7 +241,8 @@ typedef struct VP9_COMP { YV12_BUFFER_CONFIG *unscaled_last_source; YV12_BUFFER_CONFIG scaled_last_source; - int skippable_frame; + // For a still frame, this flag is set to 1 to skip partition search. + int partition_search_skippable_frame; int scaled_ref_idx[3]; int lst_fb_idx; diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 9368ac1f7..d392de64a 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -88,6 +88,8 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm, else sf->partition_search_breakout_dist_thr = (1 << 22); sf->partition_search_breakout_rate_thr = 700; + + sf->allow_partition_search_skip = 1; } if (speed >= 3) { @@ -363,6 +365,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) { sf->max_delta_qindex = 0; sf->disable_filter_search_var_thresh = 0; sf->adaptive_interp_filter_search = 0; + sf->allow_partition_search_skip = 0; for (i = 0; i < TX_SIZES; i++) { sf->intra_y_mode_mask[i] = INTRA_ALL; diff --git a/vp9/encoder/vp9_speed_features.h b/vp9/encoder/vp9_speed_features.h index f224e65de..e71a47b35 100644 --- a/vp9/encoder/vp9_speed_features.h +++ b/vp9/encoder/vp9_speed_features.h @@ -437,6 +437,9 @@ typedef struct SPEED_FEATURES { // Partition search early breakout thresholds. int64_t partition_search_breakout_dist_thr; int partition_search_breakout_rate_thr; + + // Allow skipping partition search for still image frame + int allow_partition_search_skip; } SPEED_FEATURES; struct VP9_COMP; |