-
Notifications
You must be signed in to change notification settings - Fork 293
Split toxav_bit_rate_set() into two functions to hold the maximum bitrates libvpx supports #578
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
Conversation
@xhebox You forget to update |
@diablo oh my, sorry, i am so hurried |
@xhebox: Can you rebase this on master and check the checkbox on the right to allow contributors to push to your PR branch? Also, the CI fails, likely because you didn't update toxav.api.h. |
@iphydf sorry for the late reply, but there are still some controversial problems, that's why i stop working.. see #572 (comment) , i am actually waiting for a reply about this comment, how do we deal with the '-1' flag? i've commented two options in the next comment, tell me if you have a better idea. i'm willing to continue my work if you give me a clear statement about it. |
libvpx not specifying max bitrate and using integers that have implementation dependent widths complicates things a lot. No, this can't be. There must be max birate specified somewhere. Otherwise how is this even supposed to be portable? On one machine |
@xhebox I see, thanks. I've replied on that issue. |
@xhebox code needs reformatting. |
Well, my last comment is somewhat irrelevant to this PR or the issue in question in general, it was more of a reaction on zoff's comment in the issue thread #572 (comment). Should have replied in there instead of here. |
@xhebox run astyle on the code to format it, you can find astyle rule file and the command to use at https://github.com/TokTok/c-toxcore/tree/master/other/astyle. |
toxav/toxav.c, line 1052 at r1 (raw file):
We use I'd say that this function needs to return Comments from Reviewable |
* we may want to prevent from passing overflowed bitrates to libvpx | ||
* more in detail, it's the case where bit_rate is larger than uint, but smaller than uint32_t | ||
*/ | ||
return bit_rate > UINT_MAX; |
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.
This is fine, I just want to note that it may cause compiler warnings on ILP64 systems (we have never tested any of those, so we have no idea if anything in toxcore works on them, 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.
@iphydf I have idea about how to detect if it's ILP64 or LP64(sizeof?). But i think it's fine since most computers are still using int of 4 bytes. And if it's ILP64, uint32_t is not large enough at all. In my view, we could sleep on it for now.
Reviewed 3 of 4 files at r1, 1 of 1 files at r2. Comments from Reviewable |
Please enable the checkbox "Allow edits from maintainers." on the bottom right. This allows us to squash the commits and rebase on master before merge. @nurupo can you review this? |
@iphydf enabled :) |
Introduced in TokTok/c-toxcore#578.
Introduced in TokTok/c-toxcore#578.
@iphydf can you keep the old |
Introduced in TokTok/c-toxcore#578.
Introduced in TokTok/c-toxcore#578.
Introduced in TokTok/c-toxcore#578.
Introduced in TokTok/c-toxcore#578.
following #572
This change is