summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2013-06-27 12:07:07 -0700
committerYaowu Xu <yaowu@google.com>2013-07-02 16:40:15 -0700
commit0d7b7c09cb57d32b0f341379cc3c19e21910ea8d (patch)
tree4362fc85d349988c4451f4a306f85c98386b715e /vp9
parent37501d687c509c348bc2bdbe75aa050e2ab0437c (diff)
downloadlibvpx-0d7b7c09cb57d32b0f341379cc3c19e21910ea8d.tar
libvpx-0d7b7c09cb57d32b0f341379cc3c19e21910ea8d.tar.gz
libvpx-0d7b7c09cb57d32b0f341379cc3c19e21910ea8d.tar.bz2
libvpx-0d7b7c09cb57d32b0f341379cc3c19e21910ea8d.zip
Added a speed feature use_square_partition_only
This commit adds a speed feature where only squared partition are evaluated in partition picking. Enable this feature in cpu-used 2 reduces encoding time by ~30%. loss of compression: -0.9% on cif set -1.23% on stdhd Change-Id: Ia6fad11210f0b78365abb889f9245604513be5b9
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c3
-rw-r--r--vp9/encoder/vp9_onyx_if.c15
-rw-r--r--vp9/encoder/vp9_onyx_int.h1
3 files changed, 11 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 2c833ab53..d3bcb5a3f 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1488,7 +1488,8 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
*(get_sb_partitioning(x, bsize)) = bsize;
}
}
- if (!cpi->sf.less_rectangular_check || !larger_is_better) {
+ if (!cpi->sf.use_square_partition_only &&
+ (!cpi->sf.less_rectangular_check ||!larger_is_better)) {
// PARTITION_HORZ
if (bsize >= BLOCK_SIZE_SB8X8 && mi_col + (ms >> 1) < cm->mi_cols) {
int r2, r = 0;
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 326572648..4c6c34b79 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -709,6 +709,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->partition_by_variance = 0;
sf->use_one_partition_size_always = 0;
sf->less_rectangular_check = 0;
+ sf->use_square_partition_only = 0;
sf->use_partitions_less_than = 0;
sf->less_than_block_size = BLOCK_SIZE_MB16X16;
sf->use_partitions_greater_than = 0;
@@ -749,25 +750,25 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
cpi->common.intra_only ||
cpi->common.show_frame == 0) ?
USE_FULL_RD :
- USE_LARGESTINTRA);
+ USE_LARGESTALL);
+ sf->conditional_oblique_intramodes = 1;
sf->disable_splitmv =
(MIN(cpi->common.width, cpi->common.height) >= 720)? 1 : 0;
- sf->conditional_oblique_intramodes = 1;
+ sf->use_square_partition_only = !(cpi->common.frame_type == KEY_FRAME ||
+ cpi->common.intra_only ||
+ cpi->common.show_frame == 0);
}
if (speed == 2) {
sf->adjust_thresholds_by_speed = 1;
sf->less_rectangular_check = 1;
+ sf->use_square_partition_only = 1;
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;
sf->reduce_first_step_size = 1;
sf->optimize_coefficients = 0;
sf->use_lastframe_partitioning = 1;
sf->adjust_partitioning_from_last_frame = 1;
sf->last_partitioning_redo_frequency = 3;
- sf->tx_size_search_method = ((cpi->common.frame_type == KEY_FRAME ||
- cpi->common.intra_only ||
- cpi->common.show_frame == 0) ?
- USE_FULL_RD :
- USE_LARGESTALL);
+ sf->tx_size_search_method = USE_LARGESTALL;
sf->conditional_oblique_intramodes = 1;
}
if (speed == 3) {
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index c947fe4a4..d325896b3 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -234,6 +234,7 @@ typedef struct {
int partition_by_variance;
int use_one_partition_size_always;
int less_rectangular_check;
+ int use_square_partition_only;
BLOCK_SIZE_TYPE always_this_block_size;
int use_partitions_greater_than;
BLOCK_SIZE_TYPE greater_than_block_size;