Minor change in motion search method setting Neutral coding performance with a small encoder time reduction (<= 0.2%) at speed 2. Bug: 505128814 STATS_CHANGED Change-Id: I3809d760de809298bd04c0c43e0fd2b32a829c0f
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index ae0e995..4f7d308 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c
@@ -2973,9 +2973,9 @@ // For < 720p resolutions: if (!is_720p_or_larger) { // For < 720p resolutions: - static const int ms_qindex_thresh[3][2] = { { 200, 70 }, - { 170, 50 }, - { 170, 40 } }; + const int ms_qindex_thresh[3][2] = { { 200, 70 }, + { 170, 50 }, + { 170, 40 } }; const int qindex_thresh1 = ms_qindex_thresh[aggr][0]; const int qindex_thresh2 = ms_qindex_thresh[aggr][1]; if (cm->quant_params.base_qindex > qindex_thresh1) { @@ -2986,17 +2986,22 @@ } } else { // For >= 720p resolutions: - static const int ms_qindex_thresh[3][2] = { { MAXQ, 200 }, - { MAXQ, -1 }, - { 200, 40 } }; + const int ms_qindex_thresh[3][2] = { { MAXQ, 200 }, + { MAXQ, -1 }, + { 200, -1 } }; + const SEARCH_METHODS motion_search_method[3][2] = { + { NSTEP_8PT, NSTEP_8PT }, + { NSTEP_8PT, DIAMOND }, + { NSTEP_8PT, DIAMOND } + }; const int qindex_thresh1 = ms_qindex_thresh[aggr][0]; const int qindex_thresh2 = ms_qindex_thresh[aggr][1]; if (cm->quant_params.base_qindex > qindex_thresh1) { sf->mv_sf.search_method = DIAMOND; sf->tpl_sf.search_method = DIAMOND; } else if (cm->quant_params.base_qindex > qindex_thresh2) { - sf->mv_sf.search_method = NSTEP_8PT; - sf->tpl_sf.search_method = DIAMOND; + sf->mv_sf.search_method = motion_search_method[aggr][0]; + sf->tpl_sf.search_method = motion_search_method[aggr][1]; } } }