12-bit JPEG Codec on CUDA

Updated:

Fastvideo 12-bit JPEG codec implements the JPEG standard's Extended mode — 12 bits per channel instead of the 8 bits of standard Baseline JPEG — entirely on the GPU. It is the 12-bit extension of our Fast JPEG codec on CUDA, sharing its fully parallel architecture, and it exists for a simple reason: modern image sensors deliver 12 bits or more per channel, and truncating them to 8 bits before compression discards exactly the precision that medical, scientific, and HDR applications pay for. The produced streams conform to DICOM requirements and are compatible with the 12-bit format of libjpeg and libjpeg-turbo.

Why 12-bit JPEG 12-bit JPEG codec

Twelve bits per channel is the practical minimum for imaging systems that measure rather than merely display: an 8-bit pipeline holds 256 levels per channel, a 12-bit one holds 4096, and the difference decides whether gradients, shadows, and diagnostic detail survive compression. Yet 12-bit JPEGs remain rare in the wild — few viewers and libraries handle the Extended mode — so the format's speed and compatibility advantages often go unused. Our codec fills that gap with a high performance 12-bit JPEG/MJPEG implementation that supports both Baseline 8-bit and Extended 12-bit modes in one library, so a single integration covers both worlds.

Features of the 12-bit Extended JPEG Codec

The codec inherits the fully parallel design of our 8-bit implementation — including parallel entropy coding on the GPU. How that works, and the current benchmark tables on the NVIDIA GeForce RTX 4090, are described on the Fast JPEG codec page.

Benchmarks for 12-bit JPEG Encoding

Reference measurement: a ~50 MPix 14-bit RAW image from the Canon 5DS R, converted to 12-bit per channel color data (8736×5856, 36-bit PPM), encoded with quality 90, all computations on GPU, single image mode:

These figures were measured on the NVIDIA GeForce GTX 1080 (25–40 GB/s for large 12-bit images); on current GPU generations the codec runs several times faster — see the up-to-date Fastvideo SDK benchmarks and the RTX 4090 tables on the JPEG codec page.

Who Needs a 12-bit JPEG Codec

Licensing

The 12-bit JPEG codec is licensed standalone or as a module of the Fastvideo GPU Image Processing SDK, to software developers, camera manufacturers, system integrators, and resellers. A demo, documentation, and a quotation are available upon request; we also develop custom GPU image processing software to specification — use the contact form below.

More about JPEG Compression on CUDA

Fyodor Serzhenko, Fastvideo

About the author

Fyodor Serzhenko, PhD, is the founder and CEO of Fastvideo. He earned his PhD at the Moscow Institute of Physics and Technology (MIPT) in 1993. Since 2009 he has led the development of Fastvideo’s GPU-accelerated image codecs and ISP modules, including the Fastvideo SDK. Connect on LinkedIn.

Why you can trust these results

Fastvideo has built GPU-accelerated image processing software since 2009. Our codecs comply with the standards they implement — JPEG (ITU-T T.81 / ISO IEC 10918) and JPEG2000 (ITU-T T.800 / ISO IEC 15444) — and our tools are open source on GitHub. Every performance figure we publish is reproducible: see our benchmark methodology, download the Fastvideo SDK benchmark report (PDF), and measure it on your own GPU.

Contact Form

This form collects your name and email. See our Privacy Policy for how we handle your personal data.