A JPEG-LS encoder IP core for FPGAs — real-time lossless image compression.
OpenJLS implements the JPEG-LS standard — a low-complexity lossless image codec with compression ratios comparable to JPEG 2000 lossless, at a fraction of the computational cost and with no external memory required. It reaches roughly 240 MHz on a Xilinx UltraScale+ ZU7EG, an MPSoC common in space applications, and processes one pixel per clock. The whole project is open source — the RTL, the testbenches and the verification flow are all public.
It handles single-component (grayscale) data, so a multi-band sensor uses one compressor per band — resource usage is low enough to run every band in parallel. The core is vendor-agnostic, targeting any FPGA platform, and builds with Vivado, Quartus, Libero, Lattice or open-source tools.
| Compression | Lossless JPEG-LS |
| Compression ratio | ~1.5 : 1 expected, Earth imaging |
| Pixel depth | 8–16 bits |
| Components | Grayscale, single |
| Image size | Up to 64k × 64k pixels |
| Memory | On-chip line buffer |
| Throughput | 1 pixel / clock |
| Interface | Ready/valid, or AXI4-Stream + AXI4-Lite |
| Conformance | Byte-exact vs. CharLS |
| Portability | Vendor-agnostic VHDL |
Ratio is data-dependent: the core is byte-exact, so output size follows the entropy of your imagery, not a quality setting. Lossless still-image coding generally lands between 1.5 : 1 and 2.5 : 1. Our own measurement — 1.63 : 1 — is the average over a 287-image mixed test corpus.
OpenJLS follows the JPEG-LS encoding pipeline, implemented as a fully pipelined, vendor-agnostic VHDL core.
Local gradients from causal pixel neighbors.
365 contexts with adaptive bias correction.
MED predictor with context-based bias cancellation.
Adaptive Golomb-Rice, with run-length for uniform regions.
ISO/IEC 14495-1 compliant JPEG-LS output.
A single generic sets both cost and speed: MAX_IMAGE_WIDTH sizes the on-chip line buffer. Logic stays flat as it grows — only Block RAM follows — and the best implementation strategy holds frequency in a narrow band across the whole range.
Both figures characterized on a Zynq UltraScale+ xczu7eg-fbvb900-1-e (speed grade −1, slowest), Vivado 2025.2, 12-bit grayscale. Frequencies are true fmax — read by over-constraining the clock until the design failed timing. Resource figures use the default strategy; utilization is near-identical across strategies. RTL only, no floorplanning or vendor-specific optimization: representative, not guaranteed.
Verified at three levels. In simulation, a layered suite — constrained-random self-checking tests, functional coverage, and byte-exact comparison against CharLS, an independent open-source implementation of JPEG-LS — runs at both RTL and post-synthesis gate level. The same corpus is then re-encoded on a real device: the core runs on a PYNQ-Z2 and the returned bitstreams are compared byte-for-byte against the same reference.
Free for any use that complies with GPL v3. Evaluation is unrestricted — clone, simulate, synthesize and test freely.
For proprietary, closed-source products without GPL obligations. A commercial license is only required when shipping a product.