This is a proof-of-concept implementation of a parallel-decodable PNG format, based on ideas from https://github.com/brion/mtpng However, it adds a ne

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-09-20 09:00:03

This is a proof-of-concept implementation of a parallel-decodable PNG format, based on ideas from https://github.com/brion/mtpng

However, it adds a new ancilliarry chunk, called pLLD, which advises compatible encoders that they may decode the file in parallel pieces.

This specific implementation isn't particularly fast (It's written in Python), but it demonstrates how the data can be split into independently decodable pieces. Another limitation of this implementation is that it does not support filters.

See samples/parallel_out.png for an example PNG, containing a pLLD chunk, and 8 IDAT chunks, each containing their own piece of the image.

Piece height gives the height of each piece, in pixels. In instances where the image height is not evenly divisible by the piece height, the last piece may be smaller (but not larger).

A decoder should be able to determine the number of such pieces by calculating ceiling(image_height / piece_height). Each piece is stored in its own IDAT chunk.

Leave a Comment