-
Notifications
You must be signed in to change notification settings - Fork 442
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
[FEAT] Add bitstream
module in lib_ccxr
#1649
base: master
Are you sure you want to change the base?
[FEAT] Add bitstream
module in lib_ccxr
#1649
Conversation
src/lib_ccx/cc_bitstream.h
Outdated
@@ -25,6 +24,9 @@ struct bitstream | |||
// increased by the calling function, or not. | |||
unsigned char *_i_pos; | |||
int _i_bpos; | |||
#ifndef DISABLE_RUST | |||
void *rust_bs; // Pointer to Rust's Bitstream struct |
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.
Could we construct / deconstruct the struct when passing to rust instead of storing a different pointer?
There are other files, where you can see the to_ctype()
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.
yaa surely, this should be a better approach rather than having to maintain two structures. I will try to fix it in my next commit
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.
@prateekmedia , I have made changes in the bitstream.rs
file , can you please review it now
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.
will check this.
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This PR migrates the bitstream functionality from C to Rust while maintaining backward compatibility by creating a new Rust implementation in
lib_ccxr/src/common/bitstream.rs
and connecting it to the existing C code through FFI bindings.