diff --git a/modules/congestion_controller/include/send_side_congestion_controller.h b/modules/congestion_controller/include/send_side_congestion_controller.h index ea28935ab3..d1222a2c6b 100644 --- a/modules/congestion_controller/include/send_side_congestion_controller.h +++ b/modules/congestion_controller/include/send_side_congestion_controller.h @@ -174,9 +174,6 @@ class DEPRECATED_SendSideCongestionController rtc::RaceChecker worker_race_; - bool pacer_pushback_experiment_ = false; - float encoding_rate_ = 1.0; - std::unique_ptr congestion_window_pushback_controller_; diff --git a/modules/congestion_controller/rtp/control_handler.cc b/modules/congestion_controller/rtp/control_handler.cc index 8bd5714841..808c195485 100644 --- a/modules/congestion_controller/rtp/control_handler.cc +++ b/modules/congestion_controller/rtp/control_handler.cc @@ -22,12 +22,6 @@ namespace webrtc { namespace { -// When PacerPushbackExperiment is enabled, build-up in the pacer due to -// the congestion window and/or data spikes reduces encoder allocations. -bool IsPacerPushbackExperimentEnabled() { - return field_trial::IsEnabled("WebRTC-PacerPushbackExperiment"); -} - // By default, pacer emergency stops encoder when buffer reaches a high level. bool IsPacerEmergencyStopDisabled() { return field_trial::IsEnabled("WebRTC-DisablePacerEmergencyStop"); @@ -35,8 +29,7 @@ bool IsPacerEmergencyStopDisabled() { } // namespace CongestionControlHandler::CongestionControlHandler() - : pacer_pushback_experiment_(IsPacerPushbackExperimentEnabled()), - disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) { + : disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) { sequenced_checker_.Detach(); } @@ -67,19 +60,6 @@ absl::optional CongestionControlHandler::GetUpdate() { bool pause_encoding = false; if (!network_available_) { pause_encoding = true; - } else if (pacer_pushback_experiment_) { - const int64_t queue_length_ms = pacer_expected_queue_ms_; - if (queue_length_ms == 0) { - encoding_rate_ratio_ = 1.0; - } else if (queue_length_ms > 50) { - double encoding_ratio = 1.0 - queue_length_ms / 1000.0; - encoding_rate_ratio_ = std::min(encoding_rate_ratio_, encoding_ratio); - encoding_rate_ratio_ = std::max(encoding_rate_ratio_, 0.0); - } - new_outgoing.target_rate = new_outgoing.target_rate * encoding_rate_ratio_; - log_target_rate = new_outgoing.target_rate; - if (new_outgoing.target_rate < DataRate::kbps(50)) - pause_encoding = true; } else if (!disable_pacer_emergency_stop_ && pacer_expected_queue_ms_ > PacedSender::kMaxQueueLengthMs) { pause_encoding = true; diff --git a/modules/congestion_controller/rtp/control_handler.h b/modules/congestion_controller/rtp/control_handler.h index e9016c78a5..cf6d70c1de 100644 --- a/modules/congestion_controller/rtp/control_handler.h +++ b/modules/congestion_controller/rtp/control_handler.h @@ -43,10 +43,8 @@ class CongestionControlHandler { bool network_available_ = true; bool encoder_paused_in_last_report_ = false; - const bool pacer_pushback_experiment_; const bool disable_pacer_emergency_stop_; int64_t pacer_expected_queue_ms_ = 0; - double encoding_rate_ratio_ = 1.0; rtc::SequencedTaskChecker sequenced_checker_; RTC_DISALLOW_COPY_AND_ASSIGN(CongestionControlHandler); diff --git a/modules/congestion_controller/send_side_congestion_controller.cc b/modules/congestion_controller/send_side_congestion_controller.cc index e41aef18d1..1080f9befa 100644 --- a/modules/congestion_controller/send_side_congestion_controller.cc +++ b/modules/congestion_controller/send_side_congestion_controller.cc @@ -37,7 +37,6 @@ namespace webrtc { namespace { -const char kPacerPushbackExperiment[] = "WebRTC-PacerPushbackExperiment"; static const int64_t kRetransmitWindowSizeMs = 500; // Makes sure that the bitrate and the min, max values are in valid range. @@ -74,12 +73,6 @@ void SortPacketFeedbackVector( std::sort(input->begin(), input->end(), PacketFeedbackComparator()); } -bool IsPacerPushbackExperimentEnabled( - const WebRtcKeyValueConfig* const key_value_config) { - return key_value_config->Lookup(kPacerPushbackExperiment).find("Enabled") == - 0; -} - } // namespace DEPRECATED_SendSideCongestionController:: @@ -116,9 +109,7 @@ DEPRECATED_SendSideCongestionController:: send_side_bwe_with_overhead_( key_value_config_->Lookup("WebRTC-SendSideBwe-WithOverhead") .find("Enabled") == 0), - transport_overhead_bytes_per_packet_(0), - pacer_pushback_experiment_( - IsPacerPushbackExperimentEnabled(key_value_config_)) { + transport_overhead_bytes_per_packet_(0) { RateControlSettings experiment_params = RateControlSettings::ParseFromKeyValueConfig(key_value_config); if (experiment_params.UseCongestionWindow()) { @@ -500,21 +491,8 @@ void DEPRECATED_SendSideCongestionController::MaybeTriggerOnNetworkChanged() { rtc::CritScope lock(&network_state_lock_); bitrate_bps = congestion_window_pushback_controller_->UpdateTargetBitrate( bitrate_bps); - } else if (!pacer_pushback_experiment_) { - bitrate_bps = IsSendQueueFull() ? 0 : bitrate_bps; } else { - int64_t queue_length_ms = pacer_->ExpectedQueueTimeMs(); - - if (queue_length_ms == 0) { - encoding_rate_ = 1.0; - } else if (queue_length_ms > 50) { - float encoding_rate = 1.0 - queue_length_ms / 1000.0; - encoding_rate_ = std::min(encoding_rate_, encoding_rate); - encoding_rate_ = std::max(encoding_rate_, 0.0f); - } - - bitrate_bps *= encoding_rate_; - bitrate_bps = bitrate_bps < 50000 ? 0 : bitrate_bps; + bitrate_bps = IsSendQueueFull() ? 0 : bitrate_bps; } if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { diff --git a/modules/congestion_controller/send_side_congestion_controller_unittest.cc b/modules/congestion_controller/send_side_congestion_controller_unittest.cc index 484296f53f..e959b5342b 100644 --- a/modules/congestion_controller/send_side_congestion_controller_unittest.cc +++ b/modules/congestion_controller/send_side_congestion_controller_unittest.cc @@ -365,43 +365,5 @@ TEST_F(LegacySendSideCongestionControllerTest, UpdatesDelayBasedEstimate) { EXPECT_LT(*target_bitrate_bps_, bitrate_before_delay); } -TEST_F(LegacySendSideCongestionControllerTest, PacerQueueEncodeRatePushback) { - ScopedFieldTrials pushback_field_trial( - "WebRTC-PacerPushbackExperiment/Enabled/"); - SetUp(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0)); - controller_->Process(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(100)); - EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 0.9, _, _, _)); - controller_->Process(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(50)); - controller_->Process(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0)); - EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); - controller_->Process(); - - const uint32_t kMinAdjustedBps = 50000; - int expected_queue_threshold = - 1000 - kMinAdjustedBps * 1000.0 / kInitialBitrateBps; - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) - .WillOnce(Return(expected_queue_threshold)); - EXPECT_CALL(observer_, OnNetworkChanged(Ge(kMinAdjustedBps), _, _, _)); - controller_->Process(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) - .WillOnce(Return(expected_queue_threshold + 1)); - EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); - controller_->Process(); - - EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()).WillOnce(Return(0)); - EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); - controller_->Process(); -} - } // namespace test } // namespace webrtc diff --git a/test/scenario/scenario_tests/bbr_performance.cc b/test/scenario/scenario_tests/bbr_performance.cc index 03c00e977c..57e17986c1 100644 --- a/test/scenario/scenario_tests/bbr_performance.cc +++ b/test/scenario/scenario_tests/bbr_performance.cc @@ -101,7 +101,6 @@ struct CallTestConfig { if (tuning.use_bbr) { trials += "WebRTC-BweCongestionController/Enabled,BBR/" - "WebRTC-PacerPushbackExperiment/Enabled/" "WebRTC-Pacer-DrainQueue/Disabled/" "WebRTC-Pacer-PadInSilence/Enabled/" "WebRTC-Pacer-BlockAudio/Disabled/" diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc index 5738f8b7f3..bf8bf211a3 100644 --- a/video/full_stack_tests.cc +++ b/video/full_stack_tests.cc @@ -60,8 +60,6 @@ namespace webrtc { namespace { static const int kFullStackTestDurationSecs = 45; -const char kPacerPushBackExperiment[] = - "WebRTC-PacerPushbackExperiment/Enabled/"; const char kVp8TrustedRateControllerFieldTrial[] = "WebRTC-LibvpxVp8TrustedRateController/Enabled/"; @@ -1485,8 +1483,7 @@ class DualStreamsTest : public ::testing::TestWithParam {}; TEST_P(DualStreamsTest, ModeratelyRestricted_SlidesVp8_2TL_Simulcast_Video_Simulcast_High) { test::ScopedFieldTrials field_trial( - AppendFieldTrials(std::string(kPacerPushBackExperiment) + - std::string(kScreenshareSimulcastExperiment))); + AppendFieldTrials(std::string(kScreenshareSimulcastExperiment))); const int first_stream = GetParam(); ParamsWithLogging dual_streams; @@ -1548,8 +1545,6 @@ TEST_P(DualStreamsTest, // !defined(WEBRTC_MAC) TEST_P(DualStreamsTest, Conference_Restricted) { - test::ScopedFieldTrials field_trial( - AppendFieldTrials(std::string(kPacerPushBackExperiment))); const int first_stream = GetParam(); ParamsWithLogging dual_streams;