中文版

The Fastest JPEG Codec on GPU

Updated:

The Fastvideo JPEG codec encodes a 24 MPix (6K) image at about 1500 fps — roughly 117 GB/s — on an NVIDIA GeForce RTX 4090, significantly faster than the best multithreaded CPU codecs such as libjpeg-turbo. It reaches this speed because it is a fully parallel CUDA implementation of Baseline JPEG: every stage of the algorithm, including entropy encoding and decoding, runs on the GPU. The codec is 100% compliant with the JPEG Baseline standard, stays competitive with dedicated hardware JPEG encoders, and remains fully programmable and portable across NVIDIA GPUs, from Jetson to server cards.

fast JPEG codec on CUDA

Key Features of the CUDA JPEG Codec

The codec covers the full Baseline JPEG feature set for both compression and decompression:

Compression

Data input and output

Full JPEG pipeline on GPU

Integration and compatibility

Why Is JPEG on CUDA So Fast

The key is that we parallelized every stage of the JPEG algorithm — including entropy coding. There was a widespread opinion that RLE and Huffman algorithms could only be serial; in our implementation they are fully parallel and are no longer bottlenecks, so nothing is offloaded to the CPU. Most published attempts at JPEG on CUDA accelerate the DCT stage and stop there, but the DCT is only a small part of the problem: the image naturally partitions into a large number of 8×8 and 16×16 blocks, and this parallelism can be exploited at every stage of both the encoder and the decoder — the entropy codec being the hardest part, which we solved on the GPU as well.

Speed does not come at the cost of accuracy: the color transform, 2D DCT, and quantization are computed in floating point and rounded afterwards, which improves accuracy compared with the conventional integer approach.

The performance is far beyond CPU-based codecs: even when host-to-device and device-to-host transfers are included in the timing, the CUDA JPEG codec remains much faster than libjpeg-turbo and turbojpeg on modern multicore CPUs.

JPEG Benchmarks on the NVIDIA GeForce RTX 4090

How many JPEG images per second can a GPU encode?

The headline case comes from modern machine vision cameras: a 5328×4508 24-bit frame (24 MPix) is encoded with subsampling 4:2:0 and quality 90 in 0.65 ms, which corresponds to about 117 GB/s — almost 5 times the real bandwidth of the PCIe 4.0 x16 interface (~24 GB/s).

Benchmarks for single color 24-bit images (all computations on GPU, timings exclude I/O, single-thread application, no batch, no streaming, quality 90, subsampling 4:2:0):

JPEG encoding and decoding performance of the Fastvideo CUDA JPEG codec on the NVIDIA GeForce RTX 4090, by image resolution (frames per second).
Resolution Encoding Decoding
Full HD (1920×1080) ~5500 fps
4K (3840×2160) ~3800 fps ~1350 fps
6K (5328×4508) ~1500 fps
8K (7680×4320) ~1180 fps ~650 fps

Decoding performance depends strongly on restart markers: they split the JPEG bitstream into chunks that can be decoded in parallel, and parallel processing is the key to speed on the GPU. Restart markers are a standard, optional part of JPEG, and CPU tools such as jpegtran can insert them too, but only slowly; our encoder writes them by default at GPU speed, and to our knowledge no other GPU JPEG codec uses them for parallel decoding. Images produced by our encoder therefore decode much faster while staying fully standard, which makes the codec pair a natural fit for low-latency applications. More benchmarks for the SDK modules are published on a separate page.

Part of the Fastvideo SDK

The JPEG codec ships as a module of the Fastvideo GPU Image & Video Processing SDK, where it combines with demosaicing, denoising, resize, color processing, 3D LUT, the Raw Bayer codec, the JPEG2000 codec, and the rest of the pipeline — entirely in GPU memory, so JPEG encoding becomes the final stage of a complete RAW-to-RGB workflow.

Licensing and Custom Development

We license the Fast JPEG codec and other SDK components to software developers, camera manufacturers, system integrators, and resellers; the SDK is used in a wide range of imaging applications. A demo, documentation, licensing details, and a quotation are available upon request. We also develop custom GPU image processing software according to an agreed specification — if your application needs a significant speedup on the GPU, describe your project in the contact form below.

Downloads and More Info fast JPEG codec

Frequently asked questions

How does it differ from a built-in GPU JPEG library?

It gives full control over quality and chroma subsampling, supports restart markers for parallel and robust decoding, runs across both desktop and Jetson GPUs, and its speed is published as open, reproducible benchmarks.

How fast is the Fastvideo JPEG codec?

On an NVIDIA GeForce RTX 4090 it encodes a 24 MPix (6K) image at about 1500 fps, roughly 117 GB/s. Exact numbers depend on your GPU, resolution and quality — see the benchmark methodology.

Is it a standard JPEG?

Yes. The codec is 100% compliant with the Baseline JPEG standard (ITU-T T.81 / ISO IEC 10918), so its output opens in any JPEG viewer.

Which GPUs are supported?

Any CUDA-capable NVIDIA GPU — from Jetson embedded modules to desktop GeForce/RTX and data-center cards.

What image sizes and formats are supported?

Grayscale (8-bit) and color (24-bit), with optional 12-bit encoding; subsampling 4:4:4, 4:2:2, 4:2:0; sizes from 1×1 up to 64,000×64,000; JPEG quality 1–100 with optional custom quantization tables.

Can I test the performance myself?

Yes. Download the free demo app and measure the speed on your own GPU and images — see the benchmark methodology and the Fastvideo SDK benchmark report (PDF).

Roadmap for the Fast JPEG Codec

The Fastvideo JPEG codec is a mature codec, developed and refined over many years; its latest release (2026) adds support for the newest NVIDIA GPUs. It is integrated into the GPU RAW Processor and into FastVCR software for XIMEA cameras, providing real-time JPEG encoding with integrated camera control.

Current development focuses on lower GPU memory usage and faster JPEG decoding.

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.