From 508ef2a6e377b74ab346bf4d5b4d92ab507d1bd3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 26 Jun 2017 19:18:14 -0700 Subject: test_vector_test: rm ref to VPX_CODEC_USE_FRAME_THREADING this was made a no-op in: 01d23109a vp9: make VPX_CODEC_USE_FRAME_THREADING a no-op and the test hitting this branch has been disabled since: 6ab0870d4 disable VP9MultiThreadedFrameParallel tests rename the test to VP9MultiThreaded to exercise the tile-based threading BUG=webm:1395 Change-Id: I35564a75eb5a7d7f7ccb923133b1b07295201f4c --- test/test_vector_test.cc | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) (limited to 'test/test_vector_test.cc') diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc index 14c509d5c..01b651fdd 100644 --- a/test/test_vector_test.cc +++ b/test/test_vector_test.cc @@ -28,13 +28,10 @@ namespace { -enum DecodeMode { kSerialMode, kFrameParallelMode }; +const int kThreads = 0; +const int kFileName = 1; -const int kDecodeMode = 0; -const int kThreads = 1; -const int kFileName = 2; - -typedef std::tr1::tuple DecodeParam; +typedef std::tr1::tuple DecodeParam; class TestVectorTest : public ::libvpx_test::DecoderTest, public ::libvpx_test::CodecTestWithParam { @@ -92,29 +89,14 @@ class TestVectorTest : public ::libvpx_test::DecoderTest, TEST_P(TestVectorTest, MD5Match) { const DecodeParam input = GET_PARAM(1); const std::string filename = std::tr1::get(input); - const int threads = std::tr1::get(input); - const int mode = std::tr1::get(input); vpx_codec_flags_t flags = 0; vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); char str[256]; - if (mode == kFrameParallelMode) { - flags |= VPX_CODEC_USE_FRAME_THREADING; -#if CONFIG_VP9_DECODER - // TODO(hkuang): Fix frame parallel decode bug. See issue 1086. - if (resize_clips_.find(filename) != resize_clips_.end()) { - printf("Skipping the test file: %s, due to frame parallel decode bug.\n", - filename.c_str()); - return; - } -#endif - } - - cfg.threads = threads; + cfg.threads = std::tr1::get(input); - snprintf(str, sizeof(str) / sizeof(str[0]) - 1, - "file: %s mode: %s threads: %d", filename.c_str(), - mode == 0 ? "Serial" : "Parallel", threads); + snprintf(str, sizeof(str) / sizeof(str[0]) - 1, "file: %s threads: %d", + filename.c_str(), cfg.threads); SCOPED_TRACE(str); // Open compressed video file. @@ -145,13 +127,10 @@ TEST_P(TestVectorTest, MD5Match) { ASSERT_NO_FATAL_FAILURE(RunLoop(video.get(), cfg)); } -// Test VP8 decode in serial mode with single thread. -// NOTE: VP8 only support serial mode. #if CONFIG_VP8_DECODER VP8_INSTANTIATE_TEST_CASE( TestVectorTest, ::testing::Combine( - ::testing::Values(0), // Serial Mode. ::testing::Values(1), // Single thread. ::testing::ValuesIn(libvpx_test::kVP8TestVectors, libvpx_test::kVP8TestVectors + @@ -164,7 +143,6 @@ INSTANTIATE_TEST_CASE_P( ::testing::Values( static_cast(&libvpx_test::kVP8)), ::testing::Combine( - ::testing::Values(0), // Serial Mode. ::testing::Range(1, 8), // With 1 ~ 8 threads. ::testing::ValuesIn(libvpx_test::kVP8TestVectors, libvpx_test::kVP8TestVectors + @@ -172,25 +150,21 @@ INSTANTIATE_TEST_CASE_P( #endif // CONFIG_VP8_DECODER -// Test VP9 decode in serial mode with single thread. #if CONFIG_VP9_DECODER VP9_INSTANTIATE_TEST_CASE( TestVectorTest, ::testing::Combine( - ::testing::Values(0), // Serial Mode. ::testing::Values(1), // Single thread. ::testing::ValuesIn(libvpx_test::kVP9TestVectors, libvpx_test::kVP9TestVectors + libvpx_test::kNumVP9TestVectors))); -// Test VP9 decode in frame parallel mode with different number of threads. INSTANTIATE_TEST_CASE_P( - DISABLED_VP9MultiThreadedFrameParallel, TestVectorTest, + VP9MultiThreaded, TestVectorTest, ::testing::Combine( ::testing::Values( static_cast(&libvpx_test::kVP9)), ::testing::Combine( - ::testing::Values(1), // Frame Parallel mode. ::testing::Range(2, 9), // With 2 ~ 8 threads. ::testing::ValuesIn(libvpx_test::kVP9TestVectors, libvpx_test::kVP9TestVectors + -- cgit v1.2.3