Revert "Reland of Add full stack tests for MediaCodec encoder (moved from Rietveld)."

This reverts commit 2666cf7eba4bdd697d59d0451a8f74a05d4d207e.

Reason for revert: On Lollipop Nexus 4, the 240p tests fail too.

Original change's description:
> Reland of Add full stack tests for MediaCodec encoder (moved from Rietveld).
> 
> * Add audio_ prefix to CallTest::{en,de}coder_factory_.
> * Let VideoQualityTest only instantiate encoders using encoder factories.
> * Add HW encoder factories to VideoQualityTest.
> * Add full stack tests:
>   - sqcif7 at  30 kbps: libvpx.
>   - 240p10 at 100 kbps: MediaCodec, libvpx, and MediaCodec+libvpx.
> 
> BUG=webrtc:8219
> TBR=asapersson@webrtc.org,kjellander@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> 
> Change-Id: I464409ac0d5276defa78c1bf66034c6cca717d74
> Reviewed-on: https://webrtc-review.googlesource.com/4740
> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20041}

TBR=kjellander@webrtc.org,brandtr@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,stefan@webrtc.org

Change-Id: If558b7fb86740658e50a6897d1eeeb72103a54ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8219
Reviewed-on: https://webrtc-review.googlesource.com/4900
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20044}
This commit is contained in:
Rasmus Brandt
2017-09-29 13:48:12 +00:00
committed by Commit Bot
parent f328282cbf
commit 310273459d
12 changed files with 187 additions and 477 deletions

View File

@ -477,8 +477,6 @@ if (rtc_include_tests) {
"resources/audio_coding/testfile32kHz.pcm", "resources/audio_coding/testfile32kHz.pcm",
"resources/ConferenceMotion_1280_720_50.yuv", "resources/ConferenceMotion_1280_720_50.yuv",
"resources/difficult_photo_1850_1110.yuv", "resources/difficult_photo_1850_1110.yuv",
"resources/foreman_128x96.yuv",
"resources/foreman_320x240.yuv",
"resources/foreman_cif.yuv", "resources/foreman_cif.yuv",
"resources/google-wifi-3mbps.rx", "resources/google-wifi-3mbps.rx",
"resources/paris_qcif.yuv", "resources/paris_qcif.yuv",
@ -515,13 +513,7 @@ if (rtc_include_tests) {
data = webrtc_perf_tests_resources data = webrtc_perf_tests_resources
if (is_android) { if (is_android) {
deps += [ deps += [ "//testing/android/native_test:native_test_native_code" ]
# Including Java classes seems only to be possible from rtc_test
# targets. Therefore we include this target here, instead of
# in video_full_stack_tests, where it is actually used.
"sdk/android:libjingle_peerconnection_java",
"//testing/android/native_test:native_test_native_code",
]
shard_timeout = 2700 shard_timeout = 2700
} }
if (is_ios) { if (is_ios) {

View File

@ -177,7 +177,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
FakeAudioDevice::CreatePulsedNoiseCapturer(256, 48000), FakeAudioDevice::CreatePulsedNoiseCapturer(256, 48000),
FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed); FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed);
EXPECT_EQ(0, voe_base->Init(fake_audio_device.get(), audio_processing.get(), EXPECT_EQ(0, voe_base->Init(fake_audio_device.get(), audio_processing.get(),
audio_decoder_factory_)); decoder_factory_));
VoEBase::ChannelConfig config; VoEBase::ChannelConfig config;
config.enable_voice_pacing = true; config.enable_voice_pacing = true;
send_channel_id = voe_base->CreateChannel(config); send_channel_id = voe_base->CreateChannel(config);
@ -250,7 +250,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
audio_recv_config.rtp.local_ssrc = kAudioRecvSsrc; audio_recv_config.rtp.local_ssrc = kAudioRecvSsrc;
audio_recv_config.voe_channel_id = recv_channel_id; audio_recv_config.voe_channel_id = recv_channel_id;
audio_recv_config.sync_group = kSyncGroup; audio_recv_config.sync_group = kSyncGroup;
audio_recv_config.decoder_factory = audio_decoder_factory_; audio_recv_config.decoder_factory = decoder_factory_;
audio_recv_config.decoder_map = { audio_recv_config.decoder_map = {
{kAudioSendPayloadType, {"ISAC", 16000, 1}}}; {kAudioSendPayloadType, {"ISAC", 16000, 1}}};

View File

@ -394,23 +394,6 @@ if (rtc_include_tests) {
] ]
} }
if (is_android) {
rtc_source_set("codecs_test_android_test_initializer") {
testonly = true
sources = [
"codecs/test/android_test_initializer.cc",
"codecs/test/android_test_initializer.h",
]
deps = [
"../../rtc_base:rtc_base_approved",
"../../sdk/android:libjingle_peerconnection_jni",
"//base",
]
}
}
video_coding_modules_tests_resources = [ video_coding_modules_tests_resources = [
"../../resources/foreman_128x96.yuv", "../../resources/foreman_128x96.yuv",
"../../resources/foreman_160x120.yuv", "../../resources/foreman_160x120.yuv",
@ -472,9 +455,15 @@ if (rtc_include_tests) {
data = video_coding_modules_tests_resources data = video_coding_modules_tests_resources
if (is_android) { if (is_android) {
sources += [
"codecs/test/android_test_initializer.cc",
"codecs/test/android_test_initializer.h",
"codecs/test/videoprocessor_integrationtest_mediacodec.cc",
]
deps += [ deps += [
":codecs_test_android_test_initializer", "../../sdk/android:libjingle_peerconnection_jni",
"../../sdk/android:video_jni", "//base",
] ]
} }
@ -482,6 +471,8 @@ if (rtc_include_tests) {
deps += [ deps += [
":codec_test_objc", ":codec_test_objc",
":video_coding_modules_tests_resources_bundle_data", ":video_coding_modules_tests_resources_bundle_data",
"../../media:rtc_media_base",
"../../sdk:videotoolbox_objc",
] ]
} }

View File

@ -42,8 +42,8 @@ CallTest::CallTest()
num_video_streams_(1), num_video_streams_(1),
num_audio_streams_(0), num_audio_streams_(0),
num_flexfec_streams_(0), num_flexfec_streams_(0),
audio_decoder_factory_(CreateBuiltinAudioDecoderFactory()), decoder_factory_(CreateBuiltinAudioDecoderFactory()),
audio_encoder_factory_(CreateBuiltinAudioEncoderFactory()), encoder_factory_(CreateBuiltinAudioEncoderFactory()),
task_queue_("CallTestTaskQueue"), task_queue_("CallTestTaskQueue"),
fake_send_audio_device_(nullptr), fake_send_audio_device_(nullptr),
fake_recv_audio_device_(nullptr) {} fake_recv_audio_device_(nullptr) {}
@ -223,7 +223,7 @@ void CallTest::CreateSendConfig(size_t num_video_streams,
audio_send_config_.send_codec_spec = audio_send_config_.send_codec_spec =
rtc::Optional<AudioSendStream::Config::SendCodecSpec>( rtc::Optional<AudioSendStream::Config::SendCodecSpec>(
{kAudioSendPayloadType, {"opus", 48000, 2, {{"stereo", "1"}}}}); {kAudioSendPayloadType, {"opus", 48000, 2, {{"stereo", "1"}}}});
audio_send_config_.encoder_factory = audio_encoder_factory_; audio_send_config_.encoder_factory = encoder_factory_;
} }
// TODO(brandtr): Update this when we support multistream protection. // TODO(brandtr): Update this when we support multistream protection.
@ -268,7 +268,7 @@ void CallTest::CreateMatchingReceiveConfigs(Transport* rtcp_send_transport) {
audio_config.rtcp_send_transport = rtcp_send_transport; audio_config.rtcp_send_transport = rtcp_send_transport;
audio_config.voe_channel_id = voe_recv_.channel_id; audio_config.voe_channel_id = voe_recv_.channel_id;
audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc;
audio_config.decoder_factory = audio_decoder_factory_; audio_config.decoder_factory = decoder_factory_;
audio_config.decoder_map = {{kAudioSendPayloadType, {"opus", 48000, 2}}}; audio_config.decoder_map = {{kAudioSendPayloadType, {"opus", 48000, 2}}};
audio_receive_configs_.push_back(audio_config); audio_receive_configs_.push_back(audio_config);
} }
@ -428,7 +428,7 @@ void CallTest::CreateVoiceEngines() {
voe_send_.voice_engine = VoiceEngine::Create(); voe_send_.voice_engine = VoiceEngine::Create();
voe_send_.base = VoEBase::GetInterface(voe_send_.voice_engine); voe_send_.base = VoEBase::GetInterface(voe_send_.voice_engine);
EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(), EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(),
apm_send_.get(), audio_decoder_factory_)); apm_send_.get(), decoder_factory_));
VoEBase::ChannelConfig config; VoEBase::ChannelConfig config;
config.enable_voice_pacing = true; config.enable_voice_pacing = true;
voe_send_.channel_id = voe_send_.base->CreateChannel(config); voe_send_.channel_id = voe_send_.base->CreateChannel(config);
@ -437,7 +437,7 @@ void CallTest::CreateVoiceEngines() {
voe_recv_.voice_engine = VoiceEngine::Create(); voe_recv_.voice_engine = VoiceEngine::Create();
voe_recv_.base = VoEBase::GetInterface(voe_recv_.voice_engine); voe_recv_.base = VoEBase::GetInterface(voe_recv_.voice_engine);
EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(), EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(),
apm_recv_.get(), audio_decoder_factory_)); apm_recv_.get(), decoder_factory_));
voe_recv_.channel_id = voe_recv_.base->CreateChannel(); voe_recv_.channel_id = voe_recv_.base->CreateChannel();
EXPECT_GE(voe_recv_.channel_id, 0); EXPECT_GE(voe_recv_.channel_id, 0);
} }

