-
Notifications
You must be signed in to change notification settings - Fork 517
[Rust]Ported AVC Module to Rust #1730
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
[Rust]Ported AVC Module to Rust #1730
Conversation
src/rust/src/avc/sei.rs
Outdated
| // Save the data and process once we know the sequence number | ||
| if ((ctx.cc_count as usize + local_cc_count) * 3) + 1 > ctx.cc_databufsize { | ||
| let new_size = ((ctx.cc_count as usize + local_cc_count) * 6) + 1; | ||
| ctx.cc_data.resize(new_size, 0); |
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.
You can use this, it will be faster.
ctx.cc_data.reserve(new_size);
unsafe { ctx.cc_data.set_len(new_size); }
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.
resolved
| // TODO: This really really looks bad | ||
| info!("WARNING: Unexpected SEI unit length...trying to continue."); | ||
| // temp_debug = 1; // This appears to be a global debug flag - omitted in Rust version |
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.
What?
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.
Hi, that's not actually my comment. I decided to just preserve the TODOs I didn't know what to do with. If you want, I could try to implement a solution.
| fn find_next_zero(slice: &[u8]) -> Option<usize> { | ||
| slice.iter().position(|&b| b == 0x00) | ||
| } |
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.
You can SIMD optimize this function for faster outputs.
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.
resolved
src/rust/src/avc/nal.rs
Outdated
| } | ||
|
|
||
| if (*dec_ctx.avc_ctx).pic_order_cnt_type == 1 { | ||
| panic!("In slice_header: AVC: ctx->avc_ctx->pic_order_cnt_type == 1 not yet supported."); |
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.
You can replace panic! with Err(...)
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.
resolved
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 3f44115...:
All tests passing on the master branch were passed completely. Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 3f44115...:
Congratulations: Merging this PR would fix the following tests:
All tests passing on the master branch were passed completely. Check the result page for more info. |
prateekmedia
left a comment
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.
LGTM!
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This PR fixes the AVC functionality which was broken and migrates the entire
avc_functions.candavc_functions.hto Rust.tested on This AVC stream