From e51daf90fd83d4cf0afcb402a5f6382ce817e5d2 Mon Sep 17 00:00:00 2001 From: Hui Su Date: Sun, 24 Jun 2018 17:00:54 -0700 Subject: 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 --- vp9/encoder/vp9_speed_features.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'vp9/encoder/vp9_speed_features.c') 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); -- cgit v1.2.3