mirror of
https://github.com/livekit/livekit.git
synced 2026-04-07 05:35:40 +00:00
* Use EWMA (Exponentially Weighted Moving Average) for score updates. Makes code simpler, but makes it harder to test as the inflection points are not exact. Score falls a bit slower to be conservative on dropping quality too quickly. Still fall factor is higher (i. e. newer scores get more weight) than rise factor (i. e. newer scores get lower weight). Slower rise factor to introduce hysteresis on things climibing back too quickly. In the extreme case, asympttotic conditions could cause unexpected results. For example, having 4% loss of video continously will never drop quality to `POOR`. It will get close to 60, but it will always stay above 60 forever and hence quality will never drop to POOR. Maybe, need some sort of variable thresholding to deal with that. But, that is an extreme case and may not happen in real life. * remove unused stuff