Backport memory optimization for palette mode from dav1d 1.3.0#838
Backport memory optimization for palette mode from dav1d 1.3.0#838kkysen merged 7 commits intomemorysafety:mainfrom
Conversation
kkysen
left a comment
There was a problem hiding this comment.
Left some comments, still reviewing though.
randomPoison
left a comment
There was a problem hiding this comment.
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.
3e7df7c to
ef966f2
Compare
@kkysen Have you had a chance to look at it some more? |
kkysen
left a comment
There was a problem hiding this comment.
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.
Reduces memory usage by 6 kB per sb128 in 8bpc streams that uses screen content tools when frame-threading is enabled.
…alignment of `pal` field
`Rav1dTaskContext_scratch` is already aligned
kkysen
left a comment
There was a problem hiding this comment.
LGTM. I'll follow-up on how we can improve the alignment stuff, but this way is definitely good enough for now.
Allocate memory for palette mode according to bit depth of pixel instead of fixed
u16size.