mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
WebP/Lossy: Reduce size of MacroblockMetadata from 80 to 20 bytes
For a 1024x1024 image, saves about a quarter MB of memory use while decoding (compared to the decompressed image data itself needing 4 MiB). Not a huge win, but also very easy to do, so might as well. No behavior change, no measurable performance impact.
This commit is contained in:
parent
4df3b5e1d2
commit
24aa302e88
2 changed files with 3 additions and 3 deletions
|
@ -405,7 +405,7 @@ ErrorOr<u8> tree_decode(BooleanDecoder& decoder, ReadonlySpan<TreeIndex> tree, R
|
|||
struct MacroblockMetadata {
|
||||
// https://datatracker.ietf.org/doc/html/rfc6386#section-10 "Segment-Based Feature Adjustments"
|
||||
// Read only if `update_mb_segmentation_map` is set.
|
||||
int segment_id { 0 }; // 0, 1, 2, or 3. Fits in two bits.
|
||||
u8 segment_id { 0 }; // 0, 1, 2, or 3. Fits in two bits.
|
||||
|
||||
// https://datatracker.ietf.org/doc/html/rfc6386#section-11.1 "mb_skip_coeff"
|
||||
bool skip_coefficients { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue