From 6375ef7dfb3db493a7cd649a588d5ed91db9b2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1ri=20Tristan=20Helgason?= Date: Thu, 1 Mar 2018 10:54:27 -0800 Subject: [PATCH] Enable VideoProcessorIntegrationTest on devices. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These tests cannot run on simulators but should be enabled on real device bots in order to catch regressions or crashes in the iOS codecs. Bug: webrtc:8950 Change-Id: I8e877aa4368683073fdb4586cd6f4add4a1284ad Reviewed-on: https://webrtc-review.googlesource.com/59040 Commit-Queue: Kári Helgason Reviewed-by: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#22283} --- ...oprocessor_integrationtest_videotoolbox.cc | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc index 2a861072b9..165573f684 100644 --- a/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc +++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc @@ -35,27 +35,30 @@ class VideoProcessorIntegrationTestVideoToolbox } }; -// Since we don't currently run the iOS tests on physical devices on the bots, -// the tests are disabled. +// HW codecs don't work on simulators. Only run these tests on device. +#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +#define MAYBE_TEST_F TEST_F +#else +#define MAYBE_TEST_F(s, name) TEST_F(s, DISABLED_##name) +#endif -TEST_F(VideoProcessorIntegrationTestVideoToolbox, - DISABLED_ForemanCif500kbpsH264CBP) { +// TODO(kthelgason): Use RC Thresholds when the internal bitrateAdjuster is no +// longer in use. +MAYBE_TEST_F(VideoProcessorIntegrationTestVideoToolbox, + ForemanCif500kbpsH264CBP) { config_.SetCodecSettings(kVideoCodecH264, 1, 1, 1, false, false, false, false, 352, 288); std::vector rate_profiles = {{500, 30, kForemanNumFrames}}; - std::vector rc_thresholds = { - {5, 1, 0, 0.1, 0.2, 0.1, 0, 1}}; + std::vector quality_thresholds = {{33, 29, 0.9, 0.82}}; - std::vector quality_thresholds = {{37, 35, 0.93, 0.91}}; - - ProcessFramesAndMaybeVerify(rate_profiles, &rc_thresholds, + ProcessFramesAndMaybeVerify(rate_profiles, nullptr, &quality_thresholds, nullptr, nullptr); } -TEST_F(VideoProcessorIntegrationTestVideoToolbox, - DISABLED_ForemanCif500kbpsH264CHP) { +MAYBE_TEST_F(VideoProcessorIntegrationTestVideoToolbox, + ForemanCif500kbpsH264CHP) { ScopedFieldTrials override_field_trials("WebRTC-H264HighProfile/Enabled/"); config_.h264_codec_settings.profile = H264::kProfileConstrainedHigh; @@ -64,12 +67,9 @@ TEST_F(VideoProcessorIntegrationTestVideoToolbox, std::vector rate_profiles = {{500, 30, kForemanNumFrames}}; - std::vector rc_thresholds = { - {5, 1, 0, 0.1, 0.2, 0.1, 0, 1}}; + std::vector quality_thresholds = {{33, 30, 0.91, 0.83}}; - std::vector quality_thresholds = {{37, 35, 0.93, 0.91}}; - - ProcessFramesAndMaybeVerify(rate_profiles, &rc_thresholds, + ProcessFramesAndMaybeVerify(rate_profiles, nullptr, &quality_thresholds, nullptr, nullptr); }