Overview
Introduction
The JPEG Encoder IP-core turns a live video stream into fully compliant baseline JPEG images, inside the FPGA, while the frame is still arriving.
There is no frame buffer and no external memory in the datapath. Pixels enter the core four at a time, are gathered into 8×8 blocks and travel through the transform, quantizer and Huffman encoder as one continuous pipeline. The first compressed bytes leave the core once the first block row of the image has been read in — eight video lines, not a whole frame. That is what makes the latency low and, more importantly, predictable: the same picture always takes the same number of clocks.
4Kp60 is the top end, not the only setting. The same core encodes a VGA sensor feed or a 720p stream without changes — the image size is a run time setting that the host writes into the JPEG header, and only the maximum line width is fixed at synthesis time. Smaller pictures simply take fewer clocks.
The core is written in SystemVerilog and is parameterisable for line width, pixels per clock and vendor target. A host processor sets it up over an APB interface, using the plain C driver that ships with the core, and the compressed codestream comes out over a 64-bit stream that plugs straight into a DMA engine, a PCIe block or an NVIDIA Holoscan sensor bridge.
The pipeline
Every stage runs at the video rate, so the whole chain is a straight line from pixels to codestream with no place where a frame has to be parked.
The encoder page has the block diagram and the signal description.
Compliant output
Baseline JPEG to ISO/IEC 10918-1 (ITU-T T.81), with the standard markers in place. The output opens in any viewer, decoder or browser without a special profile.
Eight Huffman lanes
The entropy encoder runs eight Huffman encoders side by side and merges their variable length codes back into one bitstream, so entropy coding keeps up with the four pixel per clock front end.
Deterministic latency
No frame buffer, no rate control loop and no external memory. Latency is set by the pipeline itself and does not move with picture content.
Features
- Baseline JPEG (ISO/IEC 10918-1 | ITU-T T.81) compliant
- Quad pixels per clock (PPC)
- Color depth: 8 (BPC)
- Color space: YUV 4:2:2
- Any resolution up to 4Kp60, selectable at run time
- APB host interface with a plain C driver
- 64-bit streaming codestream output
- Codestream sink bandwidth counters for diagnostics
- Supports a 150 MHz clock
Applications
Resources
The following FPGA devices are supported:
- Lattice Semiconductor CertusPro-NX
- Lattice Semiconductor Avant
- AMD Artix UltraScale+
- Altera Agilex 3
- Altera Agilex 5
The tables below show the device utilization.
| Module | Resolution | LUT | FF | EBR | DSP |
|---|---|---|---|---|---|
| JPEG_ENC | 3840 | 16105 | 7285 | 97 | 18 |
| JPEG_ENC | 1920 | 15929 | 7189 | 81 | 18 |
- Device LFCPNX-100-9LFG672C
- Radiant software 2026.1.0.37.0 (Synplify Pro)
- PPC - 4 / BPC - 8
- Date: August 5, 2026
| Module | Resolution | LUT | FF | EBR | DSP |
|---|---|---|---|---|---|
| JPEG_ENC | 3840 | 18330 | 7474 | 67 | 18 |
| JPEG_ENC | 1920 | 18095 | 7378 | 67 | 18 |
- Device LAV-AT-X70-1LFG1156C
- Radiant software 2026.1.0.37.0 (Synplify Pro)
- PPC - 4 / BPC - 8
- Date: August 5, 2026
| Module | Resolution | LUT | FF | BRAM | DSP |
|---|---|---|---|---|---|
| JPEG_ENC | 3840 | 9471 | 8331 | 42 | 18 |
| JPEG_ENC | 1920 | 9447 | 8235 | 34 | 18 |
- Device XCAU7P-1FCVA289
- Vivado 2025.1
- PPC - 4 / BPC - 8
- Date: August 5, 2026
| Module | Resolution | ALM | FF | M20K | DSP |
|---|---|---|---|---|---|
| JPEG_ENC | 3840 | 9077 | 10778 | 84 | 9 |
| JPEG_ENC | 1920 | 8930 | 11200 | 68 | 9 |
- Device A3CY050BB18AE7S
- Quartus Prime Pro 26.1
- PPC - 4 / BPC - 8
- Date: August 5, 2026
| Module | Resolution | ALM | FF | M20K | DSP |
|---|---|---|---|---|---|
| JPEG_ENC | 3840 | 9113 | 10525 | 84 | 9 |
| JPEG_ENC | 1920 | 8952 | 10608 | 68 | 9 |
- Device A5EA028BB23BE6S
- Quartus Prime Pro 26.1
- PPC - 4 / BPC - 8
- Date: August 5, 2026
Notes
- Baseline sequential DCT with Huffman coding only. Progressive mode, arithmetic coding, lossless mode and 12-bit sample precision are not supported.
- The input color space is YCbCr 4:2:2 with 8 bits per component. RGB and 4:4:4 are not supported.
- The quantization table is written by the host and can be changed at run time. The driver derives it, and the matching DQT markers, from a quality setting, with 50 being the standard table of ISO/IEC 10918-1 Annex K. Quality is limited to 90 because the quantizer produces 10-bit coefficients.
- The image dimensions are expected to be a multiple of the 16 × 8 MCU; partial MCUs at the right and bottom edge are not padded.
- Any resolution up to the synthesized line width (P_HWIDTH) is supported. The resolutions verified so far are 320 × 240, 640 × 480, 1920 × 1080 and 3840 × 2160.
- Restart markers (DRI / RSTn) are not inserted.
- If the codestream sink is not ready at the start of a frame, that frame is dropped; if it stalls part way through, the image is abandoned and closed with an end of image marker.