Performance

This page reports what the JPEG encoder delivers in a working system, measured at the far end of the chain rather than in simulation. The encoder runs in an HDMI to USB video adapter on a Lattice CertusPro-NX: HDMI video enters the encoder, the codestream leaves the device as a USB video class stream, and a Linux host counts what arrives. The source is a quantumdata M42h generator, which supplies the video and the photographs.

Two figures describe a JPEG encoder in a video system. The compression ratio says how much smaller the image became; the bit rate says what the link behind it has to carry. Both are given here, over the quality scale and over seventeen photographs.

The measurement conditions are shown in the table below:
Encoderprt_jpeg_enc v2.0
DeviceLFCPNX-100
Pixel rate4 pixels per clock at 150 MHz
VideoHDMI, RGB 8 bit, converted to YCbCr 4:2:2
Formats3840 × 2160p60 and 1920 × 1080p60
Read out overUSB 3 SuperSpeed, USB video class
Per measurement300 frames captured at the host
Lake Plansee below a forested mountain, encoded at 3840 by 2160 and captured over USB

Figure 1: every picture on this page left the encoder as JPEG and was captured at the host (click on the image to enlarge it)

One photograph across the quality scale

Quality sets the quantization tables, on the scale of the Independent JPEG Group: 50 is the table of the JPEG standard, higher keeps more of the image and costs more bytes. The photograph below is Plansee, a lake below a forested mountain, which holds a fair amount of detail. Every point runs at 60.00 frames per second.

Compression

video bytes in : codestream bytes out

0 10 20 30 40 50 ratio : 1 2030405060708090 JPEG quality 8 : 1 7 : 1 42 : 1 37 : 1

Bit rate

what leaves the USB port, at 60 frames per second

0 20 40 60 80 100 120 140 MB/s 2030405060708090 JPEG quality 120.7 MB/s 32.2 MB/s
3840 × 2160p60 1920 × 1080p60

Figure 2: compression and bit rate of one photograph over the quality scale

3840 × 2160p60, 995 MB/s uncompressed:
QualityCompressionCodestream per frameBit rate
2042 : 1391 kB23.4 MB/s
3033 : 1494 kB29.7 MB/s
4028 : 1587 kB35.2 MB/s
5024 : 1679 kB40.7 MB/s
6020 : 1791 kB47.4 MB/s
7017 : 1968 kB58.1 MB/s
7515 : 11.08 MB64.7 MB/s
8013 : 11.27 MB76.0 MB/s
8510 : 11.54 MB91.8 MB/s
908 : 12.01 MB120.7 MB/s
1920 × 1080p60, 249 MB/s uncompressed:
QualityCompressionCodestream per frameBit rate
2037 : 1111 kB6.7 MB/s
3028 : 1144 kB8.6 MB/s
4024 : 1171 kB10.3 MB/s
5020 : 1198 kB11.9 MB/s
6018 : 1228 kB13.7 MB/s
7015 : 1275 kB16.5 MB/s
7513 : 1306 kB18.3 MB/s
8011 : 1353 kB21.2 MB/s
859 : 1419 kB25.1 MB/s
907 : 1536 kB32.2 MB/s

Test pictures

Compression is a property of the picture as much as of the encoder. The seventeen test pictures below come from the generator's own library and were encoded at 3840 × 2160p60 at three quality settings. A portrait against a quiet background and a canal in Amsterdam are four times apart at the same setting. All of them run at 60.00 frames per second.

What the three settings mean for the picture:

Each setting has two columns: Ratio is the compression, video bytes in against codestream bytes out, and Bandwidth is what that costs on the link at 60 frames per second.

The same face at quality 10, 25, 50, 75 and 90, at full size

Figure 3: the same face across the quality scale. Block artefacts show first in smooth skin, on the cheek and the forehead: plainly at quality 10, faintly at 25, and no longer at 50. Above 50 the picture does not visibly change; the setting buys margin. Shown at full size, straight from the encoder (click on the image to enlarge it)

Picture Quality 25 Quality 50 Quality 75
RatioBandwidth RatioBandwidth RatioBandwidth
Portrait Portrait81 : 112.3 MB/s64 : 115.4 MB/s47 : 121.1 MB/s
Cruise ship Cruise ship64 : 115.5 MB/s48 : 120.8 MB/s34 : 128.8 MB/s
Oktoberfest Oktoberfest61 : 116.2 MB/s44 : 122.3 MB/s28 : 135.1 MB/s
Winter mountain Winter mountain61 : 116.3 MB/s40 : 124.7 MB/s26 : 138.1 MB/s
Face colour patches Face colour patches51 : 119.3 MB/s36 : 127.0 MB/s25 : 139.1 MB/s
Winery Winery49 : 120.2 MB/s32 : 130.6 MB/s20 : 147.7 MB/s
Zugspitze Zugspitze49 : 119.9 MB/s33 : 129.8 MB/s19 : 150.0 MB/s
Flowers Flowers47 : 121.0 MB/s31 : 131.3 MB/s20 : 147.4 MB/s
Harbor Harbor47 : 120.8 MB/s31 : 131.8 MB/s20 : 148.0 MB/s
Mountains Mountains47 : 120.8 MB/s31 : 131.4 MB/s20 : 147.7 MB/s
Sausalito Sausalito41 : 124.2 MB/s27 : 135.7 MB/s19 : 152.1 MB/s
Forest Forest38 : 125.6 MB/s23 : 142.1 MB/s14 : 167.9 MB/s
Plansee Plansee37 : 126.7 MB/s24 : 140.7 MB/s15 : 165.1 MB/s
Heidelberg Heidelberg30 : 132.2 MB/s20 : 149.6 MB/s13 : 175.3 MB/s
Tree in mono Tree in mono26 : 137.6 MB/s17 : 155.7 MB/s12 : 179.9 MB/s
Las Vegas Las Vegas24 : 140.5 MB/s16 : 161.7 MB/s10 : 194.1 MB/s
Amsterdam Amsterdam18 : 154.2 MB/s12 : 182.3 MB/s8 : 1122.1 MB/s
×