Increase FEC receiver's protected packet queue size.

- The FEC receiver tracks maximum of 48 media packets at a time, and packet reordering can delay the FEC packet from its protected media packets by more than 48 sequences.
- Such FEC packets do not get purged until much later when newer FEC packets with much higher sequence mark them as old.
- Until that happens, they sit in the receiver queue, wasting CPU cycles.
- If the receiver maintains a larger queue size for the media packets, it increases possibility of having all media packets in the queue, thereby organically purging the FEC packet.
- More importantly, this also increases the efficacy of FEC decode for such packet, since media packets now remain relevant for longer and aid in lost packet recovery.

Bug: webrtc:12656
Change-Id: Id0058df9a23ea31839decf2c37e0670a54c947fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215882
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33989}
This commit is contained in:
Harsh Maniar
2021-04-21 01:21:53 -07:00
committed by WebRTC LUCI CQ
parent 256bec8237
commit 085eceb9ec
4 changed files with 24 additions and 11 deletions

View File

@ -392,7 +392,7 @@ TEST_F(UlpfecReceiverTest, PacketNotDroppedTooEarly) {
delayed_fec = fec_packets.front();
// Fill the FEC decoder. No packets should be dropped.
const size_t kNumMediaPacketsBatch2 = 46;
const size_t kNumMediaPacketsBatch2 = 191;
std::list<AugmentedPacket*> augmented_media_packets_batch2;
ForwardErrorCorrection::PacketList media_packets_batch2;
for (size_t i = 0; i < kNumMediaPacketsBatch2; ++i) {
@ -431,7 +431,7 @@ TEST_F(UlpfecReceiverTest, PacketDroppedWhenTooOld) {
delayed_fec = fec_packets.front();
// Fill the FEC decoder and force the last packet to be dropped.
const size_t kNumMediaPacketsBatch2 = 48;
const size_t kNumMediaPacketsBatch2 = 192;
std::list<AugmentedPacket*> augmented_media_packets_batch2;
ForwardErrorCorrection::PacketList media_packets_batch2;
for (size_t i = 0; i < kNumMediaPacketsBatch2; ++i) {