Rust in Everything
← Papers

FMT: Lossless Image Compression in a Fixed Number of Parallel Steps

Ammar Ali

2026-11-18▲ 10arXiv 2611.23108v1Hugging Face

AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.

TL;DR

FMT is a lossless image format whose coarse-to-fine tree and rANS lanes fix the number of sequential decoding steps, letting GPU decoders trade little size for large speed gains.

Problem

Learned lossless codecs produce smaller files than classical codecs but decode a photo in seconds rather than milliseconds. The paper argues much of this time is spent waiting: networks wait for values they condition on, and arithmetic decoders read values one at a time. Faster learned variants give up most of their size gain. The work targets a codec that keeps learned-codec size while decoding in a fixed number of sequential steps.

Method

FMT decodes an image from coarse to fine: a root stores one pixel every S=64 pixels in each direction, then L=6 levels each halve the spacing, first adding square centres and then side midpoints so every new pixel has decoded neighbours on all sides. Each value is predicted from earlier decoded pixels, and the file stores only a sign-folded residual, binarised as its bit length followed by its bits. Three modes pay for these decisions differently: fast stores the corrections of a 5/3 wavelet at fixed widths with no entropy coder, dense predicts with the mean of four neighbours and uses 256 histograms, and neural modes give every correction its own probability with networks from 16 x 2 to 768 x 4. During decoding all values of a step are predicted at once, then interleaved rANS lanes decode them in parallel and keep their states from step to step. The root spacing fixes the number of steps at 36 or 72, and lanes are sized by the image, so neither prediction nor entropy decoding has a chain that grows with image size.

Results

  • On Kodak, the fast mode reaches 3.981 bits per subpixel at 0.23 ms and the 512 x 4 reaches 2.589 bits per subpixel at 53.5 ms; no codec run on the same GPU beats any FMT mode on both size and speed. §4.2
  • Against learned codecs on Kodak, the 512 x 4 is 61 times faster than ArIB-BPS at 0.2% smaller size, and 18 times faster than HPAC-FT at 2.7% larger size. §4.2
  • At full load, the fast mode decodes 8.8 to 11.8 gigapixels per second, more than any codec run. §4.3
  • In a 768 x 512 photo, the root holds 96 pixels, the first level adds 288, and the last level adds 294,912. §3.1
  • With fresh lanes at every step instead of states carried across steps, files grow by up to 14%, or about 24% in the dense mode. §1

Limitations

  • FMT is built for 8-bit photos written once and read many times; 10 to 16-bit images need networks trained on them and wider frequency tables, and the paper says it tested photographs only (Limitations).
  • Per-photo tuning takes seconds on the GPU: 3.5–8.9 s per Kodak photo with the 512 x 4 on an A100, and HPAC-FT takes 8.45 s; on a CPU, FMT is competitive only one image at a time (Limitations).
  • The decoder keeps tables and buffers for each image size, 276–403 bytes per pixel, up to 9.6 GB for a 33-megapixel image, and a 64 x 64 thumbnail still takes the 72 steps: 3.2 ms with 16 x 2 against about 0.5 ms for CPU codecs (Limitations).
  • The best codecs that adapt to each image remain 1.8–3.4% smaller on the full sets; 128 x 2 and larger networks have no CPU decoder yet, and their portable kernels cost 3.0–4.4 x in fp32 or up to 1.2 x with 8-bit layers for files at most 0.25% larger (Limitations).

Key points

  • An entropy decoder needs a value's probability, computed from values decoded before it, so decoding forms a chain: the network waits for conditioning values and the coder reads one value after another. §1
  • The tree stores a root of one pixel every 64 pixels in each direction, then six levels; each level adds centres and then edges, so every new pixel has decoded neighbours on all sides and values in one step do not depend on each other. §3.1
  • Residuals are sign-folded as in LOCO-I and binarised into a size decision and then bits; the modes differ in how they pay for these decisions. §3.2
  • The fast mode uses a 5/3 wavelet at fixed widths, the dense mode predicts with the mean of four neighbours and 256 histograms, and neural modes use networks from 16 x 2 to 768 x 4. §3.3
  • Within a step the GPU predicts all values at once, and interleaved rANS lanes decode corrections in parallel and carry states from step to step; at most 72 steps are needed. §3.4
  • On Kodak, CLIC.p/4 and DIV2K/4, no codec run on the same GPU beats any FMT mode on both size and speed. §4.2
  • At full load the fast mode reaches 8.8 to 11.8 gigapixels per second, while a large network serves latency and one photo fills the GPU at 7 MP/s. §4.3
  • Streams of the RTX 4090 for fast, dense and 16 x 2 to 64 x 2 decode bit for bit on an RTX 3090; 128 x 2, 512 x 4 and 768 x 4 do not with standard kernels. §S5.2

Mind map

FMT
Problem
Learned codecs decode in seconds
Waiting not computing
Size versus speed tradeoff
Method
Coarse-to-fine pixel tree
Residual path coding
Parallel rANS lanes
States carried across steps
Fixed number of steps
Modes
Fast 5/3 wavelet
Dense histograms
Neural 16x2 to 768x4
Results
No codec wins on size and speed
Fast mode 8.8-11.8 GP/s
Learned codecs 9-61x slower
Bit-exact GPU decoding
Limitations
8-bit photos only
Tuning takes seconds
Memory per image size
Larger networks lack CPU decoder
Best adaptive codecs smaller