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

mod intra_edge: Backport memory reduction from dav1d 1.2.1 #830

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

fbossen
Copy link
Collaborator

@fbossen fbossen commented Mar 17, 2024

Eliminate duplicate and constant intra_edge table entries

@fbossen
Copy link
Collaborator Author

fbossen commented Mar 17, 2024

Relates to #286

@fbossen fbossen requested a review from folkertdev March 17, 2024 17:00
Copy link
Collaborator

@folkertdev folkertdev 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 this looks good except for some minor style/consistency nitpicks

src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
Remove `EDGE_` prefix from constant names and use `EdgeFlags::union_all` in
conjunction with constants.
@fbossen
Copy link
Collaborator Author

fbossen commented Mar 17, 2024

I think this looks good except for some minor style/consistency nitpicks

Thanks for the feedback. I made the suggested changes.

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.

Mostly looks very good, but I had a few more suggestions. Also, by using 2-byte EdgeIndexs instead of 8-byte pointers, our table should be even smaller than C's 🎉 .

src/decode.rs Outdated Show resolved Hide resolved
src/decode.rs Outdated Show resolved Hide resolved
src/decode.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
src/intra_edge.rs Outdated Show resolved Hide resolved
@randomPoison randomPoison merged commit 57d50de into memorysafety:main Mar 19, 2024
18 checks passed
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.

5 participants