JPEG XS Transforms: What Replaces the DCT?
The JPEG XS standard (ISO/IEC 21122) was designed to deliver visually lossless video compression with microsecond latency and exceptionally low hardware complexity. While traditional JPEG relies heavily on the block-based Discrete Cosine Transform (DCT), JPEG XS completely eliminates the DCT in favor of a lightweight Discrete Wavelet Transform (DWT)—specifically the Le Gall 5/3 filter—coupled with simple linear color decorrelation transforms. This shift prevents blocking artifacts, minimizes buffer memory, and replaces computationally expensive matrix multiplications with efficient, integer-based arithmetic.
The Primary Replacement: The Discrete Wavelet Transform (DWT)
The principal transform replacing the DCT in JPEG XS is a line-based, 2D Discrete Wavelet Transform. Unlike the DCT, which segments an image into isolated blocks (traditionally 8x8 pixels) and transforms spatial frequencies independently within each block, the wavelet transform processes continuous lines of pixels.
To achieve ultra-low latency, JPEG XS uses an asymmetrical, line-based DWT architecture. Instead of waiting for an entire frame or large tile to load, the transform operates on a rolling buffer of just a few scan lines. It applies:
- A vertical wavelet decomposition over a small number of lines.
- A horizontal wavelet decomposition across each line.
This decomposition divides the image into multiple frequency sub-bands (low-pass approximation and high-pass details) across typically one to two vertical levels and up to five horizontal levels.
The Specific Wavelet Filter: Le Gall 5/3
JPEG XS specifically uses the Le Gall 5/3 biorthogonal wavelet filter, the same filter utilized for lossless compression in JPEG 2000.
The Le Gall 5/3 transform is mathematically defined by two simple filter equations—one for the high-pass (detail) coefficients and one for the low-pass (smooth) coefficients:
- High-pass filter (\(d[n]\)):
\[d[n] = x[2n+1] - \left\lfloor \frac{x[2n] + x[2n+2]}{2} \right\rfloor\] - Low-pass filter (\(s[n]\)):
\[s[n] = x[2n] + \left\lfloor \frac{d[n-1] + d[n] + 2}{4} \right\rfloor\]
Why Le Gall 5/3 Replaces DCT:
- Lifting Scheme Implementation: The Le Gall 5/3 filter is implemented using a "lifting scheme." This mathematical framework allows the transform to be executed using solely additions, subtractions, and bit shifts. It avoids the complex floating-point multiplications and large matrix calculations intrinsic to 2D DCT implementations.
- Reversibility: The transform possesses perfect reconstruction properties using exact integer arithmetic, enabling both mathematically lossless and visually lossless pipelines.
- Artifact Prevention: Because the wavelet transform operates over continuous boundaries rather than isolated grids, it replaces harsh DCT grid-boundary blocking artifacts with soft, diffuse ringing that remains imperceptible at target compression ratios (typically 2:1 to 10:1).
Accompanying Transforms: Color Space Decorrelation
Prior to the spatial wavelet transform, JPEG XS replaces conventional, floating-point YCbCr conversions with lightweight matrix color transforms:
- Reversible Color Transform (RCT): A variant of the YCoCg-R transform that decorrelates RGB data into luminance and chrominance using only integer additions and right-shifts without rounding loss.
- Irreversible Color Transform (ICT): A fixed-point approximation of standard component transformations used when operating in lossy modes with higher bit-depth source material.
By combining the Le Gall 5/3 wavelet filter with integer-based color transforms, JPEG XS achieves real-time, line-rate processing for high-resolution video (such as 4K and 8K) directly in FPGA or ASIC pipelines without the high memory footprint or compute overhead required by the DCT.