Subject: [payload] FlexFEC draft feedback

From: Brian Baldino <[email-masked]>
Date: Wed, 29 Nov 2017 12:18:18 -0800

I've been implementing flexfec on the jitsi videobridge (starting with just
the receive side for now) and came across a couple things.  Also Boris
Grozev has compiled some notes from his readings of the draft; I've tried
to summarize all our thoughts here:

1) It would be nice if the draft mentioned that the header extensions of
the FEC packets are totally independent of the media's header extensions,
and that one can add extensions to FEC packets without having any effect on
the recovery.

2) It would be nice if the draft explicitly stated that RTP header
extensions (and anything in the header beyond the 12 byte fixed header,
really) is protected as part of the payload.

3) I don't think it's explicitly mentioned that the first bit of the mask
represents a delta value of '0' (and, therefore, a '1' in that bit means
that the base sequence number itself is protected), it would be nice to
call this out [in Section 6.3.1.2 maybe?]

4) In some of the diagrams there is a typo making it look like the 'P'
field is 2 bits instead of 1 (Figures 10, 12, 13, and 15)

4) From an implementation perspective, I found the extraction of the mask
to be a bit of a pain due to having to extract the k bits and shift the
actual mask to get the offsets.  I wondered if there was a reason not to
move the second k bit next to the first to make them consecutive, followed
by a consecutive mask.  I thought of two ways this might be done:

a) Put a 2 bit k field at the start of the mask.  There are multiple ways
to define an encoding for those 2 bits to represent a 14, 46 or 110 mask.
This has the downside of making the first mask 1 bit smaller (14 bits vs
15) but does allow for encoding a 4th mask length, if so desired.

b) Put a variable (either 1 or 2) bit k field at the start of the mask.
Similar to the current scheme, if the first bit was a '1' it would mean it
was only a 15 bit mask and the second bit would not be used to represent
the mask size,  If the first bit was a '0', then the next bit will also be
used to determine the mask size. I.e.:
1 -> 15 bit mask (only one bit spent)
01 -> 46 bit mask
00 -> 110 bit mask

-brian