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

struct Rav1dContext: Make frame contexts a Box<[_]> #1000

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

rinon
Copy link
Collaborator

@rinon rinon commented Apr 24, 2024

Replaces the C allocation and fc array pointer of Rav1dFrameContext structures with a Rust boxed slice.

@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch from b66f230 to 6a9559a Compare April 24, 2024 01:58
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch from 0d6cbc5 to 6ff6d35 Compare April 24, 2024 01:58
@kkysen kkysen changed the title Rav1dContext: Make frame contexts a boxed slice struct Rav1dContext: Make frame contexts a Box<[_]> Apr 24, 2024
@kkysen kkysen self-assigned this Apr 24, 2024
Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Generally LGMT. Only little things are that we should just use % instead of .wrapping_rem. .wrapping_rem is only there since other operations have .wrapping_* versions, but this one does nothing extra. Also, for the place where you did .fc_iter and .nth, I think we should do % and indexing like is done for the other places, and is done in C.

src/decode.rs Outdated Show resolved Hide resolved
src/internal.rs Show resolved Hide resolved
src/internal.rs Show resolved Hide resolved
src/internal.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/obu.rs Outdated Show resolved Hide resolved
src/thread_task.rs Outdated Show resolved Hide resolved
src/thread_task.rs Outdated Show resolved Hide resolved
src/thread_task.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch 3 times, most recently from 934c8d1 to 7928da5 Compare April 24, 2024 06:30
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch from 6ff6d35 to da70a54 Compare April 24, 2024 06:30
@rinon rinon requested a review from kkysen April 24, 2024 06:30
@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch from 7928da5 to 5a07699 Compare April 24, 2024 06:31
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch from da70a54 to 7793631 Compare April 24, 2024 06:31
Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

I think you might've missed a few of the changes. The .wrapping_rems are still there.

@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch from 5a07699 to e2b4317 Compare April 24, 2024 07:08
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch 2 times, most recently from 3626706 to 7d53b2f Compare April 24, 2024 07:14
@rinon rinon requested a review from kkysen April 24, 2024 07:15
@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch from e2b4317 to 5ac674d Compare April 25, 2024 01:12
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch from 7d53b2f to 16e15d6 Compare April 25, 2024 01:12
Replaces the C allocation and `fc` array pointer of `Rav1dFrameContext`
structures with a Rust boxed slice.
@rinon rinon force-pushed the sjc/rav1dframecontext/split_mutability branch from 5ac674d to 32bc8ba Compare April 25, 2024 18:42
@rinon rinon force-pushed the sjc/rav1dframecontext/owned branch from 16e15d6 to b83c712 Compare April 25, 2024 18:42
Base automatically changed from sjc/rav1dframecontext/split_mutability to main April 25, 2024 18:57
@rinon rinon merged commit 502452a into main Apr 25, 2024
21 checks passed
@rinon rinon deleted the sjc/rav1dframecontext/owned branch April 25, 2024 19:01
@rinon rinon linked an issue Apr 26, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert Dav1dContext::fc to be a Vec
2 participants