[non-normative] Change default build settings This patch changes the default build settings to disable both multi-threading and SIMD on the normative branch, as requested by the AOMedia Codec Working Group. Change-Id: If7971d3b9d276b8dd5e189dd950697387fddfa72
diff --git a/CMakeLists.txt b/CMakeLists.txt index 12b7cc5..e3c8591 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -18,6 +18,12 @@ endif() endif() +if(NOT AOM_TARGET_CPU) + set(AOM_TARGET_CPU generic) + message("Forcing generic build for normative branch; set AOM_TARGET_CPU to " + "the target CPU type to allow for an optimized build.") +endif() + option(ENABLE_CCACHE "Enable ccache support." OFF) option(ENABLE_DECODE_PERF_TESTS "Enables decoder performance tests" OFF) option(ENABLE_DISTCC "Enable distcc support." OFF)
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake index 36ca34e..5113cb3 100644 --- a/build/cmake/aom_config_defaults.cmake +++ b/build/cmake/aom_config_defaults.cmake
@@ -59,7 +59,7 @@ set(CONFIG_GPROF 0 CACHE NUMBER "Enable gprof support.") set(CONFIG_LIBYUV 1 CACHE NUMBER "Enables libyuv scaling/conversion support.") set(CONFIG_MSVS 0 CACHE NUMBER "Building with MS Visual Studio (detected).") -set(CONFIG_MULTITHREAD 1 CACHE NUMBER "Multithread support.") +set(CONFIG_MULTITHREAD 0 CACHE NUMBER "No multithread support.") set(CONFIG_OS_SUPPORT 0 CACHE NUMBER "Internal flag.") set(CONFIG_PIC 0 CACHE NUMBER "Build with PIC enabled.") set(CONFIG_RUNTIME_CPU_DETECT 1 CACHE NUMBER "Runtime CPU detection support.")
diff --git a/test/av1_round_shift_array_test.cc b/test/av1_round_shift_array_test.cc index 825d134..67ec12d 100644 --- a/test/av1_round_shift_array_test.cc +++ b/test/av1_round_shift_array_test.cc
@@ -27,9 +27,9 @@ typedef void (*comp_round_shift_array_func)(int32_t *arr, int size, int bit); -const int kValidBitCheck[] = { - -4, -3, -2, -1, 0, 1, 2, 3, 4, -}; +#if HAVE_SSE4_1 || HAVE_NEON + const int kValidBitCheck[] = {-4, -3, -2, -1, 0, 1, 2, 3, 4}; +#endif typedef ::testing::tuple<comp_round_shift_array_func, BLOCK_SIZE, int> CompRoundShiftParam;
diff --git a/test/decode_multithreaded_test.cc b/test/decode_multithreaded_test.cc index ed9a9ce..3cefb4b 100644 --- a/test/decode_multithreaded_test.cc +++ b/test/decode_multithreaded_test.cc
@@ -134,21 +134,25 @@ // and multi thread. Ensure that the MD5 of the output in both cases // is identical. If so, the test passes. TEST_P(AV1DecodeMultiThreadedTest, MD5Match) { +#if CONFIG_MULTITHREAD cfg_.large_scale_tile = 0; single_thread_dec_->Control(AV1_SET_TILE_MODE, 0); for (int i = 0; i < kNumMultiThreadDecoders; ++i) multi_thread_dec_[i]->Control(AV1_SET_TILE_MODE, 0); DoTest(); +#endif } class AV1DecodeMultiThreadedTestLarge : public AV1DecodeMultiThreadedTest {}; TEST_P(AV1DecodeMultiThreadedTestLarge, MD5Match) { +#if CONFIG_MULTITHREAD cfg_.large_scale_tile = 0; single_thread_dec_->Control(AV1_SET_TILE_MODE, 0); for (int i = 0; i < kNumMultiThreadDecoders; ++i) multi_thread_dec_[i]->Control(AV1_SET_TILE_MODE, 0); DoTest(); +#endif } // TODO(ranjit): More tests have to be added using pre-generated MD5. @@ -163,12 +167,14 @@ class AV1DecodeMultiThreadedLSTestLarge : public AV1DecodeMultiThreadedTestLarge {}; -TEST_P(AV1DecodeMultiThreadedLSTestLarge, DISABLED_MD5Match) { +TEST_P(AV1DecodeMultiThreadedLSTestLarge, MD5Match) { +#if CONFIG_MULTITHREAD cfg_.large_scale_tile = 1; single_thread_dec_->Control(AV1_SET_TILE_MODE, 1); for (int i = 0; i < kNumMultiThreadDecoders; ++i) multi_thread_dec_[i]->Control(AV1_SET_TILE_MODE, 1); DoTest(); +#endif } AV1_INSTANTIATE_TEST_CASE(AV1DecodeMultiThreadedLSTestLarge,
diff --git a/test/ethread_test.cc b/test/ethread_test.cc index 3dcc2a7..871d66b 100644 --- a/test/ethread_test.cc +++ b/test/ethread_test.cc
@@ -160,17 +160,21 @@ }; TEST_P(AVxEncoderThreadTest, EncoderResultTest) { +#if CONFIG_MULTITHREAD cfg_.large_scale_tile = 0; decoder_->Control(AV1_SET_TILE_MODE, 0); DoTest(); +#endif } class AVxEncoderThreadTestLarge : public AVxEncoderThreadTest {}; TEST_P(AVxEncoderThreadTestLarge, EncoderResultTest) { +#if CONFIG_MULTITHREAD cfg_.large_scale_tile = 0; decoder_->Control(AV1_SET_TILE_MODE, 0); DoTest(); +#endif } // For AV1, only test speed 0 to 3.