Disable speed features temporarily for enc row-mt
Speed features - adaptive_rd_threshold and inter_mode_rd_model_estimation
have been disabled temporarily for row based multi-threading in encoder.
Also, checks are added for exhaustive search features which would be
temporarily disabled for enc row-mt in future patches.
STATS_CHANGED
Change-Id: I90afdba0b220d78d252a8b0110c26982ceaf5c42
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 8f6de9b..4f3c4e2 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -1897,7 +1897,7 @@
int baseline_interval_divisor;
// Keep track of number of exhaustive calls (this frame in this thread).
- ++(*x->ex_search_count_ptr);
+ if (x->ex_search_count_ptr != NULL) ++(*x->ex_search_count_ptr);
// Trap illegal values for interval and range for this function.
if ((range < MIN_RANGE) || (range > MAX_RANGE) || (interval < MIN_INTERVAL) ||
@@ -2117,13 +2117,16 @@
#define MIN_EX_SEARCH_LIMIT 128
static int is_exhaustive_allowed(const AV1_COMP *const cpi, MACROBLOCK *x) {
const SPEED_FEATURES *const sf = &cpi->sf;
- const int max_ex =
- AOMMAX(MIN_EX_SEARCH_LIMIT,
- (*x->m_search_count_ptr * sf->max_exaustive_pct) / 100);
-
- return sf->allow_exhaustive_searches &&
- (sf->exhaustive_searches_thresh < INT_MAX) &&
- (*x->ex_search_count_ptr <= max_ex) && !cpi->rc.is_src_frame_alt_ref;
+ int is_allowed = sf->allow_exhaustive_searches &&
+ (sf->exhaustive_searches_thresh < INT_MAX) &&
+ !cpi->rc.is_src_frame_alt_ref;
+ if (x->m_search_count_ptr != NULL && x->ex_search_count_ptr != NULL) {
+ const int max_ex =
+ AOMMAX(MIN_EX_SEARCH_LIMIT,
+ (*x->m_search_count_ptr * sf->max_exaustive_pct) / 100);
+ is_allowed = *x->ex_search_count_ptr <= max_ex && is_allowed;
+ }
+ return is_allowed;
}
int av1_full_pixel_search(const AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
@@ -2144,7 +2147,7 @@
}
// Keep track of number of searches (this frame in this thread).
- ++(*x->m_search_count_ptr);
+ if (x->m_search_count_ptr != NULL) ++(*x->m_search_count_ptr);
switch (method) {
case FAST_DIAMOND:
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 797ad80..537e103 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -566,4 +566,8 @@
if (cpi->oxcf.using_dist_8x8) x->min_partition_size = BLOCK_8X8;
#endif // CONFIG_DIST_8X8
+ if (cpi->row_mt == 1) {
+ sf->adaptive_rd_thresh = 0;
+ sf->inter_mode_rd_model_estimation = 0;
+ }
}