summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_speed_features.c
diff options
context:
space:
mode:
authorHui Su <huisu@google.com>2018-06-24 17:00:54 -0700
committerHui Su <huisu@google.com>2018-06-29 10:45:09 -0700
commite51daf90fd83d4cf0afcb402a5f6382ce817e5d2 (patch)
tree6169ae7901a83024201d43fbc4b2909286f79007 /vp9/encoder/vp9_speed_features.c
parentf7b368dc5a41d5be020d6b738142256b8725c786 (diff)
downloadlibvpx-e51daf90fd83d4cf0afcb402a5f6382ce817e5d2.tar
libvpx-e51daf90fd83d4cf0afcb402a5f6382ce817e5d2.tar.gz
libvpx-e51daf90fd83d4cf0afcb402a5f6382ce817e5d2.tar.bz2
libvpx-e51daf90fd83d4cf0afcb402a5f6382ce817e5d2.zip
Add partition breakout models for 720p resolution
Add partition search breakout models for 720p resolution, currently enabled only for speed 0. Compression performance change is neutral. Tested encoding speed over 20 720p clips: Speed gain(%) QP=55 QP=45 QP=35 max 22.1 20.3 29.8 average 10.3 9.1 11.4 Change-Id: I07499728bbc5b80035fc66fad882ea556c8d07f2
Diffstat (limited to 'vp9/encoder/vp9_speed_features.c')
-rw-r--r--vp9/encoder/vp9_speed_features.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 75401131f..e0948fb8e 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -61,9 +61,11 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
SPEED_FEATURES *sf,
int speed) {
VP9_COMMON *const cm = &cpi->common;
- const int is_480p_or_larger = VPXMIN(cm->width, cm->height) >= 480;
- const int is_720p_or_larger = VPXMIN(cm->width, cm->height) >= 720;
- const int is_2160p_or_larger = VPXMIN(cm->width, cm->height) >= 2160;
+ const int min_frame_size = VPXMIN(cm->width, cm->height);
+ const int is_480p_or_larger = min_frame_size >= 480;
+ const int is_720p_or_larger = min_frame_size >= 720;
+ const int is_1080p_or_larger = min_frame_size >= 1080;
+ const int is_2160p_or_larger = min_frame_size >= 2160;
// speed 0 features
sf->partition_search_breakout_thr.dist = (1 << 20);
@@ -75,11 +77,17 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
sf->ml_partition_search_early_termination = 1;
}
- if (!is_720p_or_larger) {
+ if (!is_1080p_or_larger) {
sf->use_ml_partition_search_breakout = 1;
- sf->ml_partition_search_breakout_thresh[0] = 2.5f;
- sf->ml_partition_search_breakout_thresh[1] = 1.5f;
- sf->ml_partition_search_breakout_thresh[2] = 1.5f;
+ if (is_720p_or_larger) {
+ sf->ml_partition_search_breakout_thresh[0] = 0.0f;
+ sf->ml_partition_search_breakout_thresh[1] = 0.0f;
+ sf->ml_partition_search_breakout_thresh[2] = 0.0f;
+ } else {
+ sf->ml_partition_search_breakout_thresh[0] = 2.5f;
+ sf->ml_partition_search_breakout_thresh[1] = 1.5f;
+ sf->ml_partition_search_breakout_thresh[2] = 1.5f;
+ }
}
if (speed >= 1) {
@@ -89,6 +97,7 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
sf->disable_split_mask =
cm->show_frame ? DISABLE_ALL_SPLIT : DISABLE_ALL_INTER_SPLIT;
sf->partition_search_breakout_thr.dist = (1 << 23);
+ sf->use_ml_partition_search_breakout = 0;
} else {
sf->disable_split_mask = DISABLE_COMPOUND_SPLIT;
sf->partition_search_breakout_thr.dist = (1 << 21);