View File

@ -133,8 +133,8 @@ class CallTest : public ::testing::Test {
size_t num_video_streams_; size_t num_video_streams_;
size_t num_audio_streams_; size_t num_audio_streams_;
size_t num_flexfec_streams_; size_t num_flexfec_streams_;
rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory_; rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_;
test::FakeVideoRenderer fake_renderer_; test::FakeVideoRenderer fake_renderer_;
SingleThreadedTaskQueueForTesting task_queue_; SingleThreadedTaskQueueForTesting task_queue_;

View File

@ -124,15 +124,6 @@ if (rtc_include_tests) {
"../voice_engine", "../voice_engine",
"//testing/gtest", "//testing/gtest",
] ]
if (is_android) {
deps += [
"../modules/video_coding:codecs_test_android_test_initializer",
"../sdk/android:video_jni",
]
}
if (is_ios || is_mac) {
deps += [ "../modules/video_coding:codec_test_objc" ]
}
if (!build_with_chromium && is_clang) { if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]

View File

@ -14,7 +14,6 @@ include_rules = [
"+modules/video_coding", "+modules/video_coding",
"+modules/video_capture", "+modules/video_capture",
"+modules/video_processing", "+modules/video_processing",
"+sdk",
"+system_wrappers", "+system_wrappers",
"+voice_engine", "+voice_engine",
] ]

View File

@ -9,8 +9,6 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string>
#include "modules/pacing/alr_detector.h" #include "modules/pacing/alr_detector.h"
#include "test/field_trial.h" #include "test/field_trial.h"
#include "test/gtest.h" #include "test/gtest.h"
@ -51,9 +49,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketLossVp9) {
// TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 700000, 700000, foreman_cif.video = {true, 352, 288, 30, 700000, 700000, 700000, false,
700000, false, "VP9", false, false, 1, "VP9", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_VP9", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
RunTest(foreman_cif); RunTest(foreman_cif);
@ -62,9 +59,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketLossVp9) {
TEST_F(FullStackTest, ForemanCifPlr5Vp9) { TEST_F(FullStackTest, ForemanCifPlr5Vp9) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP9", false, false, 1, "VP9", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_VP9", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -76,9 +72,8 @@ TEST_F(FullStackTest, ForemanCifPlr5Vp9) {
TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) {
VideoQualityTest::Params paris_qcif; VideoQualityTest::Params paris_qcif;
paris_qcif.call.send_side_bwe = true; paris_qcif.call.send_side_bwe = true;
paris_qcif.video = {true, 176, 144, 30, 300000, 300000, paris_qcif.video = {true, 176, 144, 30, 300000, 300000, 300000, false,
300000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "paris_qcif"};
0, 0, false, false, "paris_qcif"};
paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96, paris_qcif.analyzer = {"net_delay_0_0_plr_0", 36.0, 0.96,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
RunTest(paris_qcif); RunTest(paris_qcif);
@ -88,9 +83,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) {
// TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 700000, 700000, foreman_cif.video = {true, 352, 288, 30, 700000, 700000, 700000, false,
700000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
RunTest(foreman_cif); RunTest(foreman_cif);
@ -99,9 +93,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) {
TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) { TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 10, 30000, 30000, foreman_cif.video = {true, 352, 288, 10, 30000, 30000, 30000, false,
30000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
RunTest(foreman_cif); RunTest(foreman_cif);
@ -110,9 +103,8 @@ TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketLoss) {
TEST_F(FullStackTest, ForemanCifPlr5) { TEST_F(FullStackTest, ForemanCifPlr5) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -123,9 +115,8 @@ TEST_F(FullStackTest, ForemanCifPlr5) {
TEST_F(FullStackTest, ForemanCifPlr5Ulpfec) { TEST_F(FullStackTest, ForemanCifPlr5Ulpfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, true, false, "foreman_cif"};
0, 0, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_ulpfec", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -136,9 +127,8 @@ TEST_F(FullStackTest, ForemanCifPlr5Ulpfec) {
TEST_F(FullStackTest, ForemanCifPlr5Flexfec) { TEST_F(FullStackTest, ForemanCifPlr5Flexfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, true, "foreman_cif"};
0, 0, false, true, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_flexfec", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -149,9 +139,8 @@ TEST_F(FullStackTest, ForemanCifPlr5Flexfec) {
TEST_F(FullStackTest, ForemanCif500kbpsPlr3Flexfec) { TEST_F(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, true, "foreman_cif"};
0, 0, false, true, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_flexfec", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 3; foreman_cif.pipe.loss_percent = 3;
@ -163,9 +152,8 @@ TEST_F(FullStackTest, ForemanCif500kbpsPlr3Flexfec) {
TEST_F(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) { TEST_F(FullStackTest, ForemanCif500kbpsPlr3Ulpfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, true, false, "foreman_cif"};
0, 0, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps_delay_50_0_plr_3_ulpfec", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 3; foreman_cif.pipe.loss_percent = 3;
@ -179,8 +167,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketlossH264) {
// TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 700000, 700000, foreman_cif.video = {true, 352, 288, 30, 700000,
700000, false, "H264", false, false, 1, 700000, 700000, false, "H264", 1,
0, 0, false, false, "foreman_cif"}; 0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_net_delay_0_0_plr_0_H264", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -190,9 +178,8 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketlossH264) {
TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) { TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 10, 30000, 30000, foreman_cif.video = {true, 352, 288, 10, 30000, 30000, 30000, false,
30000, false, "H264", false, false, 1, "H264", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0, foreman_cif.analyzer = {"foreman_cif_30kbps_net_delay_0_0_plr_0_H264", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
RunTest(foreman_cif); RunTest(foreman_cif);
@ -201,9 +188,8 @@ TEST_F(FullStackTest, ForemanCif30kbpsWithoutPacketlossH264) {
TEST_F(FullStackTest, ForemanCifPlr5H264) { TEST_F(FullStackTest, ForemanCifPlr5H264) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "H264", false, false, 1, "H264", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
std::string fec_description; std::string fec_description;
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -216,9 +202,8 @@ TEST_F(FullStackTest, ForemanCifPlr5H264) {
TEST_F(FullStackTest, ForemanCifPlr5H264Flexfec) { TEST_F(FullStackTest, ForemanCifPlr5H264Flexfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "H264", false, false, 1, "H264", 1, 0, 0, false, true, "foreman_cif"};
0, 0, false, true, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_flexfec", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -231,9 +216,8 @@ TEST_F(FullStackTest, ForemanCifPlr5H264Flexfec) {
TEST_F(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) { TEST_F(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "H264", false, false, 1, "H264", 1, 0, 0, true, false, "foreman_cif"};
0, 0, true, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_ulpfec", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.loss_percent = 5;
@ -245,9 +229,8 @@ TEST_F(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) {
TEST_F(FullStackTest, ForemanCif500kbps) { TEST_F(FullStackTest, ForemanCif500kbps) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 0; foreman_cif.pipe.queue_length_packets = 0;
@ -256,81 +239,11 @@ TEST_F(FullStackTest, ForemanCif500kbps) {
RunTest(foreman_cif); RunTest(foreman_cif);
} }
TEST_F(FullStackTest, ForemanSqcif30kbpsLibvpx) {
VideoQualityTest::Params foreman_sqcif;
foreman_sqcif.call.send_side_bwe = true;
foreman_sqcif.video = {true, 128, 96, 7, 30000, 30000,
2000000, false, "VP8", false, false, 1,
0, 0, false, false, "foreman_128x96"};
foreman_sqcif.analyzer = {"foreman_sqcif_30kbps_libvpx", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_sqcif.pipe.link_capacity_kbps = 30;
RunTest(foreman_sqcif);
}
TEST_F(FullStackTest, Foreman240p100kbpsLibvpx) {
VideoQualityTest::Params foreman_240p;
foreman_240p.call.send_side_bwe = true;
foreman_240p.video = {
true, 320, 240, 10, 30000, 100000, 2000000, false, "VP8", false,
false, 1, 0, 0, false, false, "foreman_320x240"};
foreman_240p.analyzer = {"foreman_240p_100kbps_libvpx", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_240p.pipe.link_capacity_kbps = 100;
RunTest(foreman_240p);
}
#if defined(WEBRTC_ANDROID)
// TODO(brandtr): Enable when the test is more robust against failing encoders,
// or when the perf waterfall Android bots all support sqcif.
TEST_F(FullStackTest, DISABLED_ForemanSqcif30kbpsMediaCodec) {
VideoQualityTest::Params foreman_sqcif;
foreman_sqcif.call.send_side_bwe = true;
foreman_sqcif.video = {true, 128, 96, 7, 30000, 30000,
2000000, false, "VP8", true, false, 1,
0, 0, false, false, "foreman_128x96"};
foreman_sqcif.analyzer = {"foreman_sqcif_30kbps_mediacodec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_sqcif.pipe.link_capacity_kbps = 30;
RunTest(foreman_sqcif);
}
TEST_F(FullStackTest, Foreman240p100kbpsMediaCodec) {
VideoQualityTest::Params foreman_240p;
foreman_240p.call.send_side_bwe = true;
foreman_240p.video = {
true, 320, 240, 10, 30000, 100000, 2000000, false, "VP8", true,
false, 1, 0, 0, false, false, "foreman_320x240"};
foreman_240p.analyzer = {"foreman_240p_100kbps_mediacodec", 0.0, 0.0,
kFullStackTestDurationSecs};
foreman_240p.pipe.link_capacity_kbps = 100;
RunTest(foreman_240p);
}
TEST_F(FullStackTest, Foreman240p100kbpsMediaCodecWithForcedSwFallback) {
std::string field_trial =
"WebRTC-VP8-Forced-Fallback-Encoder/Enabled-150,175," +
std::to_string(1000 * kFullStackTestDurationSecs / 2) + ",19200/";
test::ScopedFieldTrials override_field_trials(field_trial);
VideoQualityTest::Params foreman_240p;
foreman_240p.call.send_side_bwe = true;
foreman_240p.video = {
true, 320, 240, 10, 30000, 100000, 2000000, false, "VP8", true,
true, 1, 0, 0, false, false, "foreman_320x240"};
foreman_240p.analyzer = {"foreman_240p_100kbps_mediacodec_sw_fallback", 0.0,
0.0, kFullStackTestDurationSecs};
foreman_240p.pipe.link_capacity_kbps = 100;
RunTest(foreman_240p);
}
#endif // defined(WEBRTC_ANDROID)
TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32; foreman_cif.pipe.queue_length_packets = 32;
@ -342,9 +255,8 @@ TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) {
TEST_F(FullStackTest, ForemanCif500kbps100ms) { TEST_F(FullStackTest, ForemanCif500kbps100ms) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps_100ms", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 0; foreman_cif.pipe.queue_length_packets = 0;
@ -356,9 +268,8 @@ TEST_F(FullStackTest, ForemanCif500kbps100ms) {
TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32; foreman_cif.pipe.queue_length_packets = 32;
@ -370,9 +281,8 @@ TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) {
TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) { TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = false; foreman_cif.call.send_side_bwe = false;
foreman_cif.video = {true, 352, 288, 30, 30000, 500000, foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe", foreman_cif.analyzer = {"foreman_cif_500kbps_100ms_32pkts_queue_recv_bwe",
0.0, 0.0, kFullStackTestDurationSecs}; 0.0, 0.0, kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32; foreman_cif.pipe.queue_length_packets = 32;
@ -384,9 +294,8 @@ TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
VideoQualityTest::Params foreman_cif; VideoQualityTest::Params foreman_cif;
foreman_cif.call.send_side_bwe = true; foreman_cif.call.send_side_bwe = true;
foreman_cif.video = {true, 352, 288, 30, 30000, 2000000, foreman_cif.video = {true, 352, 288, 30, 30000, 2000000, 2000000, false,
2000000, false, "VP8", false, false, 1, "VP8", 1, 0, 0, false, false, "foreman_cif"};
0, 0, false, false, "foreman_cif"};
foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, foreman_cif.analyzer = {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
foreman_cif.pipe.queue_length_packets = 32; foreman_cif.pipe.queue_length_packets = 32;
@ -399,23 +308,10 @@ TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) {
TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) { TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 1,
50, 0, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
1,
0,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue", conf_motion_hd.analyzer = {"conference_motion_hd_2000kbps_100ms_32pkts_queue",
0.0, 0.0, kFullStackTestDurationSecs}; 0.0, 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 32; conf_motion_hd.pipe.queue_length_packets = 32;
@ -427,23 +323,10 @@ TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueue) {
TEST_F(FullStackTest, ConferenceMotionHd1TLModerateLimits) { TEST_F(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 1,
50, -1, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
1,
-1,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0, conf_motion_hd.analyzer = {"conference_motion_hd_1tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50; conf_motion_hd.pipe.queue_length_packets = 50;
@ -456,23 +339,10 @@ TEST_F(FullStackTest, ConferenceMotionHd1TLModerateLimits) {
TEST_F(FullStackTest, ConferenceMotionHd2TLModerateLimits) { TEST_F(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 2,
50, -1, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
2,
-1,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0, conf_motion_hd.analyzer = {"conference_motion_hd_2tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50; conf_motion_hd.pipe.queue_length_packets = 50;
@ -485,23 +355,10 @@ TEST_F(FullStackTest, ConferenceMotionHd2TLModerateLimits) {
TEST_F(FullStackTest, ConferenceMotionHd3TLModerateLimits) { TEST_F(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 3,
50, -1, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
3,
-1,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0, conf_motion_hd.analyzer = {"conference_motion_hd_3tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50; conf_motion_hd.pipe.queue_length_packets = 50;
@ -514,23 +371,10 @@ TEST_F(FullStackTest, ConferenceMotionHd3TLModerateLimits) {
TEST_F(FullStackTest, ConferenceMotionHd4TLModerateLimits) { TEST_F(FullStackTest, ConferenceMotionHd4TLModerateLimits) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 4,
50, -1, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
4,
-1,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0, conf_motion_hd.analyzer = {"conference_motion_hd_4tl_moderate_limits", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50; conf_motion_hd.pipe.queue_length_packets = 50;
@ -544,23 +388,10 @@ TEST_F(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
test::ScopedFieldTrials field_trial("WebRTC-UseShortVP8TL3Pattern/Enabled/"); test::ScopedFieldTrials field_trial("WebRTC-UseShortVP8TL3Pattern/Enabled/");
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP8", 3,
50, -1, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP8",
false,
false,
3,
-1,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits", conf_motion_hd.analyzer = {"conference_motion_hd_3tl_alt_moderate_limits",
0.0, 0.0, kFullStackTestDurationSecs}; 0.0, 0.0, kFullStackTestDurationSecs};
conf_motion_hd.pipe.queue_length_packets = 50; conf_motion_hd.pipe.queue_length_packets = 50;
@ -574,23 +405,10 @@ TEST_F(FullStackTest, ConferenceMotionHd3TLModerateLimitsAltTLPattern) {
TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) { TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
VideoQualityTest::Params conf_motion_hd; VideoQualityTest::Params conf_motion_hd;
conf_motion_hd.call.send_side_bwe = true; conf_motion_hd.call.send_side_bwe = true;
conf_motion_hd.video = {true, conf_motion_hd.video = {
1280, true, 1280, 720, 50, 30000,
720, 3000000, 3000000, false, "VP9", 1,
50, 0, 0, false, false, "ConferenceMotion_1280_720_50"};
30000,
3000000,
3000000,
false,
"VP9",
false,
false,
1,
0,
0,
false,
false,
"ConferenceMotion_1280_720_50"};
conf_motion_hd.analyzer = { conf_motion_hd.analyzer = {
"conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0, "conference_motion_hd_2000kbps_100ms_32pkts_queue_vp9", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -604,9 +422,8 @@ TEST_F(FullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -618,18 +435,18 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.video = {true, 1850, 1110, 5, 800000, 2500000, screenshare.video = {true, 1850, 1110, 5, 800000,
2500000, false, "VP8", false, false, 3, 2500000, 2500000, false, "VP8", 3,
2, 400000, false, false, ""}; 2, 400000, false, false, ""};
screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
VideoQualityTest::Params screenshare_params_high; VideoQualityTest::Params screenshare_params_high;
screenshare_params_high.video = { screenshare_params_high.video = {true, 1850, 1110, 5, 800000,
true, 1850, 1110, 5, 800000, 2500000, 2500000, false, "VP8", 2500000, 2500000, false, "VP8", 3,
false, false, 3, 0, 400000, false, false, ""}; 0, 400000, false, false, ""};
VideoQualityTest::Params screenshare_params_low; VideoQualityTest::Params screenshare_params_low;
screenshare_params_low.video = {true, 1850, 1110, 5, 50000, 200000, screenshare_params_low.video = {true, 1850, 1110, 5, 50000,
2000000, false, "VP8", false, false, 2, 200000, 2000000, false, "VP8", 2,
0, 400000, false, false, ""}; 0, 400000, false, false, ""};
std::vector<VideoStream> streams = { std::vector<VideoStream> streams = {
@ -642,9 +459,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
VideoQualityTest::Params config; VideoQualityTest::Params config;
config.call.send_side_bwe = true; config.call.send_side_bwe = true;
config.video = {true, 1850, 1110 / 2, 5, 50000, 200000, config.video = {true, 1850, 1110 / 2, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
config.screenshare = {true, false, 10, 2}; config.screenshare = {true, false, 10, 2};
config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0, config.analyzer = {"screenshare_slides_scrolling", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -654,9 +470,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_lossy_net", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -669,9 +484,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_very_lossy", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -684,9 +498,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_lossy_limited", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -700,9 +513,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue) {
TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) { TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_moderately_restricted", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -718,9 +530,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNetRestrictedQueue_ALR) {
test::ScopedFieldTrials field_trial(kAlrProbingExperiment); test::ScopedFieldTrials field_trial(kAlrProbingExperiment);
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_lossy_limited_ALR", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_lossy_limited_ALR", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -735,9 +546,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ALR) {
test::ScopedFieldTrials field_trial(kAlrProbingExperiment); test::ScopedFieldTrials field_trial(kAlrProbingExperiment);
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_ALR", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_ALR", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -748,9 +558,8 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_ModeratelyRestricted_ALR) {
test::ScopedFieldTrials field_trial(kAlrProbingExperiment); test::ScopedFieldTrials field_trial(kAlrProbingExperiment);
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP8", false, false, 2, "VP8", 2, 1, 400000, false, false, ""};
1, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_moderately_restricted_ALR", 0.0, screenshare.analyzer = {"screenshare_slides_moderately_restricted_ALR", 0.0,
0.0, kFullStackTestDurationSecs}; 0.0, kFullStackTestDurationSecs};
@ -767,18 +576,18 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast_ALR) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.video = {true, 1850, 1110, 5, 800000, 2500000, screenshare.video = {true, 1850, 1110, 5, 800000,
2500000, false, "VP8", false, false, 3, 2500000, 2500000, false, "VP8", 3,
2, 400000, false, false, ""}; 2, 400000, false, false, ""};
screenshare.analyzer = {"screenshare_slides_simulcast_alr", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_simulcast_alr", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
VideoQualityTest::Params screenshare_params_high; VideoQualityTest::Params screenshare_params_high;
screenshare_params_high.video = { screenshare_params_high.video = {true, 1850, 1110, 5, 800000,
true, 1850, 1110, 5, 800000, 2500000, 2500000, false, "VP8", 2500000, 2500000, false, "VP8", 3,
false, false, 3, 0, 400000, false, false, ""}; 0, 400000, false, false, ""};
VideoQualityTest::Params screenshare_params_low; VideoQualityTest::Params screenshare_params_low;
screenshare_params_low.video = {true, 1850, 1110, 5, 50000, 200000, screenshare_params_low.video = {true, 1850, 1110, 5, 50000,
2000000, false, "VP8", false, false, 2, 200000, 2000000, false, "VP8", 2,
0, 400000, false, false, ""}; 0, 400000, false, false, ""};
std::vector<VideoStream> streams = { std::vector<VideoStream> streams = {
@ -789,88 +598,31 @@ TEST_F(FullStackTest, ScreenshareSlidesVP8_3TL_Simulcast_ALR) {
} }
const VideoQualityTest::Params::Video kSvcVp9Video = { const VideoQualityTest::Params::Video kSvcVp9Video = {
true, true, 1280, 720, 30, 800000,
1280, 2500000, 2500000, false, "VP9", 3,
720, 2, 400000, false, false, "ConferenceMotion_1280_720_50"};
30,
800000,
2500000,
2500000,
false,
"VP9",
false,
false,
3,
2,
400000,
false,
false,
"ConferenceMotion_1280_720_50"};
const VideoQualityTest::Params::Video kSimulcastVp8VideoHigh = { const VideoQualityTest::Params::Video kSimulcastVp8VideoHigh = {
true, true, 1280, 720, 30, 800000,
1280, 2500000, 2500000, false, "VP8", 3,
720, 2, 400000, false, false, "ConferenceMotion_1280_720_50"};
30,
800000,
2500000,
2500000,
false,
"VP8",
false,
false,
3,
2,
400000,
false,
false,
"ConferenceMotion_1280_720_50"};
const VideoQualityTest::Params::Video kSimulcastVp8VideoMedium = { const VideoQualityTest::Params::Video kSimulcastVp8VideoMedium = {
true, true, 640, 360, 30, 150000,
640, 500000, 700000, false, "VP8", 3,
360, 2, 400000, false, false, "ConferenceMotion_1280_720_50"};
30,
150000,
500000,
700000,
false,
"VP8",
false,
false,
3,
2,
400000,
false,
false,
"ConferenceMotion_1280_720_50"};
const VideoQualityTest::Params::Video kSimulcastVp8VideoLow = { const VideoQualityTest::Params::Video kSimulcastVp8VideoLow = {
true, true, 320, 180, 30, 30000,
320, 150000, 200000, false, "VP8", 3,
180, 2, 400000, false, false, "ConferenceMotion_1280_720_50"};
30,
30000,
150000,
200000,
false,
"VP8",
false,
false,
3,
2,
400000,
false,
false,
"ConferenceMotion_1280_720_50"};
#if !defined(RTC_DISABLE_VP9) #if !defined(RTC_DISABLE_VP9)
TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) { TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) {
VideoQualityTest::Params screenshare; VideoQualityTest::Params screenshare;
screenshare.call.send_side_bwe = true; screenshare.call.send_side_bwe = true;
screenshare.video = {true, 1850, 1110, 5, 50000, 200000, screenshare.video = {true, 1850, 1110, 5, 50000, 200000, 2000000, false,
2000000, false, "VP9", false, false, 1, "VP9", 1, 0, 400000, false, false, ""};
0, 400000, false, false, ""};
screenshare.screenshare = {true, false, 10}; screenshare.screenshare = {true, false, 10};
screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0, screenshare.analyzer = {"screenshare_slides_vp9_2sl", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};
@ -922,8 +674,8 @@ TEST_F(FullStackTest, VP9SVC_3SL_Low) {
TEST_F(FullStackTest, MAYBE_SimulcastFullHdOveruse) { TEST_F(FullStackTest, MAYBE_SimulcastFullHdOveruse) {
VideoQualityTest::Params simulcast; VideoQualityTest::Params simulcast;
simulcast.call.send_side_bwe = true; simulcast.call.send_side_bwe = true;
simulcast.video = {true, 1920, 1080, 30, 800000, 2500000, simulcast.video = {true, 1920, 1080, 30, 800000,
2500000, false, "VP8", false, false, 3, 2500000, 2500000, false, "VP8", 3,
2, 400000, false, false, "Generator"}; 2, 400000, false, false, "Generator"};
simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0, simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0,
kFullStackTestDurationSecs}; kFullStackTestDurationSecs};

View File

@ -279,8 +279,6 @@ void Loopback() {
flags::MaxBitrateKbps() * 1000, flags::MaxBitrateKbps() * 1000,
false, false,
flags::Codec(), flags::Codec(),
false, // No HW encoder.
false, // No SW fallback encoder.
flags::NumTemporalLayers(), flags::NumTemporalLayers(),
flags::SelectedTL(), flags::SelectedTL(),
flags::MinTransmitBitrateKbps() * 1000, flags::MinTransmitBitrateKbps() * 1000,

View File

@ -276,8 +276,6 @@ void Loopback() {
flags::MaxBitrateKbps() * 1000, flags::MaxBitrateKbps() * 1000,
flags::FLAG_suspend_below_min_bitrate, flags::FLAG_suspend_below_min_bitrate,
flags::Codec(), flags::Codec(),
false, // No HW encoder.
false, // No SW fallback encoder.
flags::NumTemporalLayers(), flags::NumTemporalLayers(),
flags::SelectedTL(), flags::SelectedTL(),
0, // No min transmit bitrate. 0, // No min transmit bitrate.

View File

@ -18,20 +18,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#if defined(WEBRTC_ANDROID)
#include "modules/video_coding/codecs/test/android_test_initializer.h"
#include "sdk/android/src/jni/androidmediadecoder_jni.h"
#include "sdk/android/src/jni/androidmediaencoder_jni.h"
#elif defined(WEBRTC_IOS)
#include "modules/video_coding/codecs/test/objc_codec_h264_test.h"
#endif
#include "api/optional.h" #include "api/optional.h"
#include "call/call.h" #include "call/call.h"
#include "common_video/libyuv/include/webrtc_libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "logging/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/rtc_event_log.h"
#include "media/engine/internalencoderfactory.h"
#include "media/engine/videoencodersoftwarefallbackwrapper.h"
#include "media/engine/webrtcvideoengine.h" #include "media/engine/webrtcvideoengine.h"
#include "modules/audio_mixer/audio_mixer_impl.h" #include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/rtp_rtcp/include/rtp_header_parser.h" #include "modules/rtp_rtcp/include/rtp_header_parser.h"
@ -1138,6 +1128,35 @@ class VideoAnalyzer : public PacketReceiver,
const int64_t start_ms_; const int64_t start_ms_;
}; };
class Vp8EncoderFactory : public cricket::WebRtcVideoEncoderFactory {
public:
Vp8EncoderFactory() {
supported_codecs_.push_back(cricket::VideoCodec("VP8"));
}
~Vp8EncoderFactory() override { RTC_CHECK(live_encoders_.empty()); }
const std::vector<cricket::VideoCodec>& supported_codecs() const override {
return supported_codecs_;
}
VideoEncoder* CreateVideoEncoder(const cricket::VideoCodec& codec) override {
VideoEncoder* encoder = VP8Encoder::Create();
live_encoders_.insert(encoder);
return encoder;
}
void DestroyVideoEncoder(VideoEncoder* encoder) override {
auto it = live_encoders_.find(encoder);
RTC_CHECK(it != live_encoders_.end());
live_encoders_.erase(it);
delete encoder;
}
private:
std::vector<cricket::VideoCodec> supported_codecs_;
std::set<VideoEncoder*> live_encoders_;
};
VideoQualityTest::VideoQualityTest() VideoQualityTest::VideoQualityTest()
: clock_(Clock::GetRealTimeClock()), receive_logs_(0), send_logs_(0) { : clock_(Clock::GetRealTimeClock()), receive_logs_(0), send_logs_(0) {
payload_type_map_ = test::CallTest::payload_type_map_; payload_type_map_ = test::CallTest::payload_type_map_;
@ -1150,16 +1169,12 @@ VideoQualityTest::VideoQualityTest()
payload_type_map_[kPayloadTypeH264] = webrtc::MediaType::VIDEO; payload_type_map_[kPayloadTypeH264] = webrtc::MediaType::VIDEO;
payload_type_map_[kPayloadTypeVP8] = webrtc::MediaType::VIDEO; payload_type_map_[kPayloadTypeVP8] = webrtc::MediaType::VIDEO;
payload_type_map_[kPayloadTypeVP9] = webrtc::MediaType::VIDEO; payload_type_map_[kPayloadTypeVP9] = webrtc::MediaType::VIDEO;
#if defined(WEBRTC_ANDROID)
InitializeAndroidObjects();
#endif
} }
VideoQualityTest::Params::Params() VideoQualityTest::Params::Params()
: call({false, Call::Config::BitrateConfig(), 0}), : call({false, Call::Config::BitrateConfig(), 0}),
video({false, 640, 480, 30, 50, 800, 800, false, "VP8", false, false, 1, video({false, 640, 480, 30, 50, 800, 800, false, "VP8", 1, -1, 0, false,
-1, 0, false, false, ""}), false, ""}),
audio({false, false, false}), audio({false, false, false}),
screenshare({false, false, 10, 0}), screenshare({false, false, 10, 0}),
analyzer({"", 0.0, 0.0, 0, "", ""}), analyzer({"", 0.0, 0.0, 0, "", ""}),
@ -1398,51 +1413,28 @@ void VideoQualityTest::SetupVideo(Transport* send_transport,
size_t num_flexfec_streams = params_.video.flexfec ? 1 : 0; size_t num_flexfec_streams = params_.video.flexfec ? 1 : 0;
CreateSendConfig(num_video_streams, 0, num_flexfec_streams, send_transport); CreateSendConfig(num_video_streams, 0, num_flexfec_streams, send_transport);
if (params_.video.hw_encoder) {
#if defined(WEBRTC_ANDROID)
video_encoder_factory_.reset(new jni::MediaCodecVideoEncoderFactory());
#elif defined(WEBRTC_IOS)
video_encoder_factory_ = CreateObjCEncoderFactory();
#else
RTC_NOTREACHED() << "Only support HW encoder on Android and iOS.";
#endif
} else {
video_encoder_factory_.reset(new cricket::InternalEncoderFactory());
}
cricket::VideoCodec codec;
int payload_type; int payload_type;
if (params_.video.codec == "H264") { if (params_.video.codec == "H264") {
// TODO(brandtr): Add support for high profile here. video_encoder_.reset(H264Encoder::Create(cricket::VideoCodec("H264")));
codec = cricket::VideoCodec(cricket::kH264CodecName);
video_encoder_.reset(video_encoder_factory_->CreateVideoEncoder(codec));
payload_type = kPayloadTypeH264; payload_type = kPayloadTypeH264;
} else if (params_.video.codec == "VP8") { } else if (params_.video.codec == "VP8") {
codec = cricket::VideoCodec(cricket::kVp8CodecName);
if (params_.screenshare.enabled && params_.ss.streams.size() > 1) { if (params_.screenshare.enabled && params_.ss.streams.size() > 1) {
// Simulcast screenshare needs a simulcast encoder adapter to work, // Simulcast screenshare needs a simulcast encoder adapter to work, since
// since encoders usually can't natively do simulcast with // encoders usually can't natively do simulcast with different frame rates
// different frame rates for the different layers. // for the different layers.
video_encoder_.reset( video_encoder_.reset(
new SimulcastEncoderAdapter(video_encoder_factory_.get())); new SimulcastEncoderAdapter(new Vp8EncoderFactory()));
} else { } else {
video_encoder_.reset(video_encoder_factory_->CreateVideoEncoder(codec)); video_encoder_.reset(VP8Encoder::Create());
} }
payload_type = kPayloadTypeVP8; payload_type = kPayloadTypeVP8;
} else if (params_.video.codec == "VP9") { } else if (params_.video.codec == "VP9") {
codec = cricket::VideoCodec(cricket::kVp9CodecName); video_encoder_.reset(VP9Encoder::Create());
video_encoder_.reset(video_encoder_factory_->CreateVideoEncoder(codec));
payload_type = kPayloadTypeVP9; payload_type = kPayloadTypeVP9;
} else { } else {
RTC_NOTREACHED() << "Codec not supported!"; RTC_NOTREACHED() << "Codec not supported!";
return; return;
} }
if (params_.video.sw_fallback_encoder) {
video_encoder_ = rtc::MakeUnique<VideoEncoderSoftwareFallbackWrapper>(
codec, std::move(video_encoder_));
}
video_send_config_.encoder_settings.encoder = video_encoder_.get(); video_send_config_.encoder_settings.encoder = video_encoder_.get();
video_send_config_.encoder_settings.payload_name = params_.video.codec; video_send_config_.encoder_settings.payload_name = params_.video.codec;
video_send_config_.encoder_settings.payload_type = payload_type; video_send_config_.encoder_settings.payload_type = payload_type;
@ -1973,7 +1965,7 @@ void VideoQualityTest::SetupAudio(int send_channel_id,
{"OPUS", 48000, 2, {"OPUS", 48000, 2,
{{"usedtx", (params_.audio.dtx ? "1" : "0")}, {{"usedtx", (params_.audio.dtx ? "1" : "0")},
{"stereo", "1"}}}}); {"stereo", "1"}}}});
audio_send_config_.encoder_factory = audio_encoder_factory_; audio_send_config_.encoder_factory = encoder_factory_;
audio_send_stream_ = sender_call_->CreateAudioSendStream(audio_send_config_); audio_send_stream_ = sender_call_->CreateAudioSendStream(audio_send_config_);
AudioReceiveStream::Config audio_config; AudioReceiveStream::Config audio_config;
@ -1983,7 +1975,7 @@ void VideoQualityTest::SetupAudio(int send_channel_id,
audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc;
audio_config.rtp.transport_cc = params_.call.send_side_bwe; audio_config.rtp.transport_cc = params_.call.send_side_bwe;
audio_config.rtp.extensions = audio_send_config_.rtp.extensions; audio_config.rtp.extensions = audio_send_config_.rtp.extensions;
audio_config.decoder_factory = audio_decoder_factory_; audio_config.decoder_factory = decoder_factory_;
audio_config.decoder_map = {{kAudioSendPayloadType, {"OPUS", 48000, 2}}}; audio_config.decoder_map = {{kAudioSendPayloadType, {"OPUS", 48000, 2}}};
if (params_.video.enabled && params_.audio.sync_video) if (params_.video.enabled && params_.audio.sync_video)
audio_config.sync_group = kSyncGroup; audio_config.sync_group = kSyncGroup;
@ -2013,7 +2005,7 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
webrtc::AudioProcessing::Create()); webrtc::AudioProcessing::Create());
if (params_.audio.enabled) { if (params_.audio.enabled) {
CreateVoiceEngine(&voe, audio_processing.get(), audio_decoder_factory_); CreateVoiceEngine(&voe, audio_processing.get(), decoder_factory_);
AudioState::Config audio_state_config; AudioState::Config audio_state_config;
audio_state_config.voice_engine = voe.voice_engine; audio_state_config.voice_engine = voe.voice_engine;
audio_state_config.audio_mixer = AudioMixerImpl::Create(); audio_state_config.audio_mixer = AudioMixerImpl::Create();

View File

@ -16,7 +16,6 @@
#include <vector> #include <vector>
#include "media/engine/simulcast_encoder_adapter.h" #include "media/engine/simulcast_encoder_adapter.h"
#include "media/engine/webrtcvideoencoderfactory.h"
#include "test/call_test.h" #include "test/call_test.h"
#include "test/frame_generator.h" #include "test/frame_generator.h"
#include "test/testsupport/trace_to_stderr.h" #include "test/testsupport/trace_to_stderr.h"
@ -47,8 +46,6 @@ class VideoQualityTest : public test::CallTest {
int max_bitrate_bps; int max_bitrate_bps;
bool suspend_below_min_bitrate; bool suspend_below_min_bitrate;
std::string codec; std::string codec;
bool hw_encoder;
bool sw_fallback_encoder;
int num_temporal_layers; int num_temporal_layers;
int selected_tl; int selected_tl;
int min_transmit_bps; int min_transmit_bps;
@ -145,8 +142,8 @@ class VideoQualityTest : public test::CallTest {
std::vector<std::unique_ptr<test::VideoCapturer>> thumbnail_capturers_; std::vector<std::unique_ptr<test::VideoCapturer>> thumbnail_capturers_;
std::unique_ptr<test::TraceToStderr> trace_to_stderr_; std::unique_ptr<test::TraceToStderr> trace_to_stderr_;
std::unique_ptr<test::FrameGenerator> frame_generator_; std::unique_ptr<test::FrameGenerator> frame_generator_;
std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_;
std::unique_ptr<VideoEncoder> video_encoder_; std::unique_ptr<VideoEncoder> video_encoder_;
std::unique_ptr<cricket::WebRtcVideoEncoderFactory> vp8_encoder_factory_;
std::vector<std::unique_ptr<VideoEncoder>> thumbnail_encoders_; std::vector<std::unique_ptr<VideoEncoder>> thumbnail_encoders_;
std::vector<VideoSendStream::Config> thumbnail_send_configs_; std::vector<VideoSendStream::Config> thumbnail_send_configs_;