From 769cd78ff25c8461d37ef9b3e8901395114d9d8e Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Mon, 31 Mar 2014 16:58:39 +0100 Subject: Add speed feature for recode tolerance. The new tolerance is a little higher than before (especially for kf/gf/arf) so this change gives an encode speed up for some clips up for speeds 0-2. Change-Id: I63f7d6c9cc11c7f58742f41e250dcd3eab1741eb --- vp9/encoder/vp9_speed_features.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 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 f09035077..6a437bf03 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -25,13 +25,6 @@ #define DISABLE_COMPOUND_SPLIT 0x18 #define LAST_AND_INTRA_SPLIT_ONLY 0x1E -// Intra only frames, golden frames (except alt ref overlays) and -// alt ref frames tend to be coded at a higher than ambient quality -static INLINE int frame_is_boosted(const VP9_COMP *cpi) { - return frame_is_intra_only(&cpi->common) || cpi->refresh_alt_ref_frame || - (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref); -} - static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm, SPEED_FEATURES *sf, @@ -44,7 +37,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, if (speed >= 1) { sf->use_square_partition_only = !frame_is_intra_only(cm); sf->less_rectangular_check = 1; - sf->tx_size_search_method = frame_is_boosted(cpi) + sf->tx_size_search_method = vp9_frame_is_boosted(cpi) ? USE_FULL_RD : USE_LARGESTALL; if (MIN(cm->width, cm->height) >= 720) @@ -68,7 +61,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, } // Additions or changes from speed 1 for speed >= 2. if (speed >= 2) { - sf->tx_size_search_method = frame_is_boosted(cpi) + sf->tx_size_search_method = vp9_frame_is_boosted(cpi) ? USE_FULL_RD : USE_LARGESTALL; if (MIN(cm->width, cm->height) >= 720) @@ -326,6 +319,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) { // to FIXED_PARTITION. sf->always_this_block_size = BLOCK_16X16; + // Recode loop tolerence %. + sf->recode_tolerance = 25; + switch (cpi->oxcf.mode) { case MODE_BESTQUALITY: case MODE_SECONDPASS_BEST: // This is the best quality mode. -- cgit v1.2.3