Create field trial for vp8 number of thread on iOS.

Without the added preprocessor check, iOS device will be using the desktop logic to determine the number of thread. This put iPhone 8 and iPhone X to use 3 threads and all other iPhones after iPhone 5 to use a single thread.
This CL added a preprocessor for WEBRTC_IOS to have it own thread number calculation logic. In which, the maximum number of thread is fetched from a field_trial and capped by the number of CPU available on the device.

Bug: webrtc:10005
Change-Id: I8c6257fcbf85b07bc986b5f733dbabb3feee37f7
Reviewed-on: https://webrtc-review.googlesource.com/c/110941
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25997}
This commit is contained in:
Jiawei Ou
2018-12-11 14:25:25 -08:00
committed by Commit Bot
parent 1dac6d8839
commit aa7bc7e0bb
4 changed files with 28 additions and 4 deletions

View File

@ -342,8 +342,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_TemporalLayersVP8) {
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
}
// TODO(webrtc:9267): Fails on iOS
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
#if defined(WEBRTC_ANDROID)
#define MAYBE_MultiresVP8 DISABLED_MultiresVP8
#else
#define MAYBE_MultiresVP8 MultiresVP8
@ -360,9 +359,13 @@ TEST(VideoCodecTestLibvpx, MAYBE_MultiresVP8) {
auto fixture = CreateVideoCodecTestFixture(config);
std::vector<RateProfile> rate_profiles = {{1500, 30, config.num_frames}};
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64)
std::vector<RateControlThresholds> rc_thresholds = {
{3.5, 1.04, 6, 0.18, 0.14, 0.07, 0, 1}};
#else
std::vector<RateControlThresholds> rc_thresholds = {
{5, 1, 5, 1, 0.3, 0.1, 0, 1}};
#endif
std::vector<QualityThresholds> quality_thresholds = {{34, 32, 0.90, 0.88}};
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);