-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align BWE ArrivalGroup calculation with libwebrtc implementation #608
Conversation
Great idea! I looked a the code before I read your comment and was like OMG, we're adding cxx?! :D
I think negative send deltas are fine. We should handle them. Notice how the second type, large, is a i16.
I don't care if at some point in our BWE code, we want to match libwebrtc and we use milliseconds instead of |
So here is a successful CI run under ubuntu with that libwebrtc captured data (other targets have some cpp compilation issues which I haven't looked at since it does not really matter). I've removed all irrelevant stuff and this is ready to be merged.
Okay, I'll take a closer look at this a bit later.
Yea, that would be an internal
And that's the main problem - I am not sure at all whether this would be helpful or not :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what this does, but if it fixes our impl to be like libWebRTC it's 👍 with me.
Any thoughts from you @k0nserv? |
@alexlapa I'll have a look, did you base this on a recent version of libWebRTC or the same commit( The concern would be that using more recent versions of this code, but older versions of the surrounding code might not work well. |
Btw I don't see why we shouldn't use the most precise time available to us(so staying with |
@k0nserv ,
Based on current master (63334690f216949b3d57e2931c9c4cd28621e500) but there is little difference between these committs.
That would be my next PR or i can include this here if you want. That's like ~5 lines of code anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I made a new branch saving away your work for the future. https://github.com/algesten/str0m/tree/bwe-compare-libwebrtc This is from the commit |
Excellent work. Thanks! |
So there are some differences in str0m's
ArrivalGroupAccumulator
and libwebrtc'sInterArrivalDelta
implementation that affect trendline estimator bandwidth usage hypothesis thus the final BWE result. This PR alligns str0m's implementation so it would work more like libwebrtc's.Changes are pretty straightforward, only
ArrivalGroup::belongs_to_group
is modified and it corresponds to this two functions in libwebrtc.And to show that modified
ArrivalGroup
works like libwebrtc's implementation this PR includes some tests based on the data captured in libwebrtc that run modifiedArrivalGroup
next to the latest libwebrtc implementation (it is slightly modified but it won't affect results). I will obviously remove this before merge.Also I've got few things to discuss here:
Instant
. This obviously affects how everything in BWE module works, but I'm really not sure in what way exactly. Perhaps, better precision produces results that are more precise? But on the other hand it seems to be an explicit decision on libwebrtc's side that also has a todo that says that it is not necessary to confuse me even moreI can "fix" both these things in another PR, but I'm really not sure whether they should be fixed in the first place. So let me know what you think about this.