Simplify partition_search_breakout_dist_thr related code
partition_search_breakout_dist_thr threshold/speed feature
was corresponding to a block of size 64x64. Hence this
threshold was multiplied by 4 in
av1_set_speed_features_framesize_independent() to map to
maximum block size of 128x128. However, similar scaling
was not present in
av1_set_speed_features_framesize_dependent(). In this CL,
the scaling code is removed and the thresholds are modified
based on the resolution for speed=5 and 6 presets to
account for multiplication by 4.
STATS_CHANGED for --good usage
Change-Id: I02110c43e7f0908c7312e24953852a036b8988e3
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index e1f280d..e31e8bd 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -806,6 +806,7 @@
if (!is_480p_or_larger) {
sf->tx_sf.tx_type_search.fast_inter_tx_type_prob_thresh =
boosted ? INT_MAX : 250;
+ sf->part_sf.partition_search_breakout_dist_thr = (1 << 26);
}
if (is_480p_or_lesser) {
@@ -840,8 +841,10 @@
if (is_720p_or_larger) {
sf->part_sf.use_square_partition_only_threshold = BLOCK_32X32;
+ sf->part_sf.partition_search_breakout_dist_thr = (1 << 28);
} else {
sf->part_sf.use_square_partition_only_threshold = BLOCK_16X16;
+ sf->part_sf.partition_search_breakout_dist_thr = (1 << 26);
}
if (is_720p_or_larger) {
@@ -2167,13 +2170,6 @@
(sf->inter_sf.disable_interintra_wedge_var_thresh != UINT_MAX);
}
- // sf->part_sf.partition_search_breakout_dist_thr is set assuming max 64x64
- // blocks. Normalise this if the blocks are bigger.
- if (MAX_SB_SIZE_LOG2 > 6) {
- sf->part_sf.partition_search_breakout_dist_thr <<=
- 2 * (MAX_SB_SIZE_LOG2 - 6);
- }
-
const int mesh_speed = AOMMIN(speed, MAX_MESH_SPEED);
for (i = 0; i < MAX_MESH_STEP; ++i) {
sf->mv_sf.mesh_patterns[i].range =