From: Jerome Jiang Date: Mon, 13 May 2019 18:29:55 +0000 (-0700) Subject: Reland "vp9: Enable ml based partition for speed>=8 low res." X-Git-Tag: v1.8.1~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78c44e2dc26e383fdc54eb4bf406a76e52ea361e;p=platform%2Fupstream%2Flibvpx.git Reland "vp9: Enable ml based partition for speed>=8 low res." Disable in high bitdepth build. This reverts commit 152358da777d45613b386be3a116719b8b16bd6d. Change-Id: I9996d0963915ed4db0fde80c6290d91b3ce63719 --- diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index f3fb73e..df2afce 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -569,14 +569,6 @@ static void set_rt_speed_feature_framesize_independent( (frames_since_key % (sf->last_partitioning_redo_frequency << 1) == 1); sf->max_delta_qindex = is_keyframe ? 20 : 15; sf->partition_search_type = REFERENCE_PARTITION; - if (sf->nonrd_use_ml_partition) { - if (!frame_is_intra_only(cm) && cm->width >= 360 && cm->height >= 360) - sf->partition_search_type = ML_BASED_PARTITION; -#if CONFIG_VP9_HIGHBITDEPTH - if (cpi->Source->flags & YV12_FLAG_HIGHBITDEPTH) - sf->partition_search_type = REFERENCE_PARTITION; -#endif // CONFIG_VP9_HIGHBITDEPTH - } if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 && cpi->rc.is_src_frame_alt_ref) { sf->partition_search_type = VAR_BASED_PARTITION; @@ -641,10 +633,7 @@ static void set_rt_speed_feature_framesize_independent( sf->use_altref_onepass = 1; sf->use_compound_nonrd_pickmode = 1; } - - if (!sf->nonrd_use_ml_partition) - sf->partition_search_type = VAR_BASED_PARTITION; - + sf->partition_search_type = VAR_BASED_PARTITION; sf->mv.search_method = NSTEP; sf->mv.reduce_first_step_size = 1; sf->skip_encode_sb = 0; @@ -732,6 +721,14 @@ static void set_rt_speed_feature_framesize_independent( if (!cpi->use_svc) cpi->max_copied_frame = 4; if (cpi->row_mt && cpi->oxcf.max_threads > 1) sf->adaptive_rd_thresh_row_mt = 1; + // Enable ML based partition for low res. + if (!frame_is_intra_only(cm) && cm->width * cm->height <= 352 * 288) { + sf->nonrd_use_ml_partition = 1; + } +#if CONFIG_VP9_HIGHBITDEPTH + if (cpi->Source->flags & YV12_FLAG_HIGHBITDEPTH) + sf->nonrd_use_ml_partition = 0; +#endif if (content == VP9E_CONTENT_SCREEN) sf->mv.subpel_force_stop = HALF_PEL; // Only keep INTRA_DC mode for speed 8. if (!is_keyframe) { @@ -778,6 +775,9 @@ static void set_rt_speed_feature_framesize_independent( if (cm->width * cm->height >= 640 * 360) sf->variance_part_thresh_mult = 2; } + if (sf->nonrd_use_ml_partition) + sf->partition_search_type = ML_BASED_PARTITION; + if (sf->use_altref_onepass) { if (cpi->rc.is_src_frame_alt_ref && cm->frame_type != KEY_FRAME) { sf->partition_search_type = FIXED_PARTITION;