Images: formats, pixel models and algorithms
A primary-source catalog for sparkles:{image,video}: how other ecosystems model pixels and views, decode and encode image formats safely, run image algorithms on SIMD and GPU compute, and move bytes from storage to the GPU. It exists to inform a design decision that is not yet made: whether the library is one package or splits into image-core, image-formats and image-algorithms. That decision follows the research and a round of experiments, not this page.
IMPORTANT
This tree is under construction. Wave 0 delivered the Sparkles baseline (what the repository already has or has specified), the papers and the hardware matrix. The master catalog lists every subject with its tier and the wave that delivers it; a subject is linked once its deep-dive exists.
Last reviewed: November 7, 2026
Questions this survey answers
- Pixel and memory model. Which representation of planes, strides, tiles, views and N-D extents serves both a viewer and a scientific pipeline, and does mir's
Slicefit? - Generic interfaces in D. Which mechanism (concepts, traits, type classes, design by introspection) carries pixel and image abstractions, and which cross-language ideas transfer?
- Generic algorithms that stay fast. Lazy ranges, algorithm/schedule separation, SIMD dispatch and GPU kernels: how do they compose?
- Codec architecture. What gives incremental, suspendable, hostile-input-safe decoding (Wuffs), and what must the
sparkles:wiredbinary description format express? - Colour, HDR and metadata. ICC, CICP, gain maps, EXIF and XMP: what is the minimum model?
- File to GPU. How do
sparkles:event-horizon, io_uring/IoRing, Vulkan upload, GPU decompression and GPU texture formats fit together? - SIMD versus GPU compute. Where is the break-even, and what is shared between the two kernel forms?
- Correctness. Oracles, conformance corpora, fuzzing and differential testing.
- Package boundaries. Evidence for or against a split into image-core, formats and algorithms.
Sparkles baseline
What the repository ships, specifies, drafts and plans in each area the image work touches. Every doc separates those four statuses, ends with gaps tagged by the questions above, and lists the open decisions for the design review.
| Area | Covers | Link |
|---|---|---|
sparkles:wired and Flat | what binary description can express today versus what image headers and codecs need | Baseline |
sparkles:event-horizon | io_uring ops, offload pools, fibers; the file-to-GPU seam; I/O-bound and CPU-bound use | Baseline |
sparkles:vulkan and ui-vulkan | bound commands and extensions, memory sub-allocator, the one upload path | Baseline |
sparkles:shaders, math, host SIMD | graphics-only shaders, compute milestones, SIMD precedents and dispatch | Baseline |
| Existing image code and consumers | the two PNG decoders, alpha conventions, terminal images, oracles, explorer template | Baseline |
Papers
Seven annotated bibliographies. Each entry gives a claim, a verbatim quote checked against the paper's text, its relevance to Sparkles and its caveats; each thread ends with a synthesis. The PDFs live outside the repository, under ~/code/repos/papers/image-video/<thread>/.
| Thread | Covers | Link |
|---|---|---|
| DSLs and scheduling | algorithm/schedule separation, fusion and tiling, autoschedulers, hardware targets | Papers |
| Generic image programming | pixel and view concepts, N-D arrays, functional image models | Papers |
| Resampling and colour | reconstruction filters, compositing, colour appearance, HDR transfer, ICC, CICP | Papers |
| Entropy coding and codecs | ANS and Huffman decoding speed, context modelling, JPEG XL, AV1, WebP, HEVC | Papers |
| GPU texture compression | BCn, ETC2, ASTC, Basis/UASTC, KTX2, neural texture compression | Papers |
| Hostile input and safety | LangSec, verified parsers, fuzzing, image-codec exploit analyses, Wuffs | Papers |
| Storage-to-GPU and GPU decode | io_uring, DirectStorage/GDeflate, GPU Huffman/ANS/DEFLATE/JPEG, Vulkan Video | Papers |
Hardware
What the machines available to this work expose, measured with one read-only probe: CPU SIMD, io_uring, Vulkan formats, Vulkan Video profiles, compute features and the platform media API. Every cell is verified on a device.
| Page | Covers | Link |
|---|---|---|
| Hardware matrix | AMD, NVIDIA and Intel Linux desktops, laptops and a server, an Apple M4 Max, Snapdragon 888 and 8 Elite phones | Matrix |
| Run the hardware probe | the media-hw-probe flake app, for adding a machine | Contribute |
Synthesis and experiments
| Page | Covers | Link |
|---|---|---|
| Comparison | the field at a glance, by dimension, its consensus and trade-offs, answers to Q1–Q9, delta to Sparkles | Comparison |
The Slice experiment | mir's Slice as an image view, under dip1000, betterC, wasm32 and Android | Experiment |
| The wired experiment | PNG, QOI and ISOBMFF framing described in the Flat draft and in current sparkles:wired | Experiment |
| wired requirements | the non-binding requirements IMW1–IMW25 the wired experiment yields | Requirements |
| Concepts | the shared vocabulary | Concepts |
Master catalog
The terms the deep-dives share (stride, view, plane, transfer function, suspendable decoding and the rest) are defined once in Concepts.
Every subject the survey covers, with the depth it gets. The tier is a working assignment, and any subject can be promoted or demoted:
- Tier A is a full deep-dive: all ten analysis dimensions, verbatim quotes, and citations pinned to the cloned revision.
- Tier B is a short deep-dive covering only the dimensions where the subject teaches something.
- Tier C is a row in the Tier C digest with a paragraph, read from official documentation only. Closed-source subjects are always Tier C.
The Basis column is the revision a deep-dive reads, from sources.tsv, or docs where nothing is cloned. A subject without a link is not written yet; its wave says when it is due.
| Subject | Ecosystem | Cluster | Tier | Basis | Wave | Doc |
|---|---|---|---|---|---|---|
mir-algorithm (Slice, ndslice) and mir-core | D | D landscape | A | clone 2da212382 | 1 | Deep-dive |
| dcv | D | D landscape | A | clone c777e2aa9 | 1 | Deep-dive |
| color (TurkeyMan) | D | D landscape | A | clone e9d31e416 | 1 | Deep-dive |
ae.utils.graphics (functional image processing) | D | D landscape | A | clone 7870bc3cd | 1 | Deep-dive |
| gamut | D | D landscape | B | clone 7f07b8ca3 | 2 | Deep-dive |
| arsd image modules | D | D landscape | B | clone 11491fa8b | 2 | Deep-dive |
| Dplug graphics | D | D landscape | B | clone f4a6d71ae | 2 | Deep-dive |
| intel-intrinsics | D | D landscape | B | clone 2141185c6 | 4 | Deep-dive |
| dcompute | D | D landscape | B | clone cdb5792d4 | 4 | Deep-dive |
| Boost.GIL (and its Adobe origin) | C++ | Generic libraries | A | clone 97ed52cc0 | 1 | Deep-dive |
| VIGRA | C++ | Generic libraries | A | clone de98f930b | 1 | Deep-dive |
| Halide | C++ DSL | Generic libraries | A | clone 85f161839 | 1 | Deep-dive |
| JuliaImages (ImageCore, ColorTypes) | Julia | Generic libraries | A | clone c3f815704 | 1 | Deep-dive |
| ITK | C++ | Generic libraries | A | clone 443d201c3 | 2 | Deep-dive |
OpenCV (cv::Mat, UMat, HAL) | C++ | Generic libraries | A | clone 96f8c0761 | 2 | Deep-dive |
| ImageSharp | C# | Generic libraries | A | clone b2b1ca9bd | 2 | Deep-dive |
| libvips | C | Generic libraries | A | clone b8242162f | 2 | Deep-dive |
| OpenImageIO | C++ | Generic libraries | A | clone e7eb5d109 | 2 | Deep-dive |
| image-rs | Rust | Generic libraries | A | clone 075e65d61 | 2 | Deep-dive |
| zune-image | Rust | Generic libraries | A | clone 2f9086b07 | 2 | Deep-dive |
Skia (SkPixmap, codecs, SkColorSpace) | C++ | Generic libraries | A | clone 3ad790ab4 | 2 | Deep-dive |
| CImg | C++ | Generic libraries | B | clone 38bb024de | 2 | Deep-dive |
| SAIL | C | Generic libraries | B | clone dccd2ebd5 | 2 | Deep-dive |
| stb_image | C | Generic libraries | B | clone 003501f6d | 2 | Deep-dive |
Go image and x/image | Go | Generic libraries | B | clone b06f1de3f | 2 | Deep-dive |
NumPy ndarray and the buffer protocol (PEP 3118) | Python | Generic libraries | B | clone b833c1b9b | 2 | Deep-dive |
| DLPack | C ABI | Generic libraries | B | clone 94485e235 | 2 | Deep-dive |
| GDAL, GeoTIFF and Cloud Optimized GeoTIFF | C++ | Generic libraries | B | clone 739fcf03b | 4 | Deep-dive |
ROS image_transport and cv_bridge | C++ | Generic libraries | B | clone faf0db265 | 4 | Deep-dive |
| Open3D and PCL | C++ | Generic libraries | C | clone b6c5e1963 | 4 | Digest |
| Wuffs | Wuffs, C | Formats | A | clone 4be865da2 | 3 | Deep-dive |
| libpng | C | Formats | A | clone 890812a28 | 3 | Deep-dive |
| libspng | C | Formats | A | clone 46c81dc2b | 3 | Deep-dive |
| libjpeg-turbo | C | Formats | A | clone 7b4993786 | 3 | Deep-dive |
| libwebp | C | Formats | A | clone 1844042d1 | 3 | Deep-dive |
| libjxl | C++ | Formats | A | clone e2948747f | 3 | Deep-dive |
| libavif | C | Formats | A | clone 9b07a9d7a | 3 | Deep-dive |
| OpenEXR | C++ | Formats | A | clone b0460b224 | 3 | Deep-dive |
| libheif | C++ | Formats | B | clone 12a259a58 | 3 | Deep-dive |
| libtiff | C | Formats | B | clone d23249978 | 3 | Deep-dive |
| QOI | spec | Formats | C | docs | 3 | Digest |
| Little CMS 2 | C | Colour | A | clone 5546f1d68 | 4 | Deep-dive |
| OpenColorIO | C++ | Colour | B | clone 22dd9c4fa | 4 | Deep-dive |
| ICC v4 and iccMAX | spec | Colour | B | docs | 4 | Deep-dive |
| CICP (ITU-T H.273) | spec | Colour | B | docs | 4 | Deep-dive |
| Ultra HDR and ISO 21496-1 gain maps | spec | Colour | B | docs | 4 | Deep-dive |
| ExifTool | Perl | Metadata | B | clone 2200871d9 | 3 | Deep-dive |
| Exiv2 | C++ | Metadata | B | clone be479c1b7 | 3 | Deep-dive |
| Simd (ermig1979) | C++ | GPU and SIMD | A | clone 37dd13062 | 4 | Deep-dive |
| Highway | C++ | GPU and SIMD | A | clone 872f22991 | 4 | Deep-dive |
| KTX-Software (KTX2) | C++ | GPU and SIMD | A | clone d9b1dd090 | 4 | Deep-dive |
| basis_universal | C++ | GPU and SIMD | A | clone ee771a7f9 | 4 | Deep-dive |
| libyuv | C++ | GPU and SIMD | B | clone 205022c08 | 4 | Deep-dive |
| nvImageCodec | C++, CUDA | GPU and SIMD | B | clone e7a7ef0f5 | 4 | Deep-dive |
glTF KHR_texture_basisu and texture extensions | spec | GPU and SIMD | B | clone 1c84b58ba | 4 | Deep-dive |
| Filament and bgfx texture pipelines | C++ | GPU and SIMD | B | clone 4e2df5e24 | 4 | Deep-dive |
| Godot texture import | C++ | GPU and SIMD | B | local clone | 4 | Deep-dive |
| Apple ImageIO | closed | GPU and SIMD | C | docs | 4 | Digest |
| Apple vImage (Accelerate) | closed | GPU and SIMD | C | docs | 4 | Digest |
| Intel IPP | closed | GPU and SIMD | C | docs | 4 | Digest |
| Vulkan transfer and memory decompression | spec | Storage to GPU | A | clone a8b088a3f | 4 | Deep-dive |
| DirectStorage and IoRing | Windows | Storage to GPU | B | clone 32f9411bc | 4 | Deep-dive |
io_uring registered buffers, O_DIRECT and dma-buf | Linux | Storage to GPU | B | docs | 4 | Deep-dive |
GPUDirect Storage (cuFile) | closed | Storage to GPU | C | docs | 4 | Digest |
| nvCOMP and GDeflate | closed | Storage to GPU | C | docs | 4 | Digest |
Metal fast resource loading (MTLIOCommandQueue) | closed | Storage to GPU | C | docs | 4 | Digest |
Analysis spine
Every deep-dive covers the same ten dimensions, in this order, and says "not applicable, because …" where one does not apply:
- Pixel and memory model: layout, planes, strides, views, tiles, N-D extents.
- Genericity mechanism: concepts, traits, type classes, introspection.
- Colour and metadata: ICC, CICP, HDR, EXIF and XMP.
- I/O and codec architecture: push or pull, incremental, suspendable.
- Hostile input and safety: bounds, limits, fuzzing.
- Allocation and ownership.
- CPU parallelism and SIMD.
- GPU offload and interop.
- Temporal, animation and containers.
- Testing and conformance.
Waves
| Wave | Delivers |
|---|---|
| 0 | the baseline, the papers and the hardware matrix (done) |
| 1 | the D landscape and the generic-programming core; the Slice experiment (done) |
| 2 | the generic and architectural libraries; the D Tier B subjects (done) |
| 3 | Wuffs, the stills codecs and metadata; the wired experiment and its requirements (done) |
| 4 | colour, SIMD, GPU textures and storage-to-GPU; the Tier C digest (done) |
| 5 | concepts.md completed, the taxonomy, the milestones and comparison.md with its delta against the baseline (done) |
Each wave ends with a verification pass by an agent that did not write the doc: every quote is re-read from the pinned clone, and ci check blob-paths runs before the commit.
Tier C digest
The Tier C digest covers Open3D and PCL, Apple ImageIO and vImage, Intel IPP, GPUDirect Storage, nvCOMP and GDeflate, Metal fast resource loading and QOI, from official documentation only.
Video subjects
Recorded here so the tiers can be reviewed together. They belong to the video catalog, written after this one, which reuses this page's concepts and spine.
| Subject | Tier | Basis |
|---|---|---|
FFmpeg (libavcodec, libavformat, libswscale) | A | clone a23e09448 |
| Vulkan Video | A | clone a8b088a3f, 24398af37 |
| dav1d | A | clone c6f51c881 |
| libplacebo | A | clone 275f7dea2 |
| GStreamer (with GES) | A | clone e91b21950 |
| ISOBMFF (MPEG reference and mp4parse-rust) | A | clone 689ac096a, d3a9abfc9 |
| Matroska and EBML | A | clone 289c9625d, a4b3c4a88 |
| mpv and libmpv | B | clone ad5877eda |
| AV1 specification | B | clone 5e04f3f75 |
| SVT-AV1 | B | clone a3ca29b7b |
| rav1e | B | clone 31435de9d |
| libaom | B | clone 60ce6c892 |
| libvpx | B | clone fb0a26ad9 |
| x264 | B | clone 0480cb05f |
| OpenH264 | B | clone 1bca62311 |
| libva | B | clone f052e984e |
| Intel VPL | B | clone 674d015bc |
| AMD AMF | B | clone 57ee0cfb0 |
| MLT | B | clone eca4e32d2 |
| OpenTimelineIO | B | clone 94e1ad6c9 |
| NVIDIA Video Codec SDK | C | docs, samples aa3544dce |
| VideoToolbox | C | docs |
| Android MediaCodec | C | docs |
| Media Foundation and D3D12 Video | C | docs |
| WebCodecs | C | docs |
| libwebrtc | C | docs (googlesource) |
| MPEG-TS and IVF | C | docs |
| HLS and DASH | C | docs |
| Blender VSE | C | docs |
Taxonomy
The tables below re-cut the master catalog along eight axes, one table per axis. Each row is one normalised category; the labels come from the analysis spine of every deep-dive, read back against the section that states them. A subject appears in more than one row only when the deep-dive describes more than one first-class model, and the Note says which is primary. The Tier C digest contributes its subjects by name where its paragraph states the property. Grouping by category records what the field does; it does not rank the subjects or choose a model for Sparkles.
By pixel and memory model
| Category | Subjects | Note |
|---|---|---|
| N-D strided array, one stride per axis | mir-algorithm, dcv, Halide, VIGRA, JuliaImages, NumPy, DLPack, OpenCV, GDAL, Open3D | Strides in elements (mir, VIGRA, DLPack, Halide) or bytes (NumPy, OpenCV step); signed in VIGRA and DLPack. mir puts the contiguity kind in the type; NumPy, DLPack and OpenCV carry a run-time element type. GDAL's N-D strided form is its multidimensional API, beside the 2-D band model below |
| N-D dense, no strides | CImg, ITK | CImg is a fixed 4-D (x, y, z, c) planar block; ITK adds physical geometry (origin, spacing, direction) and three regions over one contiguous buffer |
| 2-D interleaved view with a byte row stride | Boost.GIL, Go image, Skia, Simd, Dplug graphics, Gamut, ae.utils.graphics, libvips, OpenImageIO, SAIL, ROS image_transport, OpenColorIO, Little CMS 2, vImage, Intel IPP | The common viewer model: base pointer, extents and stride. Boost.GIL also has planar and packed views; Gamut's pitch is signed and adds a layer axis; OpenImageIO adds data and display windows; Little CMS 2 takes the strides as call arguments rather than a view type |
| Multi-planar, per-plane stride and subsampling | Wuffs, libavif, libheif, libyuv, nvImageCodec, OpenEXR, libwebp, libjpeg-turbo, zune-image | The YCbCr-first model (planes, chroma subsampling). Wuffs carries up to four planes; OpenEXR's planes are named channels; libwebp, libjpeg-turbo and zune-image expose raw planes beside an interleaved output; Go image and Skia have a separate YCbCr or YUVA family |
| Planar dense channels | zune-image, libjxl, Highway | zune-image's Image layer is one dense buffer per channel; libjxl's internal planes are padded and aligned while its API is interleaved; Highway's contrib/image is a planar padded-row image |
| Packed contiguous buffer, no stride | stb_image, libspng, arsd image modules, image-rs, Godot texture import, glTF textures, QOI | Width × height × channels with no padding. image-rs keeps a strided FlatSamples as a separate type |
| Row-addressed or segmented 2-D | libpng, libjpeg-turbo, ImageSharp | libpng and libjpeg-turbo write rows through caller row pointers; ImageSharp's rows live in a group of discontiguous aligned buffers |
| Tiled or chunked storage behind the view | libtiff, OpenEXR, GDAL, OpenImageIO, VIGRA, libvips | Tiling of the file or cache, not of the in-memory view: libtiff striles, OpenEXR chunks and deep data, GDAL block-cached bands, OpenImageIO's ImageCache, VIGRA's chunked store, libvips' lazy regions |
| GPU texture layout (levels, layers, blocks) | KTX-Software, Basis Universal, Filament and bgfx, Godot texture import, glTF textures, Vulkan transfer, DirectStorage and IoRing | Mip levels, layers and faces of block-compressed texels; Vulkan's device side is opaque optimal tiling, DirectStorage uses D3D12 copyable footprints |
| Element or descriptor only, no image | color, intel-intrinsics, dcompute, gain maps, CICP, ICC v4 and iccMAX, ExifTool, Exiv2, io_uring storage, ImageIO | color models one pixel struct; dcompute passes raw address-space pointers; gain maps bind two images by metadata; ImageIO hands out an opaque CGImage; the rest are specifications, metadata or I/O with no pixel model |
By genericity mechanism
| Category | Subjects | Note |
|---|---|---|
| D templates with design by introspection | ae.utils.graphics, mir-algorithm, dcv, color, intel-intrinsics, dcompute, Dplug graphics | Design by introspection: structural constraints and static if on optional primitives. dcv specialises on Slice kind without capability traits; Dplug uses traits at the leaves and run-time classes on the hot path |
| C++ templates with concepts, traits, tag dispatch | Boost.GIL, VIGRA, CImg, ITK, Highway | Concepts, traits and tag dispatch. ITK is templated inside a filter and virtual outside it; Highway's descriptor is a zero-sized tag plus a preprocessor pass per target |
| Trait or type-class polymorphism | image-rs, zune-image, ImageSharp, JuliaImages | Rust traits with associated types, C# static abstract members, Julia multiple dispatch with Holy traits. image-rs and zune-image pair them with a closed run-time enum (type erasure) |
| Staged DSL specialised per target | Halide | Halide compiles a pipeline per target from an algorithm and schedule; its ABI carries a run-time type tag per buffer |
| Run-time tag with C function tables | Wuffs, libjpeg-turbo, libwebp, libavif, libheif, libtiff, libjxl, OpenEXR, Skia, Little CMS 2, KTX-Software, SAIL, Gamut, GDAL, nvImageCodec, Basis Universal, Filament and bgfx, Godot texture import | The codec norm: an enum or descriptor selects function pointers or a plugin vtable. Wuffs, though written in its own memory-safe language, exposes interfaces as C vtables and resolves a run-time pixel-format word to a function pointer; libjpeg-turbo also monomorphises by preprocessor per sample width; libjxl uses Highway templates for SIMD only |
| Run-time type descriptor for interchange | NumPy, DLPack, OpenCV, OpenImageIO, libvips, ROS image_transport, Vulkan transfer | A value describes the element type (descr, code/bits/lanes, CV_8UC3, TypeDesc, an encoding string, a VkFormat with pNext chains); OpenCV and OpenImageIO switch to templates inside algorithms |
| Object hierarchy and virtual dispatch | arsd image modules, Go image, OpenColorIO, Exiv2 | Interfaces or class trees; Go's closed type switches are generated by gen.go; OpenColorIO optimises a run-time transform graph |
| Data-driven tables interpreted at run time | ExifTool, Exiv2 | Tag tables as data (Perl hashes with code strings; constexpr tables in Exiv2) |
| Preprocessor only, or none | libpng, libspng, stb_image, libyuv, Simd, vImage, Intel IPP | Format and sample type spelled in the function name or chosen by macro; Simd copies a kernel per instruction set |
| Not applicable | CICP, ICC v4 and iccMAX, gain maps, glTF textures, io_uring storage, DirectStorage and IoRing | Specifications and I/O interfaces |
By decode shape
| Category | Subjects | Note |
|---|---|---|
| Suspendable at any byte (coroutines) | Wuffs | Suspendable by construction: coroutine state lives in the decoder, input and output are caller buffers |
| Push-fed, resumes from saved state | libjxl, libpng, libwebp, ae.utils.graphics, ImageIO | Push: libjxl suspends at section boundaries, libpng's progressive reader per row and Adam7 pass, libwebp by checkpoint and replay; ae-graphics feeds libpng's progressive reader; ImageIO takes all accumulated bytes on each update and may re-parse them |
| Pull, retried when input runs short | libjpeg-turbo, libavif, zune-image | A suspending source returns "no data" and the call is repeated: libjpeg-turbo restarts the current MCU, libavif returns AVIF_RESULT_WAITING_ON_IO, zune-image retries JPEG from a checkpoint |
| Pull, row or chunk incremental, blocking | libspng, Skia, Boost.GIL, VIGRA, SAIL | Rows or frames arrive in order from a blocking reader; Skia's incremental decode is a re-call at row granularity for some codecs; SAIL decodes frame by frame |
| Pull, random access by tile, strip or region | libtiff, OpenEXR, GDAL, OpenImageIO, ITK, libvips, libheif, ExifTool, Exiv2 | The reader seeks to the unit it needs: libtiff striles, OpenEXR chunks, GDAL blocks, ITK requested regions, libvips demand-driven regions, libheif byte-range hints for tiles |
| Pull, whole file | stb_image, image-rs, ImageSharp, Go image, Gamut, CImg, arsd image modules, OpenCV, Simd, KTX-Software, Basis Universal, Filament and bgfx, Godot texture import, JuliaImages, dcv, Dplug graphics, QOI | Header and pixels may be split (Go's DecodeConfig, image-rs' decoder protocol, OpenCV's readHeader/readData), but the pixels arrive in one call. dcv and Dplug graphics delegate to Gamut |
| Batched asynchronous queue | nvImageCodec, DirectStorage and IoRing, GPUDirect Storage, nvCOMP, Metal fast resource loading | Requests are queued, completed out of band and often decompressed on the GPU |
| External process | ae.utils.graphics, CImg | ImageMagick or FFmpeg as a subprocess decoder (CImg as a fallback) |
| Not applicable | mir-algorithm, Halide, Highway, color, intel-intrinsics, dcompute, NumPy, DLPack, libyuv, OpenColorIO, Little CMS 2, ICC v4 and iccMAX, CICP, gain maps, glTF textures, Vulkan transfer, io_uring storage, ROS image_transport | No codec of its own. ROS delivers one whole frame per message through a transport plugin |
By hostile-input limits
| Category | Subjects | Note |
|---|---|---|
| Caller-set limits per decoder | libheif, libavif, image-rs, libspng, libpng, zune-image, OpenEXR, libjpeg-turbo, ImageSharp, libtiff, Skia | The hostile input defence as an API. libheif adds work budgets and memory accounting to a versioned struct; libavif caps pixels, dimensions and image count; image-rs' max_alloc is best-effort; libspng's limits default open; libjpeg-turbo's are opt-in through TurboJPEG; libtiff's allocation caps default to unlimited; Skia's fMaxDecodeMemory is honoured by few paths |
| Process-wide settings | OpenCV, OpenImageIO, libvips, GDAL | Environment variables or global attributes; libvips also blocks untrusted loaders; GDAL bounds caches and band count and leaves pixel budgets to the caller |
| Fixed library caps | Wuffs, stb_image, libjxl, libwebp, CImg, Gamut, Simd, Godot texture import, Basis Universal, Halide, arsd image modules, Little CMS 2, ICC v4 and iccMAX, Exiv2, ExifTool, Filament and bgfx, QOI | Compile-time or built-in constants. Wuffs' limits are structural (24-bit dimensions, an exact work-buffer length, fixed arrays); libjxl scales its built-in limits to the declared pixel count; Godot's checks are themselves overflowing |
| Bounds and overflow checks only | Go image, SAIL, ITK, KTX-Software, nvImageCodec, dcv | Go's contract is that the caller checks DecodeConfig first; dcv inherits Gamut's dimension caps |
| Platform or kernel limits | io_uring storage, DirectStorage and IoRing, Vulkan transfer, nvCOMP | RLIMIT_MEMLOCK and the per-buffer registration cap, staging and queue sizes, Vulkan valid usage enforced only by validation layers, chunk-size maxima |
| None | ae.utils.graphics, Boost.GIL, VIGRA, JuliaImages, mir-algorithm, Dplug graphics, libyuv, NumPy, DLPack, Highway, intel-intrinsics, dcompute, glTF textures, ROS image_transport, OpenColorIO | libyuv takes no buffer lengths at all; JuliaImages has libpng's compiled-in defaults only; ROS inherits OpenCV's; OpenColorIO has fixed LUT-size limits in its parsers only |
| Not applicable | CICP, color, gain maps | Gain-map metadata validation lives in the implementations (libavif, libultrahdr) |
By SIMD strategy
| Category | Subjects | Note |
|---|---|---|
| Portable SIMD library, run-time dispatch | Highway, libjxl, libvips, OpenCV, Skia | One source compiled per target, selected by run-time CPU dispatch. libjxl and libvips use Highway; OpenCV's universal intrinsics; Skia compiles portable source per target namespace behind three dispatchers |
| Portable SIMD library, compile-time selection | intel-intrinsics, Dplug graphics, Gamut, OpenImageIO | Intel's intrinsic API in D for any LDC or GDC target, chosen by the build; OpenImageIO's simd.h wrapper, with an optional static Highway that is off by default |
| Hand-written per ISA, run-time dispatch | libjpeg-turbo, libwebp, libyuv, Simd, zune-image, Wuffs, ImageSharp, OpenColorIO, OpenEXR, Little CMS 2, ICC v4 and iccMAX, Go image, Intel IPP | Intrinsics or assembly per target behind a CPU check. Wuffs chooses in-language (choose cpu_arch); ImageSharp's IsSupported branches fold under the JIT; OpenEXR mixes compile-time and run-time; Little CMS 2 only in its fast_float plug-in; ICC through skcms; Go only in x/image/vector |
| Hand-written per ISA, compile-time selection | libpng, libspng, stb_image, GDAL, Basis Universal | Chosen by compiler flags; libpng 1.6 has partial run-time checks; libspng applies target_clones to one function; Basis Universal's hand SIMD is in the encoder |
| Generated from a schedule | Halide | Vector code per target from the schedule, with multi-target ahead-of-time builds dispatched at run time |
| Auto-vectorisation only | mir-algorithm, dcv, ae.utils.graphics, VIGRA, ITK, CImg, JuliaImages, vImage | Auto-vectorisation by LLVM or the C++ compiler (mir's @fmamath, dcv's @fastmath on LDC); vImage vectorises internally and exposes no SIMD |
| Delegated to dependencies | image-rs, libavif, libheif, libtiff, SAIL, Filament and bgfx, nvImageCodec | The codec libraries underneath carry the SIMD (dav1d, libyuv, libsharpyuv, libswscale) |
| None | arsd image modules, Boost.GIL, color, KTX-Software, Exiv2, dcompute, gain maps, DirectStorage and IoRing | Scalar code. Gain maps' reference loop is scalar (libultrahdr uses a LUT); DirectStorage's CPU GDeflate decoder is thread-parallel across tiles |
| Not stated or not applicable | Godot texture import, ROS image_transport, NumPy, CICP, glTF textures, io_uring storage, Vulkan transfer, DLPack, ExifTool | The deep-dive reports no CPU kernel of the subject's own |
By GPU interop
| Category | Subjects | Note |
|---|---|---|
| Vulkan upload and import | Vulkan transfer, KTX-Software, io_uring storage, Godot texture import | Staging, host image copy, external memory from host pointers and dma-buf with DRM format modifiers; KTX-Software uploads levels into a VkImage; Godot compresses with compute (betsy) through RenderingDevice |
| Several graphics back ends, upload only | Skia, Filament and bgfx | Ganesh and Graphite in Skia; engine back ends in Filament and bgfx; no GPU decompression |
| GPU compute kernels from one source | Halide, OpenCV, OpenColorIO, dcompute, ITK, Basis Universal, gain maps | Halide targets CUDA, OpenCL, Metal, D3D12, Vulkan and WebGPU; OpenCV's OpenCL transparent API; OpenColorIO generates shader text; dcompute targets OpenCL and CUDA; ITK's OpenCL module; Basis Universal's OpenCL encoder; gain maps applied in a Skia runtime effect or libultrahdr's GLES path |
| CUDA decode and storage paths | nvImageCodec, GPUDirect Storage, nvCOMP, Open3D | Batched CUDA decode, DMA from storage into GPU memory, batched GPU decompression, device tensors |
| Storage-to-GPU decompression | DirectStorage and IoRing, Vulkan transfer, nvCOMP, Metal fast resource loading | GPU decompression of GDeflate in HLSL, through VK_NV_memory_decompression and VK_EXT_memory_decompression, or in CUDA; Metal IO command queues load compressed packs into textures |
| Device-tagged descriptor only | DLPack | Names CUDA, ROCm, OpenCL, Vulkan, Metal and others as devices; streams are defined for CUDA and ROCm only |
| Maps onto GPU state, no code | CICP, glTF textures | CICP values map onto Vulkan's sampler YCbCr conversion and swapchain colour spaces; glTF targets GPU block formats through KTX2 |
| None | ae.utils.graphics, arsd image modules, Boost.GIL, CImg, color, dcv, Dplug graphics, Gamut, mir-algorithm, VIGRA, JuliaImages, Highway, intel-intrinsics, Simd, libyuv, Go image, image-rs, ImageSharp, zune-image, GDAL, NumPy, ROS image_transport, Wuffs, libpng, libspng, stb_image, libjpeg-turbo, libwebp, libjxl, libavif, libheif, libtiff, OpenEXR, OpenImageIO, libvips, SAIL, Little CMS 2, ICC v4 and iccMAX, ExifTool, Exiv2, ImageIO, vImage, Intel IPP, QOI | All stills codecs, the colour libraries, the CPU libraries and the D landscape apart from dcompute; dcv uses OpenGL for display only, zune-image offloads HEVC decode to VideoToolbox only, OpenImageIO has CUDA-annotated description types only |
By colour management
| Category | Subjects | Note |
|---|---|---|
| ICC colour management applied | Little CMS 2, ICC v4 and iccMAX, Skia, libvips, ImageSharp, libjxl | A colour management module transforms through the profile connection space. Skia applies skcms at decode and adds CICP, PQ, HLG and gain maps; libvips calls Little CMS 2; ImageSharp converts ICC to sRGB; libjxl's CMS sits behind a function table |
| Config-driven colour pipelines | OpenColorIO, OpenImageIO | Colour spaces and transforms come from a configuration file; OpenImageIO adds CICP, ICC blobs and Color Interop Forum identifiers |
| CICP as the primary tag | CICP, libavif, libheif, image-rs, zune-image, gain maps | CICP values drive conversion; ICC is carried as bytes. image-rs maps ICC to CICP through moxcms; zune-image delegates its CMS to moxcms; gain maps need CICP or ICC to linearise and add a metadata record |
| Colour space in the element type | color, JuliaImages, VIGRA | The pixel type names its space (color's template parameters, JuliaImages' Colorant hierarchy, VIGRA's element types with conversion functors); color's set of spaces is a closed enum |
| Texture or container descriptor | KTX-Software, Basis Universal, glTF textures, Filament and bgfx, Vulkan transfer, OpenEXR, QOI | A Data Format Descriptor, an sRGB bit or format suffix, a sampler YCbCr conversion, OpenEXR's chromaticities and colorInteropID, QOI's two-value colour-space byte |
| YCbCr matrix and range only | libyuv, Simd, dcv, libwebp | Matrix coefficients and range as fixed tables; libwebp is fixed to BT.601 limited range and passes ICC through |
| Carried, not applied | Wuffs, libpng, libspng, libjpeg-turbo, libtiff, GDAL, Exiv2, ExifTool, OpenCV, Boost.GIL, SAIL, nvImageCodec, ImageIO, vImage | ICC and CICP bytes reported or passed through. libpng applies power-law gamma only; libspng a fixed 2.2 gamma table; Wuffs reports CICP, gamma, chromaticities and ICC ranges; ImageIO and vImage tag images with named colour spaces |
| None | ae.utils.graphics, arsd image modules, CImg, Gamut, Go image, Godot texture import, Halide, Highway, intel-intrinsics, ITK, mir-algorithm, NumPy, DLPack, dcompute, Dplug graphics, stb_image, ROS image_transport, DirectStorage and IoRing, io_uring storage | ae-graphics has one sRGB gamma ramp; Dplug assumes sRGB with a gamma-2 approximation |
By fuzzing
| Category | Subjects | Note |
|---|---|---|
| OSS-Fuzz and in-tree harnesses | Wuffs, libjxl, libavif, libjpeg-turbo, libspng, libtiff, libvips, libwebp, OpenEXR, Little CMS 2, Simd, Exiv2, stb_image, libpng, Skia, GDAL | OSS-Fuzz runs coverage-guided harnesses kept in the tree. libavif's FuzzTest targets also run in CI; libspng adds CIFuzz; libpng's harnesses exist on the 1.6 branch only; Skia's live under fuzz/oss_fuzz/; GDAL's per-format harnesses feed /vsimem/ |
| OSS-Fuzz recipes outside the project | OpenCV | The imdecode, imread and core fuzzers are recipes in the OSS-Fuzz repository, cloning OpenCV's default branch |
| In-tree harness run outside OSS-Fuzz | libheif, zune-image, OpenImageIO, image-rs, Go image, Halide, gain maps, ICC v4 and iccMAX | libheif runs its libFuzzer targets on pull requests through CIFuzz with a ClusterFuzz-derived corpus; zune-image per change and nightly; OpenImageIO nightly; image-rs' cargo-fuzz targets are not run in CI; Halide fuzzes its own bounds and simplifier reasoning; ICC through Little CMS 2's harness |
| Fuzz-found inputs only, or sanitizers only | ImageSharp, SAIL, Basis Universal, DirectStorage and IoRing | ImageSharp keeps regression images found by others' fuzzing; SAIL runs sanitizers in CI; Basis Universal has randomised self-tests; DirectStorage has an adversarial manifest for its GPU zstd decoder only |
| None | ae.utils.graphics, arsd image modules, color, dcv, Dplug graphics, Gamut, mir-algorithm, intel-intrinsics, dcompute, Boost.GIL, VIGRA, CImg, ITK, JuliaImages, Highway, libyuv, DLPack, NumPy, ROS image_transport, nvImageCodec, OpenColorIO, ExifTool, KTX-Software, Filament and bgfx, Godot texture import, glTF textures, CICP, Vulkan transfer, io_uring storage | No harness in the tree or on OSS-Fuzz; NumPy and ROS are listed because their deep-dives state none for the parts read. The Tier C digest states none for its subjects |
Milestones
When the capabilities and failures that shaped the field landed, in date order, as the deep-dives record them. A date is as precise as its deep-dive: a day where a commit, release note or advisory gives one, otherwise a month or a year. c. marks a date the deep-dive gives only approximately; a date followed by CVE year is the year in the identifier, not a disclosure date. Revisions read for this survey are not events and are left out; each deep-dive's metadata table records its own.
| Date | Subject | Event |
|---|---|---|
| 1988 | libtiff | The reference TIFF library is maintained from this year on |
| c. late 1990s | VIGRA | The 2-D ImageIterator/accessor design is built, before the N-D array views that replaced it |
| 2001-04 | ICC v4 and iccMAX | ICC.1:2001-04, the last specification of profile version 2 |
| 2003 | SAIL | ksquirrel-libs, SAIL's predecessor codec set for the KSquirrel viewer, is founded |
| 2004 | ICC v4 and iccMAX | ICC.1:2004 defines profile version 4 (ISO 15076-1): mAB /mBA , parametric curves, a required chad |
| 2005 | NumPy | The array interface (__array_interface__) is created |
| 2006 | OpenEXR | The earliest of the 88 CVEs that CHANGES.md cites |
| 2006-01-05 | Boost.GIL | ASL 1.0.12 adds GIL to the Adobe Source Libraries; the tutorial and design guide follow on January 16 |
| c. late 2006 | Boost.GIL | GIL is accepted into Boost |
| 2007-04-05 | Boost.GIL | ASL 1.0.26 ships GIL 2.0 |
| 2008-03-29 | Boost.GIL | Boost 1.35.0, the first Boost release with GIL |
| 2009 (CVE year) | Little CMS 2 | CVE-2009-0723: integer overflows in lcms 1.x |
| 2010-11-04 | Boost.GIL | ASL 1.0.43 removes GIL in favour of the Boost copy |
| 2011 | Boost.GIL | The I/O v2 extension is accepted into Boost (shipped in 1.68) |
| 2012 | Halide | Ragan-Kelley et al. publish the separation of algorithm and schedule |
| 2012 | VIGRA | Köthe's IPOL retrospective reports array views more convenient than hierarchical iterators for implementers |
| 2013 | Halide | The second paper adds compute_at and store_at, the two knobs of fusion and storage folding |
| 2013 (CVE year) | libjpeg-turbo | CVE-2013-6629: get_sos leaks uninitialised memory through duplicate component identifiers in a scan |
| 2014-03-18 | ae.utils.graphics | "[BREAKING] Overhaul": views, isView, Warp and Image!COLOR replace the canvas design |
| 2014-03-21 | ae.utils.graphics | parallel lands and the article Functional image processing in D is published the same day |
| 2014-12-26 | ae.utils.graphics | im_convert makes ImageMagick the general decoder |
| 2015-01-06 | color | dlang/phobos#2845, "Added std.experimental.color", is opened |
| 2015-06-24 | color | Initial commit of TurkeyMan/color; color 0.0.1 on the registry the same day |
| 2016 | CICP | ITU-T H.273 is published as twin text with ISO/IEC 23001-8:2016 |
| 2016 | Halide | Mullapudi et al.'s autoscheduler: greedy grouping over bounds analysis |
| 2016 | libjpeg-turbo | Commander and Markham report two resource-exhaustion scenarios that stem from the JPEG format itself |
| 2016 (CVE year) | Little CMS 2 | CVE-2016-10165: out-of-bounds read in Type_MLU_Read |
| 2016-01 | dcv | dcv is started; 546 of its 798 commits land in 2016 |
| 2017-08-06 | color | The Phobos pull request closes unmerged after 160 comments and 273 review comments |
| 2018 | Halide | Li et al. (gradient Halide) add a conservative autoscheduler |
| 2018 (CVE year) | Little CMS 2 | CVE-2018-16435: integer overflow in the CGATS parser's AllocateDataSet |
| 2018-02 | Wuffs | Wuffs fuzzing starts on OSS-Fuzz |
| 2019 | CICP | After the ISO split, H.273 is aligned with ISO/IEC 23091-2:2019 |
| 2019 | Halide | Adams et al.: beam search over loop nests with a learned cost model |
| 2019-01-03 | ae.utils.graphics | viewBMP: a BMP file becomes a zero-copy direct view; a libpng binding follows on January 9 |
| 2019-04 | image-rs | A published advisory documents an allocation-reinterpretation soundness bug and its removal |
| 2019-11 | Wuffs | The fuzzing note records that OSS-Fuzz has found no memory-safety bug in Wuffs |
| 2020 | gain maps | iPhone HEIC and JPEG files carry a gain map with headroom in Apple maker-note EXIF tags 33 and 48 |
| 2020 (CVE year) | libavif | CVE-2020-36407: out-of-bounds write in grid assembly (0.8.0 and 0.8.1), found by OSS-Fuzz |
| 2020-03-30 | ae.utils.graphics | "[BREAKING]" 1-bit colours: scanline returns storage units rather than colours |
| 2020-04-14 | color | v0.0.9, the last tag |
| 2020-06 | libspng | Eleven OSS-Fuzz issues against development commits are published in OSV (June and July) |
| c. 2020–2021 | OpenEXR | An OSS-Fuzz wave against the C++ library (for example CVE-2021-3474) precedes the C core rewrite |
| 2021 | Go image | Go 1.17 adds RGBA64Image so per-pixel access need not allocate a color.Color |
| 2021 | Halide | Anderson et al. extend beam search to GPU schedules |
| 2021 (CVE year) | libjxl | CVE-2021-22564: out-of-order group decoding copies out of bounds at the right and bottom edges |
| 2021-06 | Wuffs | The Wuffs GIF decoder ships in Chrome (M93) |
| 2021-07-22 | OpenEXR | 3.1.0 introduces OpenEXRCore, a thread-safe, non-blocking C core |
| 2022 | Vulkan transfer | VK_NV_memory_decompression (extension 428) brings GDeflate decompression to Vulkan |
| 2022 | dcompute | Commit af45dfa6 adds OpenCL image I/O, the library's only image support |
| 2022 | ICC v4 and iccMAX | ICC.1:2022 (v4.4) adds the cicp tag "to enable HDR metadata to be carried in the profile", metadataTag and the strict tag-table rule |
| 2022-01 | dcv | dcv is revived ("dcv revision 2022") with a @nogc memory model |
| 2022-01-05 | QOI | QOI specification version 1.0 |
| 2022-12-25 | glTF textures | Last head of the EXT_texture_avif draft pull request, which stays unmerged |
| 2023 | ICC v4 and iccMAX | ICC.2:2023, iccMAX (profile version 5): spectral PCS and a programmable transform calculator |
| 2023 (CVE year) | libjpeg-turbo | CVE-2023-2804: heap overflow in merged upsampling of out-of-range 12-bit lossless samples |
| 2023 (CVE year) | Skia | The same VP8L exploit reaches Chrome through libwebp |
| 2023-01 | stb_image | 2.28: "many error fixes, security errors" |
| 2023-04 | Wuffs | v0.3, still the latest stable release at the revision read |
| 2023-07 | stb_image | GitHub Security Lab reports seven memory-safety bugs privately; with no reply, it publishes GHSL-2023-145 to 151 in October |
| 2023-09-07 | libwebp | Commit 902bc91, "Fix OOB write in BuildHuffmanTable", fixes CVE-2023-4863, exploited in the wild |
| 2023-09-21 | libwebp | Ben Hawkes' analysis The WebP 0day argues coverage-guided fuzzing was very unlikely to find the bug |
| 2024 | libwebp | RFC 9649 standardises the WebP image format |
| 2024 | gain maps | WWDC24 announces the iOS 18 move to Adaptive HDR gain maps, read as ISO 21496-1 from the API key's name |
| 2024-01-01 | arsd image modules | The repository starts targeting the OpenD dialect |
| 2024-05 | stb_image | 2.30, the latest version line |
| 2024-05-28 | dcv | Last commit, version 0.4.0 |
| 2024-07 | CICP | H.273 (07/24), the edition in force |
| 2024-09-30 | OpenEXR | 3.3.0: the C++ API reads and writes through the C core |
| 2025 | Vulkan transfer | VK_EXT_memory_decompression (extension 551) is ratified |
| 2025 | libwebp | Clang -fbounds-safety annotations reach the decoder and utilities |
| 2025 (CVE year) | libavif | CVE-2025-48174 (makeRoom integer overflow) and CVE-2025-48175 (RGBToYUV multiplication overflows), fixed by 1.3.0 |
| 2025 (CVE year) | OpenEXR | CVE-2025-48071: a file's size field sizes an output buffer without checking the decoder's actual output |
| 2025-06-12 | dcompute | v0.1.1, the last tagged release; development resumes untagged (BindBC CUDA back end, UnifiedBuffer) |
| 2025-11-21 | libpng | 1.6.51 opens a run of twelve CVE fixes that ends with 1.6.59 |
| 2026 | libheif | "89 security advisories had to be investigated, fixed and released in 2026 alone", by one maintainer |
| 2026 | OpenEXR | 38 of the cited CVEs date from 2026, among them the ILP32 group fixed in 3.4.14 |
| 2026 | Basis Universal | XUASTC LDR and XUBC7 join the supercompressed intermediate formats |
| 2026 (CVE year) | libjpeg-turbo | CVE-2026-75466: division by zero in the PNG loader of tj3LoadImage*, fixed in 3.2.1 |
| 2026-07-01 | libjxl | 0.12.0: 29 hardening pull requests and out-of-order jxlp boxes |
| 2026-09-28 | libpng | 1.6.59, the last of the twelve CVE fixes |
| 2026-11-10 | libspng | Upstream adds state checks to spng_decode_scanline; a duplicate-PLTE check follows on November 13 |
Reading paths
- Designing the Sparkles image library. Start with the comparison (its answers to the nine questions and the delta against the baseline), then the mir-algorithm deep-dive and the
Sliceexperiment, Boost.GIL, JuliaImages and Halide for the view and algorithm model, and Wuffs with the wired experiment for the codec model. - Writing a codec in D. Wuffs, then the codec it replaces (libpng, libspng, libjpeg-turbo, libwebp, libjxl, libavif, OpenEXR), then wired requirements.
- Colour. Concepts: colour, CICP, ICC, Little CMS 2, gain maps, OpenColorIO.
- Getting pixels to the GPU. Vulkan transfer, KTX-Software, basis_universal,
io_uringstorage, DirectStorage and IoRing, and the hardware matrix. - SIMD. Highway, Simd, intel-intrinsics, libyuv.
Sources
- The five baseline documents above, which cite the specifications and source files they were read from.
- The seven paper threads above, which cite each paper by DOI or arXiv identifier.
- The four hardware reports, produced by the probe at the commit the matrix names.
- The deep-dives in the master catalog, each pinned to the revision in
sources.tsv, and the Tier C digest from official documentation.