diff options
author | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
commit | d4dbf19f6b0181ee78034bfe4caf189d1c016998 (patch) | |
tree | 47d5d28d2ab770a10e6c48788725c51dffeb84a9 /src/threading_strategy_test.cc | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.gz libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.bz2 libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.zip |
New upstream version 0.18.0
Diffstat (limited to 'src/threading_strategy_test.cc')
-rw-r--r-- | src/threading_strategy_test.cc | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/threading_strategy_test.cc b/src/threading_strategy_test.cc index 2a7a781..beea36f 100644 --- a/src/threading_strategy_test.cc +++ b/src/threading_strategy_test.cc @@ -99,7 +99,14 @@ TEST_F(ThreadingStrategyTest, MultipleCalls) { ASSERT_TRUE(strategy_.Reset(frame_header_, 16)); EXPECT_NE(strategy_.tile_thread_pool(), nullptr); for (int i = 0; i < 8; ++i) { - EXPECT_NE(strategy_.row_thread_pool(i), nullptr); + // See ThreadingStrategy::Reset(). +#if defined(__ANDROID__) + if (i >= 4) { + EXPECT_EQ(strategy_.row_thread_pool(i), nullptr) << "i = " << i; + continue; + } +#endif + EXPECT_NE(strategy_.row_thread_pool(i), nullptr) << "i = " << i; } EXPECT_NE(strategy_.post_filter_thread_pool(), nullptr); @@ -120,11 +127,18 @@ TEST_F(ThreadingStrategyTest, MultipleCalls) { EXPECT_NE(strategy_.tile_thread_pool(), nullptr); // First two tiles will get 1 thread each. for (int i = 0; i < 2; ++i) { - EXPECT_NE(strategy_.row_thread_pool(i), nullptr); + // See ThreadingStrategy::Reset(). +#if defined(__ANDROID__) + if (i == 1) { + EXPECT_EQ(strategy_.row_thread_pool(i), nullptr) << "i = " << i; + continue; + } +#endif + EXPECT_NE(strategy_.row_thread_pool(i), nullptr) << "i = " << i; } // All the other row threads must be reset. for (int i = 2; i < 8; ++i) { - EXPECT_EQ(strategy_.row_thread_pool(i), nullptr); + EXPECT_EQ(strategy_.row_thread_pool(i), nullptr) << "i = " << i; } EXPECT_NE(strategy_.post_filter_thread_pool(), nullptr); @@ -153,6 +167,13 @@ TEST_F(ThreadingStrategyTest, MultipleCalls2) { ASSERT_TRUE(strategy_.Reset(frame_header_, 4)); EXPECT_NE(strategy_.tile_thread_pool(), nullptr); for (int i = 0; i < 2; ++i) { + // See ThreadingStrategy::Reset(). +#if defined(__ANDROID__) + if (i == 1) { + EXPECT_EQ(strategy_.row_thread_pool(i), nullptr) << "i = " << i; + continue; + } +#endif EXPECT_NE(strategy_.row_thread_pool(i), nullptr); } for (int i = 2; i < 8; ++i) { |