summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2020-04-17 11:58:01 -0700
committerMarco Paniconi <marpan@google.com>2020-04-19 20:37:25 -0700
commit62af22b5e57ed1e382ef0994183824a03f698797 (patch)
tree8d510cee81221ad50c1766b5c4fc737912f6da9c /vp9
parent686e12674fa723771c3865e38bdd1b20121a9947 (diff)
downloadlibvpx-62af22b5e57ed1e382ef0994183824a03f698797.tar
libvpx-62af22b5e57ed1e382ef0994183824a03f698797.tar.gz
libvpx-62af22b5e57ed1e382ef0994183824a03f698797.tar.bz2
libvpx-62af22b5e57ed1e382ef0994183824a03f698797.zip
vp9-rtc: Some speedups to speed 5 real-time mode
Enable use_source_sad at speed 5 and use it to condition min_partition_size in nonrd_select_partition. Also disable checking rectangular partitions in nonrd_pick_partition for speed >= 5. ~5-8% speedup for HD clip on x86. bdrate loss of ~1% on rtc set. Change-Id: Ia643b34a51191e3929a443de77e271561e7c877d
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c9
-rw-r--r--vp9/encoder/vp9_speed_features.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 13f9a1fbd..e73606913 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -5086,8 +5086,8 @@ static void nonrd_pick_partition(VP9_COMP *cpi, ThreadData *td,
(void)*tp_orig;
- // Avoid checking for rectangular partitions for speed >= 6.
- if (cpi->oxcf.speed >= 6) do_rect = 0;
+ // Avoid checking for rectangular partitions for speed >= 5.
+ if (cpi->oxcf.speed >= 5) do_rect = 0;
assert(num_8x8_blocks_wide_lookup[bsize] ==
num_8x8_blocks_high_lookup[bsize]);
@@ -5345,6 +5345,11 @@ static void nonrd_select_partition(VP9_COMP *cpi, ThreadData *td,
subsize >= subsize_ref) {
x->max_partition_size = BLOCK_32X32;
x->min_partition_size = BLOCK_8X8;
+ if (subsize_ref == BLOCK_16X16 && !xd->mi[0]->segment_id &&
+ x->content_state_sb != kVeryHighSad &&
+ x->content_state_sb != kLowVarHighSumdiff &&
+ x->content_state_sb != kHighSadHighSumdiff)
+ x->min_partition_size = BLOCK_16X16;
nonrd_pick_partition(cpi, td, tile_data, tp, mi_row, mi_col, bsize, rd_cost,
0, INT64_MAX, pc_tree);
} else if (bsize == BLOCK_16X16 && partition != PARTITION_NONE) {
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index dea17e124..5bbe54923 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -634,6 +634,7 @@ static void set_rt_speed_feature_framesize_independent(
sf->use_compound_nonrd_pickmode = 1;
}
if (cm->width * cm->height > 1280 * 720) sf->cb_pred_filter_search = 1;
+ if (!cpi->external_resize) sf->use_source_sad = 1;
}
if (speed >= 6) {
@@ -646,8 +647,6 @@ static void set_rt_speed_feature_framesize_independent(
sf->mv.reduce_first_step_size = 1;
sf->skip_encode_sb = 0;
- if (!cpi->external_resize) sf->use_source_sad = 1;
-
if (sf->use_source_sad) {
sf->adapt_partition_source_sad = 1;
sf->adapt_partition_thresh =