Skip to content
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

Fix miscalculation when increasing layer #541

Merged
merged 27 commits into from
Apr 2, 2021
Merged

Fix miscalculation when increasing layer #541

merged 27 commits into from
Apr 2, 2021

Conversation

penguinol
Copy link
Contributor

We should subtract the whole bitrate of provisional layer when increasing to a higher spatial layer.

@ibc
Copy link
Member

ibc commented Apr 2, 2021

Please run npm run lint (there will be errors) and then npm run worker:format to fix them.

Also, could you please detail the rationale of this change? I fail to see it.

@ibc ibc requested review from jmillan and ibc April 2, 2021 16:53
@penguinol
Copy link
Contributor Author

penguinol commented Apr 2, 2021

When we increse to a higher spatial layer, we need to know how mush additional bitrate is needed.
But GetLayerBitrate only return the bitrate of one temporal layer.
For example, we have a S2T2 stream.
When we are sending S1T2, means we are both sending packets of S1T1 and S1T2
Then we tried to increase to S2T1, so the addtional bitrate = bitrate of S2T1 - (bitrate of S1T1 + bitrate of S1T2)
And GetBirate(0,1) = GetLayerBitrate(0, 0) + GetLayerBitrate(0, 1), so here should be GetBitrate

@ibc
Copy link
Member

ibc commented Apr 2, 2021

You are 100% right. Thanks. Merging.

Copy link
Member

@ibc ibc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

releasing a new version in a few minutes.

@ibc ibc merged commit 9dbaa78 into versatica:v3 Apr 2, 2021
Copy link
Member

@jmillan jmillan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants