Image codec benchmark

Run metadata

Chart 1 — rate / distortion

x = SSIMULACRA2, y = file size. Lower file size for a given SSIMULACRA2 is better. One line per series (codec + effort + depth).

Chart 2 — encode cost

x = SSIMULACRA2, y = encode time (best of N). Same series as above.

Visual comparison

The question here is how this image would look on a real web page, not pixel-peeping. Each variant is shown at half its intrinsic size — what a site does when serving 2×-density imagery to a high-DPR display. No zoom, no pan.

Click a variant or press its number key. Hold space to flip back to the lossless reference.

Backdrop:
Loading variants…

Lossless

Each codec is swept across its effort levels (avifenc -s, cjxl -e, cwebp -z), so these are curves rather than single points.

Every row is decoded and asserted bit-exact against the reference and asserted to score exactly 100.00 — either check failing aborts the run, so a size here is a real lossless size.

All results

Depth is an AVIF-only axis. avifenc -d sets the coded bit depth, and 10-bit 4:4:4 typically scores better than 8-bit at the same -q. JPEG XL has no equivalent: its bitstream declares 8-bit for an 8-bit source, but lossy JXL reconstructs in float/XYB, so the 8 bits are only the final rounding step rather than a setting that was chosen. Those rows show — rather than a number that would invite reading the two as like-for-like.

Caveats

Non-goals