Skip to content

otf-pixels-codec-jpeg@0.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 14:55
· 31 commits to main since this release
77444d0

Changed

  • The README and every crate's README follow the Open Tech Foundation layout:
    a centred title and tagline, short sections, and tables instead of long
    paragraphs. Each crate's README says what it is for, when to use
    otf-pixels instead, and shows a working example (all are compiled and
    run against real files) with a table of its API. The main README adds a
    comparison with libvips/sharp, ImageMagick, Pillow and the image crate,
    with measured timings, and names ES-Runtime as the project built on Pixels.
  • Every output now runs on Scheduler::global(), one process-wide pool of
    one worker per core, unless given a scheduler of its own (ADR-0016).
    Before, each output spawned a pool for itself, so a host running 40 jobs
    at once ran 40 pools on the same cores unless it knew to pass a shared
    scheduler, which the first host to embed Pixels did not. 40 concurrent
    PNG-to-JPEG thumbnails run about 13% faster. threads and
    scheduler_options still give a run a private pool, and their docs and
    EMBEDDING.md now say to leave them unset in a concurrent host. A run
    started on a pool worker gets a private pool, so it cannot wait on the
    pool it is occupying. Idle workers sleep until there is work instead of
    waking every millisecond.
  • The README's "Status" section, a milestone-by-milestone progress log, is
    removed now that the v1 milestones are done; ROADMAP.md and the changelog
    keep that history.

Fixed

  • Opening a WebP decoded the whole image, so asking its size or metadata
    cost a full decode (about 30 ms for a 1280x800 photo). Opening now parses
    only the container and the bitstream header, and the image decodes when
    its first row is read; metadata takes microseconds. A bitstream damaged
    past its header is now reported by the run rather than by opening.
  • EMBEDDING.md recommended with_threads(1) on an output, which does not
    exist; the threading section is rewritten around the new default.
  • PNG decoding was about 8x slower than it should be (216 ms for a
    1280x800 photo, now 18 ms), almost all of it in inflate, which ran some
    360x slower than zlib. It dropped consumed input after every symbol,
    shifting the rest of the buffer each time, so its cost grew with the square
    of the stream; it also cloned both Huffman tables per symbol and decoded
    codes a bit at a time. Input is now dropped only in large batches, a step
    decodes a run of symbols, codes up to 10 bits decode with one table lookup,
    and back-references copy in bulk. Inflate is within 1.4x of zlib. In the
    PNG decoder, filters are chosen once per line rather than per byte, Paeth
    reconstructs whole pixels, and 8-bit rows already in the output layout
    are copied rather than converted pixel by pixel.
  • Every link in the README was broken on the otf-pixels crates.io page,
    including the embedding guide: crates.io resolved them against the crate's
    directory, not the repository root. They are now absolute GitHub URLs, and
    tsr readmes fails on a relative link in any README a crate ships.
  • Only otf-pixels declared a README, so the crates.io pages of the other
    ten crates were blank. Each now has its own README.md, saying what it
    does and pointing to the otf-pixels facade, and tsr readmes (part of
    tsr ci) fails if a published crate does not ship one.