Skip to content

Don't allocate when decoding uncompressed and block-based formats #9

@RunDevelopment

Description

@RunDevelopment

The block-based decoders (BC + sub-sampled) and all rectangle decoders currently process the image line by line. This requires allocating on the heap to store a line. Of course, only one allocation is used for all lines, but it would still be better to have none.

It's possible to change all of those decoders to decode images with just a bit of stack memory. Instead of reading an entire line, split each line into chunks small enough to fit into a fixed-size buffer on the stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions