Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 3c65a2b

Browse files
Erik SprångCommit Bot
authored andcommitted
Cleans up code related to video packetization overhead.
Bug: webrtc:10155 Change-Id: Idc3aaa916e38a18e5ca9dc861587e96465915c64 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186660 Reviewed-by: Sebastian Jansson <[email protected]> Commit-Queue: Erik Språng <[email protected]> Cr-Commit-Position: refs/heads/master@{#32312}
1 parent f67bb27 commit 3c65a2b

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

call/rtp_video_sender.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,6 @@ RtpVideoSender::RtpVideoSender(
334334
: send_side_bwe_with_overhead_(absl::StartsWith(
335335
field_trials_.Lookup("WebRTC-SendSideBwe-WithOverhead"),
336336
"Enabled")),
337-
account_for_packetization_overhead_(!absl::StartsWith(
338-
field_trials_.Lookup("WebRTC-SubtractPacketizationOverhead"),
339-
"Disabled")),
340337
has_packet_feedback_(TransportSeqNumExtensionConfigured(rtp_config)),
341338
use_deferred_fec_(!absl::StartsWith(
342339
field_trials_.Lookup("WebRTC-DeferredFecGeneration"),
@@ -786,16 +783,13 @@ void RtpVideoSender::OnBitrateUpdated(BitrateAllocationUpdate update,
786783
// since |fec_allowed_| may be toggled back on at any moment.
787784
}
788785

789-
uint32_t packetization_rate_bps = 0;
790-
if (account_for_packetization_overhead_) {
791786
// Subtract packetization overhead from the encoder target. If target rate
792787
// is really low, cap the overhead at 50%. This also avoids the case where
793788
// |encoder_target_rate_bps_| is 0 due to encoder pause event while the
794789
// packetization rate is positive since packets are still flowing.
795-
packetization_rate_bps =
796-
std::min(GetPacketizationOverheadRate(), encoder_target_rate_bps_ / 2);
797-
encoder_target_rate_bps_ -= packetization_rate_bps;
798-
}
790+
uint32_t packetization_rate_bps =
791+
std::min(GetPacketizationOverheadRate(), encoder_target_rate_bps_ / 2);
792+
encoder_target_rate_bps_ -= packetization_rate_bps;
799793

800794
loss_mask_vector_.clear();
801795

call/rtp_video_sender.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ class RtpVideoSender : public RtpVideoSenderInterface,
171171

172172
const FieldTrialBasedConfig field_trials_;
173173
const bool send_side_bwe_with_overhead_;
174-
const bool account_for_packetization_overhead_;
175174
const bool has_packet_feedback_;
176175
const bool use_deferred_fec_;
177176

video/end_to_end_tests/bandwidth_tests.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ TEST_F(BandwidthEndToEndTest, ReportsSetEncoderRates) {
319319
// test, due to the packetization overhead and encoder pushback.
320320
webrtc::test::ScopedFieldTrials field_trials(
321321
std::string(field_trial::GetFieldTrialString()) +
322-
"WebRTC-SubtractPacketizationOverhead/Disabled/"
323322
"WebRTC-VideoRateControl/bitrate_adjuster:false/");
324323
class EncoderRateStatsTest : public test::EndToEndTest,
325324
public test::FakeEncoder {

video/video_send_stream_tests.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,10 +2936,9 @@ TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
29362936
static const int kIncreasedStartBitrateKbps = 451;
29372937
static const int kIncreasedMaxBitrateKbps = 597;
29382938
// If these fields trial are on, we get lower bitrates than expected by this
2939-
// test, due to the packetization overhead and encoder pushback.
2939+
// test, due to encoder pushback.
29402940
webrtc::test::ScopedFieldTrials field_trials(
29412941
std::string(field_trial::GetFieldTrialString()) +
2942-
"WebRTC-SubtractPacketizationOverhead/Disabled/"
29432942
"WebRTC-VideoRateControl/bitrate_adjuster:false/");
29442943

29452944
class EncoderBitrateThresholdObserver : public test::SendTest,

0 commit comments

Comments
 (0)