diff options
author | Hui Su <huisu@google.com> | 2018-10-02 14:40:27 -0700 |
---|---|---|
committer | Hui Su <huisu@google.com> | 2018-10-05 18:45:49 +0000 |
commit | b25c7515a02d34d7e8a34c2982cd4da9ccdfc33a (patch) | |
tree | b4323e8ca87e8e386398b4da5fc9aee41d072f76 /vp9 | |
parent | 936b59ef0aef88f92ab1260eb4a86ac1b370b5f2 (diff) | |
download | libvpx-b25c7515a02d34d7e8a34c2982cd4da9ccdfc33a.tar libvpx-b25c7515a02d34d7e8a34c2982cd4da9ccdfc33a.tar.gz libvpx-b25c7515a02d34d7e8a34c2982cd4da9ccdfc33a.tar.bz2 libvpx-b25c7515a02d34d7e8a34c2982cd4da9ccdfc33a.zip |
Turn on ml_var_partition_pruning for speed 1
Coding loss:
lowres 0.08%; midres 0.11%; hdres 0.07%
Average encoding speedup is about 6%.
Change-Id: I950291cf0f1d610bcdedeb150bcbefea2f5579bc
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 23 | ||||
-rw-r--r-- | vp9/encoder/vp9_speed_features.c | 3 |
2 files changed, 13 insertions, 13 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index ad30951af..72dc13797 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3405,30 +3405,29 @@ static void ml_predict_var_rd_paritioning(VP9_COMP *cpi, MACROBLOCK *x, MODE_INFO *mi = xd->mi[0]; const NN_CONFIG *nn_config = NULL; DECLARE_ALIGNED(16, uint8_t, pred_buf[64 * 64]); + const int speed = cpi->oxcf.speed; int i; - float thresh_low = -1.0f; - float thresh_high = 0.0f; + float thresh = 0.0f; switch (bsize) { case BLOCK_64X64: nn_config = &vp9_var_rd_part_nnconfig_64; - thresh_low = -3.0f; - thresh_high = 3.0f; + thresh = speed > 0 ? 3.5f : 3.0f; break; case BLOCK_32X32: nn_config = &vp9_var_rd_part_nnconfig_32; - thresh_low = -3.0; - thresh_high = 3.0f; + thresh = speed > 0 ? 3.5f : 3.0f; break; case BLOCK_16X16: nn_config = &vp9_var_rd_part_nnconfig_16; - thresh_low = -4.0; - thresh_high = 4.0f; + thresh = speed > 0 ? 3.5f : 4.0f; break; case BLOCK_8X8: nn_config = &vp9_var_rd_part_nnconfig_8; - thresh_low = -2.0; - thresh_high = 2.0f; + if (cm->width >= 720 && cm->height >= 720) + thresh = speed > 0 ? 2.5f : 2.0f; + else + thresh = speed > 0 ? 3.5f : 2.0f; break; default: assert(0 && "Unexpected block size."); return; } @@ -3520,8 +3519,8 @@ static void ml_predict_var_rd_paritioning(VP9_COMP *cpi, MACROBLOCK *x, // partition is better than the non-split partition. So if the score is // high enough, we skip the none-split partition search; if the score is // low enough, we skip the split partition search. - if (score > thresh_high) *none = 0; - if (score < thresh_low) *split = 0; + if (score > thresh) *none = 0; + if (score < -thresh) *split = 0; } } #undef FEATURES diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 44909239d..8bf9909dc 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -242,7 +242,7 @@ static void set_good_speed_feature_framesize_independent(VP9_COMP *cpi, if (speed >= 1) { sf->enable_tpl_model = 0; - sf->ml_var_partition_pruning = 0; + sf->ml_var_partition_pruning = !boosted; sf->ml_prune_rect_partition_threhold[1] = 200; sf->ml_prune_rect_partition_threhold[2] = 200; sf->ml_prune_rect_partition_threhold[3] = 200; @@ -291,6 +291,7 @@ static void set_good_speed_feature_framesize_independent(VP9_COMP *cpi, } if (speed >= 2) { + sf->ml_var_partition_pruning = 0; if (oxcf->vbr_corpus_complexity) sf->recode_loop = ALLOW_RECODE_FIRST; else |