diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc index aa53ff89a3..56c23d905f 100644 --- a/call/rtp_video_sender.cc +++ b/call/rtp_video_sender.cc @@ -334,9 +334,6 @@ RtpVideoSender::RtpVideoSender( : send_side_bwe_with_overhead_(absl::StartsWith( field_trials_.Lookup("WebRTC-SendSideBwe-WithOverhead"), "Enabled")), - account_for_packetization_overhead_(!absl::StartsWith( - field_trials_.Lookup("WebRTC-SubtractPacketizationOverhead"), - "Disabled")), has_packet_feedback_(TransportSeqNumExtensionConfigured(rtp_config)), use_deferred_fec_(!absl::StartsWith( field_trials_.Lookup("WebRTC-DeferredFecGeneration"), @@ -786,16 +783,13 @@ void RtpVideoSender::OnBitrateUpdated(BitrateAllocationUpdate update, // since |fec_allowed_| may be toggled back on at any moment. } - uint32_t packetization_rate_bps = 0; - if (account_for_packetization_overhead_) { // Subtract packetization overhead from the encoder target. If target rate // is really low, cap the overhead at 50%. This also avoids the case where // |encoder_target_rate_bps_| is 0 due to encoder pause event while the // packetization rate is positive since packets are still flowing. - packetization_rate_bps = - std::min(GetPacketizationOverheadRate(), encoder_target_rate_bps_ / 2); - encoder_target_rate_bps_ -= packetization_rate_bps; - } + uint32_t packetization_rate_bps = + std::min(GetPacketizationOverheadRate(), encoder_target_rate_bps_ / 2); + encoder_target_rate_bps_ -= packetization_rate_bps; loss_mask_vector_.clear(); diff --git a/call/rtp_video_sender.h b/call/rtp_video_sender.h index 33dd5b744a..5eaaa29f2d 100644 --- a/call/rtp_video_sender.h +++ b/call/rtp_video_sender.h @@ -171,7 +171,6 @@ class RtpVideoSender : public RtpVideoSenderInterface, const FieldTrialBasedConfig field_trials_; const bool send_side_bwe_with_overhead_; - const bool account_for_packetization_overhead_; const bool has_packet_feedback_; const bool use_deferred_fec_; diff --git a/video/end_to_end_tests/bandwidth_tests.cc b/video/end_to_end_tests/bandwidth_tests.cc index 6428207e62..721738393b 100644 --- a/video/end_to_end_tests/bandwidth_tests.cc +++ b/video/end_to_end_tests/bandwidth_tests.cc @@ -319,7 +319,6 @@ TEST_F(BandwidthEndToEndTest, ReportsSetEncoderRates) { // test, due to the packetization overhead and encoder pushback. webrtc::test::ScopedFieldTrials field_trials( std::string(field_trial::GetFieldTrialString()) + - "WebRTC-SubtractPacketizationOverhead/Disabled/" "WebRTC-VideoRateControl/bitrate_adjuster:false/"); class EncoderRateStatsTest : public test::EndToEndTest, public test::FakeEncoder { diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc index 24795bb2cd..02e8b2bd7f 100644 --- a/video/video_send_stream_tests.cc +++ b/video/video_send_stream_tests.cc @@ -2936,10 +2936,9 @@ TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) { static const int kIncreasedStartBitrateKbps = 451; static const int kIncreasedMaxBitrateKbps = 597; // If these fields trial are on, we get lower bitrates than expected by this - // test, due to the packetization overhead and encoder pushback. + // test, due to encoder pushback. webrtc::test::ScopedFieldTrials field_trials( std::string(field_trial::GetFieldTrialString()) + - "WebRTC-SubtractPacketizationOverhead/Disabled/" "WebRTC-VideoRateControl/bitrate_adjuster:false/"); class EncoderBitrateThresholdObserver : public test::SendTest,