CUDA JPEG2000 Rust

CUDA JPEG2000 Rust

J2K provides NVIDIA CUDA backends for supported JPEG 2000 / HTJ2K device-output and encode-stage paths, plus supported coefficient-domain stages of JPEG-to-HTJ2K transcode workflows.

Release status: See the changelog and crates.io for the current published version.

CUDA JPEG2000 Rust pipeline

Codec backend

j2k-cuda exposes CUDA-backed JPEG 2000 / HTJ2K decode and encode-stage APIs.

cargo add j2k-cuda --features cuda-runtime

JPEG input

j2k-jpeg-cuda provides CUDA device-output integration for supported JPEG decode surfaces.

cargo add j2k-jpeg-cuda --features cuda-runtime

Transcode backend

j2k-transcode-cuda accelerates supported coefficient-domain stages of JPEG-to-HTJ2K transcode; packetization remains outside those transform stages.

cargo add j2k-transcode-cuda --features cuda-runtime

Testing

CUDA performance numbers come from self-hosted NVIDIA benchmark runs; hosted CI does not measure GPU performance.

cuda-runtime exposes CUDA Driver API dispatch, but product CUDA Oxide PTX is built only on supported Linux cuda-oxide hosts. Set J2K_REQUIRE_CUDA_OXIDE_BUILD=1 on CUDA validation and benchmark hosts so placeholder PTX fails the build; runtime errors for placeholder kernels state that CUDA Oxide PTX was not built.

The CUDA backends support the same formats as the main crate: JPEG 2000 Part 1, JP2 files, HTJ2K Part 15, and JPH files. Unsupported shapes return an error for explicit CUDA requests and stay on the CPU under Auto.

Benchmark results are in docs/benchmark-evidence.md. Published speed comparisons need an external benchmark bundle with publication_eligible=true; results on generated fixtures alone are not published.