webrtc_gcc_delay (webrtc v0.1.0)
View SourceDelay-based over-use detection of Google Congestion Control (draft-ietf-rmcat-gcc-02 §5.1 to §5.4).
- Pre-filtering (§5.2): packets sent within
burst_time(5 ms) of the first packet of a group form a group; a packet that arrives within 5 ms of the previous one with a negative delay variation belongs to the current group (a burst after an outage), as long as the group does not span more than 100 ms of arrivals. Packets sent before the current group are out of order and ignored. - Arrival-time filter (§5.3): the draft allows any adaptive filter. This module uses the trendline estimator of libwebrtc: the accumulated inter-group delay variation d(i) is smoothed (coefficient 0.9) and the slope of a least squares fit over the last 20 groups is the estimate m(i), scaled by min(groups, 60) x 4.
- Over-use detector (§5.4): over-use when m(i) stays above the adaptive threshold for more than overuse_time_th (10 ms) and two groups and m(i) is not decreasing; under-use when m(i) is below minus the threshold. The threshold follows the dynamic equation of §5.4 with libwebrtc's trendline gains (K_u 0.0087, K_d 0.039), is not updated when |m(i)| exceeds it by more than 15, and is clamped to [6, 600], starting at 12.5.
batch/2 takes the received packets of one feedback message as {SendUs, ArrivalUs} in sequence order and returns the signal for the rate controller: overuse when over-use was detected while processing the batch, otherwise the detector state. Memory is constant.