memorysafety / rav1d

An AV1 decoder in Rust.
BSD 2-Clause "Simplified" License
321 stars 22 forks source link

`enum Av1BlockIntraInter`: Remove `#[repr(C)]`, reducing size by 4 bytes #1333

Closed kkysen closed 2 months ago

kkysen commented 2 months ago

This is a simpler, fully safe alternative to #1331. It reduces Av1BlockIntraInter from 28 to 24 bytes, and Av1Block from 36 to 32 bytes, just like #1331.

I haven't checked memory usage, though, since I'm not sure how to do that, but since it reduces the type sizes the same, I assume it would have the same memory savings.