Skip to content

Backport memory optimization for palette mode from dav1d 1.3.0#838

Merged
kkysen merged 7 commits intomemorysafety:mainfrom
fbossen:bp-1.3.0-pal
Mar 29, 2024
Merged

Backport memory optimization for palette mode from dav1d 1.3.0#838
kkysen merged 7 commits intomemorysafety:mainfrom
fbossen:bp-1.3.0-pal

Conversation

@fbossen
Copy link
Contributor

@fbossen fbossen commented Mar 18, 2024

Allocate memory for palette mode according to bit depth of pixel instead of fixed u16 size.

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.

Left some comments, still reviewing though.

Copy link
Collaborator

@randomPoison randomPoison left a comment

Choose a reason for hiding this comment

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

The translations of the C changes to Rust look correct to me. I didn't see an obvious source for the CI test failures though. I'll give this a final approval once CI has been fixed.

@fbossen fbossen force-pushed the bp-1.3.0-pal branch 3 times, most recently from 3e7df7c to ef966f2 Compare March 27, 2024 20:30
@fbossen
Copy link
Contributor Author

fbossen commented Mar 27, 2024

Left some comments, still reviewing though.

@kkysen Have you had a chance to look at it some more?

@kkysen kkysen self-requested a review March 28, 2024 01:08
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'm still looking into the generic alignment issue. Also, I'm assuming the large functions were just moved. The rest looks good except for a couple comments I made. Sorry I forgot to review this again; I know there've been a bunch of merge conflicts.

gramner-twoorioles and others added 7 commits March 28, 2024 21:03
Reduces memory usage by 6 kB per sb128 in 8bpc streams that
uses screen content tools when frame-threading is enabled.
`Rav1dTaskContext_scratch` is already aligned
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.

LGTM. I'll follow-up on how we can improve the alignment stuff, but this way is definitely good enough for now.

@kkysen kkysen merged commit 0521463 into memorysafety:main Mar 29, 2024
@kkysen kkysen added backports Backports from dav1d memory usage labels Mar 11, 2025
@kkysen kkysen linked an issue Mar 11, 2025 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backports Backports from dav1d memory usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport updates from dav1d 1.3.0

4 participants