change CONFIG_DIST_8X8 default from 1 to 0.
Change the default and force CONFIG_DIST_8X8 to off in
multithread builds. The implementation allocates large
amounts of memory on the stack, which causes stack
overflows and crashes in worker threads on mac targets.
Crashes occur with or without aom_tune_metric set to
AOM_TUNE_DAALA_DIST.
BUG=aomedia:2076
Change-Id: I073237c3a8a1e37b603fbc5e2a73f9a8673ac645
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 0a7fd8a..4fa94d6 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2004,6 +2004,8 @@
txb_width, txb_height, visible_cols, visible_rows,
x->qindex);
}
+#else
+ (void)force_sse;
#endif
diff += ((blk_row * diff_stride + blk_col) << tx_size_wide_log2[0]);
return aom_sum_squares_2d_i16(diff, diff_stride, visible_cols, visible_rows);
@@ -4775,7 +4777,6 @@
MACROBLOCKD *const xd = &x->e_mbd;
const int max_blocks_high = max_block_high(xd, plane_bsize, 0);
const int max_blocks_wide = max_block_wide(xd, plane_bsize, 0);
- struct macroblock_plane *const p = &x->plane[0];
const TX_SIZE sub_txs = sub_tx_size_map[tx_size];
const int bsw = tx_size_wide_unit[sub_txs];
const int bsh = tx_size_high_unit[sub_txs];
@@ -4785,6 +4786,7 @@
int64_t tmp_rd = 0;
#if CONFIG_DIST_8X8
int sub8x8_eob[4] = { 0, 0, 0, 0 };
+ struct macroblock_plane *const p = &x->plane[0];
struct macroblockd_plane *const pd = &xd->plane[0];
#endif
split_rd_stats->rate = x->txfm_partition_cost[txfm_partition_ctx][1];
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 7e5c97e..2374124 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -119,7 +119,7 @@
set_aom_config_var(CONFIG_COLLECT_INTER_MODE_RD_STATS 1 NUMBER
"AV1 experiment flag.")
set_aom_config_var(CONFIG_COLLECT_RD_STATS 0 NUMBER "AV1 experiment flag.")
-set_aom_config_var(CONFIG_DIST_8X8 1 NUMBER "AV1 experiment flag.")
+set_aom_config_var(CONFIG_DIST_8X8 0 NUMBER "AV1 experiment flag.")
set_aom_config_var(CONFIG_ENTROPY_STATS 0 NUMBER "AV1 experiment flag.")
set_aom_config_var(CONFIG_FP_MB_STATS 0 NUMBER "AV1 experiment flag.")
set_aom_config_var(CONFIG_INTER_STATS_ONLY 0 NUMBER "AV1 experiment flag.")
diff --git a/build/cmake/aom_experiment_deps.cmake b/build/cmake/aom_experiment_deps.cmake
index e2c8102..0688704 100644
--- a/build/cmake/aom_experiment_deps.cmake
+++ b/build/cmake/aom_experiment_deps.cmake
@@ -25,4 +25,8 @@
change_config_and_warn(CONFIG_RD_DEBUG 0 CONFIG_JNT_COMP)
endif()
+ if(CONFIG_DIST_8X8 AND CONFIG_MULTITHREAD)
+ change_config_and_warn(CONFIG_DIST_8X8 0 CONFIG_MULTITHREAD)
+ endif()
+
endmacro()