-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
toxav.c causing low FPS due to bad memory allocation #1601
Comments
@mannol wrote the ToxAV code, so if it's an issue in toxcore, they're aware. But, IIRC the issue of low FPS on video was something subliun was trying to work through. And the end result of that conversation was that Java is just too inefficient when it comes to converting YUV data on arm devices. So my guess at this point is the issue is more likely Antox's rather than inside toxcore. |
Hey @GrayHatter, I took a look at VideoSendThread thread implementation in Call.scala So the heaviest and longest operations here are in FormatConversions.scala:
-
//////////////////////////////////////////////////// |
@vassad There is a one big allocation (that I can think of) that can be removed (the one you mentioned), I'll try to do it today. |
@mannol Thanks a lot! Will wait for your progress :) It is great to know that the project is such alive) |
Here is my fix of this code: To tox devs: if you guys thing your code ok, tox will die. |
Ah yes, that is the fix I'm talking about. @isotoxin Would you mind making a PR instead of me? |
Don't you mind do it C99 style (with designators) initialization? It would be easier to read and maintain. |
@isotoxin wonderful fix :) but why didn't you PR it for the the last 9 months since the fix? testing the solution perhaps) |
Cuz PR on this repo' are never merged ? You'd be better to propose the PR on TokTok/toxcore ;) |
Why cant you fix it without PR? Somebody told me my fix is not compatible with old version of libvpx. Im not a linux programmer and I dont know how to resolve this issue. (Ok, I do not even want to think about this problem, because I hate linux way of library usage) You see my code, why you do not want to make toxcore a little better without any PR's? For the sake of the good in the world. |
Fine. |
Wow, chill out) Let's just do everything to make it finally be fixed :) |
hey @mannol , the project failed to build due to the old VPX version installed on the Travis machine (Ubuntu 14.04, vpx 1.3.2) - that's why the .cs, .range, .bit_depth, .d_w, .r_w, .r_h, .x_chroma_shift, .y_chroma_shift and .fb_priv are stated as UNDEFINED FIELDS. So, there are main four ways here:
|
Do you mind image data copy? |
A pull request will be soon, for the 3) way from @Mikhael-Danilov ... And whant about the build.tox.chat? (Jenkins builder) How we can use it for solving and testing the issues? |
Great! I'll close my PR then :^) |
Make was successfull, tests success is no worse than the master toxcore results: PASS: encryptsave_test Perhaps it should be merged?) |
Actually it passes all tests (as master do) on my machine. But for some reason lots of tests fail on Travis... |
Thank you all for your work! |
@Mikhael-Danilov that's Travis for you |
@GrayHatter this one for master: this one for my PR: Or... This travis-ci builds&tests are deprecated and still mentioned in README.md by accident? |
Android tox client (Antox) is suffering from low FPS. Investigating this issue, i came to the native implementation of tox, which could faster up much the FPS.
toxav_video_send_frame
method in toxav.c has quite heavy and unnecessary memory allocation for each frame to encode.vpx_img_alloc(&img, VPX_IMG_FMT_I420, width, height, 0);
So:
img
each time the video capture begins, and free it when video capture stops. This could lead to the proplems when several threads will want to access this object, so i want a discussion to decide the best way to solve the issue.The text was updated successfully, but these errors were encountered: