Skip to content

Very slow decoding of paletted PNG images #393

@Shnatsel

Description

@Shnatsel

zune-png benchmarks show that the png crate is much slower than other decoders on indexed images - a whopping 3x slower than zune-png.

CPU profile shows that 71% of the time is spent in png::utils::unpack_bits, specifically this hot loop.

The code is full of indexing and doesn't look amenable to autovectorization. I think the entire function will have to be rewritten; it's probably a good idea to copy zune-png here.

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