Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2729623005: Revert of fixed VP8 simulcast to not decode non-selected streams (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/test/layer_filtering_transport.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 RTC_CHECK(graph_data_output_file) 1418 RTC_CHECK(graph_data_output_file)
1419 << "Can't open the file " << params_.analyzer.graph_data_output_filename 1419 << "Can't open the file " << params_.analyzer.graph_data_output_filename
1420 << "!"; 1420 << "!";
1421 } 1421 }
1422 1422
1423 webrtc::RtcEventLogNullImpl event_log; 1423 webrtc::RtcEventLogNullImpl event_log;
1424 Call::Config call_config(&event_log_); 1424 Call::Config call_config(&event_log_);
1425 call_config.bitrate_config = params.call.call_bitrate_config; 1425 call_config.bitrate_config = params.call.call_bitrate_config;
1426 CreateCalls(call_config, call_config); 1426 CreateCalls(call_config, call_config);
1427 1427
1428 VideoStream& selected_stream = params_.ss.streams[params_.ss.selected_stream]; 1428 test::LayerFilteringTransport send_transport(
1429 params_.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
1430 params_.video.selected_tl, params_.ss.selected_sl);
1431 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get());
1429 1432
1430 std::string graph_title = params_.analyzer.graph_title; 1433 std::string graph_title = params_.analyzer.graph_title;
1431 if (graph_title.empty()) 1434 if (graph_title.empty())
1432 graph_title = VideoQualityTest::GenerateGraphTitle(); 1435 graph_title = VideoQualityTest::GenerateGraphTitle();
1433 1436
1434 std::set<uint32_t> excluded_ssrcs; 1437 // In the case of different resolutions, the functions calculating PSNR and
1435 for (size_t i = 0; i < params_.ss.streams.size(); i++) { 1438 // SSIM return -1.0, instead of a positive value as usual. VideoAnalyzer
1436 if (i != params_.ss.selected_stream) { 1439 // aborts if the average psnr/ssim are below the given threshold, which is
1437 excluded_ssrcs.insert(kVideoSendSsrcs[i]); 1440 // 0.0 by default. Setting the thresholds to -1.1 prevents the unnecessary
1438 excluded_ssrcs.insert(kSendRtxSsrcs[i]); 1441 // abort.
1439 } 1442 VideoStream& selected_stream = params_.ss.streams[params_.ss.selected_stream];
1440 }
1441
1442 test::LayerFilteringTransport send_transport(
1443 params_.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
1444 params_.video.selected_tl, params_.ss.selected_sl,
1445 excluded_ssrcs);
1446 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get());
1447
1448 1443
1449 bool is_quick_test_enabled = field_trial::IsEnabled("WebRTC-QuickPerfTest"); 1444 bool is_quick_test_enabled = field_trial::IsEnabled("WebRTC-QuickPerfTest");
1450 VideoAnalyzer analyzer( 1445 VideoAnalyzer analyzer(
1451 &send_transport, params_.analyzer.test_label, 1446 &send_transport, params_.analyzer.test_label,
1452 1447
1453 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold, 1448 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold,
1454 is_quick_test_enabled 1449 is_quick_test_enabled
1455 ? kFramesSentInQuickTest 1450 ? kFramesSentInQuickTest
1456 : params_.analyzer.test_durations_secs * params_.video.fps, 1451 : params_.analyzer.test_durations_secs * params_.video.fps,
1457 graph_data_output_file, graph_title, 1452 graph_data_output_file, graph_title,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 audio_state_config.audio_mixer = AudioMixerImpl::Create(); 1564 audio_state_config.audio_mixer = AudioMixerImpl::Create();
1570 call_config.audio_state = AudioState::Create(audio_state_config); 1565 call_config.audio_state = AudioState::Create(audio_state_config);
1571 } 1566 }
1572 1567
1573 std::unique_ptr<Call> call(Call::Create(call_config)); 1568 std::unique_ptr<Call> call(Call::Create(call_config));
1574 1569
1575 // TODO(minyue): consider if this is a good transport even for audio only 1570 // TODO(minyue): consider if this is a good transport even for audio only
1576 // calls. 1571 // calls.
1577 test::LayerFilteringTransport transport( 1572 test::LayerFilteringTransport transport(
1578 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, 1573 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9,
1579 params.video.selected_tl, params_.ss.selected_sl, 1574 params.video.selected_tl, params_.ss.selected_sl);
1580 std::set<uint32_t>());
1581 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at 1575 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at
1582 // least share as much code as possible. That way this test would also match 1576 // least share as much code as possible. That way this test would also match
1583 // the full stack tests better. 1577 // the full stack tests better.
1584 transport.SetReceiver(call->Receiver()); 1578 transport.SetReceiver(call->Receiver());
1585 1579
1586 VideoReceiveStream* video_receive_stream = nullptr; 1580 VideoReceiveStream* video_receive_stream = nullptr;
1587 FlexfecReceiveStream* flexfec_receive_stream = nullptr; 1581 FlexfecReceiveStream* flexfec_receive_stream = nullptr;
1588 std::unique_ptr<test::VideoRenderer> local_preview; 1582 std::unique_ptr<test::VideoRenderer> local_preview;
1589 std::unique_ptr<test::VideoRenderer> loopback_video; 1583 std::unique_ptr<test::VideoRenderer> loopback_video;
1590 if (params_.video.enabled) { 1584 if (params_.video.enabled) {
(...skipping 12 matching lines...) Expand all
1603 loopback_video.reset(test::VideoRenderer::Create( 1597 loopback_video.reset(test::VideoRenderer::Create(
1604 title.c_str(), params_.ss.streams[stream_id].width, 1598 title.c_str(), params_.ss.streams[stream_id].width,
1605 params_.ss.streams[stream_id].height)); 1599 params_.ss.streams[stream_id].height));
1606 1600
1607 SetupVideo(&transport, &transport); 1601 SetupVideo(&transport, &transport);
1608 video_send_config_.pre_encode_callback = local_preview.get(); 1602 video_send_config_.pre_encode_callback = local_preview.get();
1609 video_receive_configs_[stream_id].renderer = loopback_video.get(); 1603 video_receive_configs_[stream_id].renderer = loopback_video.get();
1610 if (params_.audio.enabled && params_.audio.sync_video) 1604 if (params_.audio.enabled && params_.audio.sync_video)
1611 video_receive_configs_[stream_id].sync_group = kSyncGroup; 1605 video_receive_configs_[stream_id].sync_group = kSyncGroup;
1612 1606
1613 SetupScreenshareOrSVC(); 1607 if (params_.screenshare.enabled)
1608 SetupScreenshareOrSVC();
1614 1609
1615 video_send_stream_ = call->CreateVideoSendStream( 1610 video_send_stream_ = call->CreateVideoSendStream(
1616 video_send_config_.Copy(), video_encoder_config_.Copy()); 1611 video_send_config_.Copy(), video_encoder_config_.Copy());
1617 if (params_.video.flexfec) { 1612 if (params_.video.flexfec) {
1618 RTC_DCHECK(!flexfec_receive_configs_.empty()); 1613 RTC_DCHECK(!flexfec_receive_configs_.empty());
1619 flexfec_receive_stream = 1614 flexfec_receive_stream =
1620 call->CreateFlexfecReceiveStream(flexfec_receive_configs_[0]); 1615 call->CreateFlexfecReceiveStream(flexfec_receive_configs_[0]);
1621 } 1616 }
1622 video_receive_stream = call->CreateVideoReceiveStream( 1617 video_receive_stream = call->CreateVideoReceiveStream(
1623 video_receive_configs_[stream_id].Copy()); 1618 video_receive_configs_[stream_id].Copy());
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 std::ostringstream str; 1700 std::ostringstream str;
1706 str << receive_logs_++; 1701 str << receive_logs_++;
1707 std::string path = 1702 std::string path =
1708 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1703 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1709 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1704 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1710 10000000); 1705 10000000);
1711 } 1706 }
1712 } 1707 }
1713 1708
1714 } // namespace webrtc 1709 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/layer_filtering_transport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698