RawZipper - RAW Bayer Codec on NVIDIA GPU
Updated:
Fastvideo RawZipper is a GPU codec that compresses 12-bit RAW Bayer frames directly in the raw domain, with both lossless and lossy modes, so cameras and recorders store and transmit far smaller files, lowering storage and bandwidth costs, without converting to RGB first. Compression runs on NVIDIA GPUs at data rates high enough for real-time capture, keeping RAW workflows practical for high-resolution, high-frame-rate sensors. The algorithms behind it, and how we check that the loss stays within the sensor noise, are described on our RAW image compression page.
Detailed benchmark data. Measured results are published on our benchmark pages.
The RawZipper Codec has been implemented for the purpose of compressing and storing raw image data captured by monochrome and bayer cameras. Bayer data adheres to a Bayer color filter array (CFA) pattern (RGGB, BGGR, GRBG, or GBRG), in which each pixel captures only one color channel. True lossless or lossy (nearly or visually lossless) compression could be employed to preserve the original data for subsequent raw processing.
Applications for RawZipper
RawZipper is used wherever raw sensor data must be stored or moved quickly without converting it to RGB first: aerial and street-view imaging, photogrammetry, machine vision and industrial cameras, autonomous-driving data collection, digital cinema, aerospace, and medical imaging. In these workflows raw frames arrive faster than a full ISP can process them, so compressing the raw data keeps recording in real time and defers RAW-to-RGB conversion to post-processing.
- Street-view and aerial imaging
- Photogrammetry
- Photography and digital cinema
- Aerospace imaging
- Machine vision and industrial cameras
- Data collection systems for autonomous driving
- RAW streaming
- Medical imaging
- RAW image data management
It's worth mentioning that video codecs like HEVC look attractive for lossy RAW image compression after some preprocessing because they are hardware-based at NVIDIA GPUs, so they don't influence on GPU load too much. But their performance is not high enough to deal with real time data streams from modern cameras, though in some cases it could be a viable solution.
RAW encoding algorithms of RawZipper
- Mathematically lossless RAW image compression
- Nearly lossless RAW image compression
- Visually lossless RAW image compression
- Lossy encoding with enhanced compression ratio
- RAW video encoding
Benefits of RAW Compression
How much can you compress 12-bit RAW Bayer data?
| RawZipper mode (12-bit RAW Bayer) | Compression ratio | Image quality | Speed on RTX 4090 |
| Lossless | ~2:1 | mathematically lossless | up to ~0.6 GPix/s |
| Lossy, high quality | 4–5 | PSNR > 60 dB | up to ~1 GPix/s |
| Lossy | ~10 | visually lossless | up to ~1 GPix/s |
- Smaller files and less bandwidth: encoding the raw data cuts storage and transmission costs.
- Original data preserved: visually lossless compression keeps the sensor data intact for later RAW-to-RGB processing.
- Shorter pipeline: in real-time systems you can skip the full RAW-to-RGB ISP and just preprocess and encode the raw data.
- Less data to move: raw data is about one third the size of RGB.
- Simple to use: it works without any prior calibration data from the sensor.
- Better offline quality: real-time processing limits image quality, so the compressed raw can be reprocessed later with heavier algorithms for a better result.
- Flexible: works for both raw images and raw video.
Key Features of RawZipper
- Processing of raw bayer or monochrome image/video with arbitrary width and height
- Data input: raw bayer or monochrome frames from SSD or CPU/GPU memory
- Data output: final compressed data at SSD or CPU/GPU memory
- Input/output bit depth: 8/10/12/14/16 bits
- Algorithms: Lossy and Lossless compression and decompression
- Preprocessing options to improve compression ratio, image quality and performance
- Lossless compression ratio around 2:1
- Lossy compression ratio from 5:1 to 10:1, up to 20:1
- Optional rate control option to constrain image compression ratio
- Optimized for the latest NVIDIA GPUs including Jetson
- Compatible with 64-bit Windows-10/11, Linux Ubuntu, L4T
We can integrate RawZipper into your imaging system to perform the whole job fully on GPU. Please check the description of our GPU Image & Video Processing SDK to evaluate what we can do on GPU.
Compression ratio and image quality in RawZipper
For real 12–14-bit sensor data, lossless RAW usually reaches only about 2:1, because the signal also carries sensor noise; higher ratios need controlled lossy encoding. RawZipper lets you choose that trade-off per task — the mode table above shows ratios, PSNR and speed, and the next section covers quality control. For the general theory of lossy vs lossless RAW compression, compression ratios and supported formats, see RAW image compression.
Image quality control for RAW Codec
In lossy mode the codec introduces some distortion, and the real question is not whether there is any change, but whether it stays within the sensor's own noise. We measure that both visually and numerically, checking signal and noise together, with these tests:
- Global PSNR and noise statistics by brightness zone
- Laplacian variance retention
- Spectral analysis PSD
- Error autocorrelation per Bayer channel
- Statistical noise equivalence
RawZipper performance benchmarks for lossy RAW Bayer encoding on GPU
Real-time RAW Bayer encoding with lossy algorithm is very important for many applications and it's the most demanding part of the codec, because usually decoding could be done offline. Full set of benchmarks for RawZipper Codec will be published later, and here we present some preliminary results.
For 12-bit RAW Bayer images with resolution 12 MPix, we can perform lossy encoding with CR around 10 with the performance up to ~1 GPix/s on the NVIDIA GeForce RTX 4090 and we have fair chances to accelerate that solution soon.
GPU pipeline for RAW decoding, processing and visualization
- RAW image decompression and restoration
- Building an original uncompressed RAW image with bayer pattern
- RAW image linearization
- White balance
- Debayer
- Denoiser
- Color correction
- LUT (1D, 3D)
- Crop/Rotate/Resize/Sharp
- Local contrast
- OpenGL output
- Optional output MJPEG compression to AVI or image encoding to JPEG
The aforementioned pipeline is computationally demanding, and attaining high performance for the task is challenging. In order to facilitate the visualization process, it is imperative to attain a frame rate of at least 60 frames per second (fps). For the majority of resolutions, this objective can be achieved in real time using an NVIDIA GPU. We utilize our GPU Image Processing SDK for the above pipeline and it can handle data rates up to 2-4 GPix/s on GeForce RTX 4090. Such a solution is available for all NVIDIA GPUs: mobile, laptop, desktop, server.
Frequently Asked Questions
Can RawZipper compress RAW in real time?
Yes. On an NVIDIA GeForce RTX 4090, RawZipper encodes 12-bit RAW Bayer frames (12 MPix) with lossy compression at a ratio around 10 at up to about 1 GPix/s, which is fast enough for real-time capture from high-resolution, high-frame-rate sensors.
Does RawZipper run on NVIDIA Jetson?
Yes. RawZipper is optimized for the full range of NVIDIA GPUs, from Jetson embedded modules to desktop and server cards, and runs on 64-bit Windows 10/11, Linux Ubuntu, and L4T.
Can I integrate RawZipper into my own software?
Yes. RawZipper is available through our GPU Image & Video Processing SDK with an API and reference C++ code, so the codec and the full RAW-to-RGB pipeline run on the GPU inside your application.
Does RawZipper support RAW video?
Yes. RawZipper compresses both raw still images and raw video from Bayer or monochrome sensors, with input and output bit depth of 8, 10, 12, 14, or 16 bits.
What compression ratio and image quality can RawZipper reach?
Lossless mode reaches about 2:1 with bit-exact restoration, and controlled lossy mode reaches 5:1 to 10:1 (up to 20:1 for less demanding tasks) while keeping the loss within the sensor noise, typically at a PSNR of 50 to 55 dB or better for 12-bit Bayer images.
