Benchmarks for J2K decoders on CPU and GPU

Below we provide the benchmarks for Fastvideo JPEG2000 Decoder on CPU/GPU in comparison with other freely available open source J2K decoding solutions on CPU.

Approaches for JPEG2000 performance measurements

There are two standard approaches to performance measurements of JPEG2000 codecs, which utilize GPU. They correspond to the two most common use cases for J2K decoders.

1. Single image mode consists in processing of single image at a time and could be called "latency-oriented" or "low latency" approach. In that case the time interval (latency) between availability of original image in RAM and availability of the processed image in RAM is measured. It means that software cannot expect that any additional images will be processed at the same time and therefore cannot take advantage of multiple image decoding. Overlapping of current image processing with other activities is undesirable because it would increase total latency.

2. Batch mode consists in processing of batch of images and could be called "throughput-oriented" or "maximum performance". In that case frame rate becomes more important than latency. It is calculated via division of the total time of processing by the number of processed images. Some JPEG2000 codecs are optimized for this use case, meaning that exploiting of task parallelism leads to better frame rate (throughput) at the expense of increased processing time for separate images. It is possible, because we actually have three devices (CPU, GPU and bus interface between them), which can be used simultaneously in that mode, whereas at single image mode these devices are used sequentially for different stages of JPEG2000 algorithm. Moreover, GPU can process several images simultaneously to increase frame rate even more, if each image is too small for decoder to load a multitude of GPU cores (especially at Tier-1 stage). Important limitation for simultaneous processing of several images is imposed by amount of free GPU memory. Batch mode is a must for streaming applications when the pipeline contains JPEG2000 decoder. For more complicated workflow it could be better to utilize single image mode, though fps will be reduced.

Briefly, JPEG2000 decoder at batch mode can take into account specific methods of task parallelism, based on the following:

  • both upload to GPU and download from GPU could overlap with JPEG2000 processing on GPU (CUDA Streams)
  • Tier-1 and Tier-2 could be done in parallel: Tier-1 on GPU and multithreaded Tier-2 on CPU at the same time
  • multiple (batch) JPEG2000 processing to increase general GPU occupancy

CPU-based JPEG2000 solutions have no explicit implementation of batch mode, because all processing stages are done on CPU and complete loading of available CPU cores can be achieved by simply running multiple decoders in separate processes. Multithreaded mode of CPU-based JPEG2000 decoders decrease latency of single image processing, so we can consider this mode as single image mode.

At the moment we don't consider here the following possible modes for JPEG 2000 benchmarking on GPU:

  • multiple GPU mode
  • multiple tile mode for big images
  • fast parallel J2K processing with RESET, RESTART, CAUSAL and BYPASS modes

Results for all these modes will be published as soon as their implementations are ready.

We don't hide anything concerning benchmarking procedures and the achieved results. Thus, everyone can always reproduce our benchmarks, because we publish not only timing and performance, we supply full info about hardware, JPEG2000 parameters, test images and testing modes.

JPEG 2000 decoding benchmarks

We've carried out time and performance measurements for JPEG2000 decoding for 24-bit images with 2K and 4K resolutions. All results don't include any host I/O latency (image loading to RAM from HDD/SSD and saving back) and we've also excluded host-to-device transfer time. We've done such an assumption to reproduce J2K decoder usage in our conventional image processing pipeline, when decompressed data reside in GPU memory. Results for GPU-based JPEG2000 decoding software also include Tier-2 time on CPU, because this stage in our implementation is performed on CPU. In the tables below, one can find averaged results for the best series of 100 measurements.

JPEG2000 decoderJPEG2000 decoding parameters

  • File format – JP2
  • Lossy JPEG 2000 with CDF 9/7 wavelet
  • Lossless JPEG 2000 with CDF 5/3 wavelet
  • Compression ratio (for lossy algorithm) ~ 12.0 which corresponds to visually lossless compression
  • Subsampling mode – 4:4:4
  • Number of DWT resolutions – 7
  • Codeblock size – 32×32
  • MCT – on
  • PCRD – off
  • Tiling – off
  • Quality layers – one
  • Progression order – LRCP (L = layer, R = resolution, C = component, P = position)
  • Modes of operation – single or batch

Test images

Hardware and software

  • CPU Intel Core i7-5930K (Haswell-E, 6 cores, 3.5–3.7 GHz)
  • GPU NVIDIA GeForce GTX 1080 (Pascal, 20 SMM, 2560 cores, 1.6–1.7 GHz)
  • OS Windows 10 (x64), version 1803
  • CUDA Toolkit 9.2

JPEG2000 Decoders for comparison

J2K decoding at single image mode for 2K image with lossy compression: 2k_wild_lossy.jp2 (1920×1080, 4:4:4, 24-bit)

JPEG2000 decoders Average decoding time Performance Frames per second Hardware
OpenJPEG (single thread) 147 ms 40.4 MB/s 6.8 fps CPU
OpenJPEG (12 threads) 75 ms 79.1 MB/s 13.3 fps CPU
Jasper 367 ms 16.2 MB/s 2.7 fps CPU
Kakadu (single thread) 88 ms 67.4 MB/s 11.4 fps CPU
Kakadu (12 threads) 26 ms 228.2 MB/s 38.5 fps CPU
Fastvideo JPEG2000 decoder 27.4 ms 216.5 MB/s 36.5 fps GPU + CPU

J2K decoding at single image mode for 4K image with lossy compression: 4k_wild_lossy.jp2 (3840×2160, 4:4:4, 24-bit)

JPEG2000 decoders Average decoding time Performance Frames per second Hardware
OpenJPEG (single thread) 662 ms 35.8 MB/s 1.5 fps CPU
OpenJPEG (12 threads) 366 ms 64.8 MB/s 2.7 fps CPU
Jasper 1490 ms 15.9 MB/s 0.7 fps CPU
Kakadu (single thread) 326 ms 72.8 MB/s 3.1 fps CPU
Kakadu (12 threads) 85 ms 279.2 MB/s 11.8 fps CPU
Fastvideo JPEG2000 decoder 66.3 ms 358 MB/s 15.1 fps GPU + CPU

MB/s – MegaBytes per second

J2K decoding at single image mode for 2K image with lossless compression: 2k_wild_lossless.jp2 (1920×1080, 4:4:4, 24-bit)

JPEG2000 decoders Average decoding time Performance Frames per second Hardware
OpenJPEG (single thread) 504 ms 11.8 MB/s 2.0 fps CPU
OpenJPEG (12 threads) 83 ms 71.5 MB/s 12.0 fps CPU
Jasper 836 ms 7.1 MB/s 1.2 fps CPU
Kakadu (single thread) 446 ms 13.3 MB/s 2.2 fps CPU
Kakadu (12 threads) 62 ms 95.7 MB/s 16.1 fps CPU
Fastvideo JPEG2000 decoder 44.2 ms 134.2 MB/s 22.6 fps GPU + CPU

J2K decoding at single image mode for 4K image with lossless compression: 4k_wild_lossless.jp2 (3840×2160, 4:4:4, 24-bit)

JPEG2000 decoders Average decoding time Performance Frames per second Hardware
OpenJPEG (single thread) 1564 ms 15.2 MB/s 0.6 fps CPU
OpenJPEG (12 threads) 260 ms 91.3 MB/s 3.8 fps CPU
Jasper 2709 ms 8.8 MB/s 0.4 fps CPU
Kakadu (single thread) 1349 ms 17.6 MB/s 0.7 fps CPU
Kakadu (12 threads) 189 ms 125.6 MB/s 5.3 fps CPU
Fastvideo JPEG2000 decoder 114.6 ms 207 MB/s 8.7 fps GPU + CPU

MB/s – MegaBytes per second

Superior performance of JPEG 2000 decoding at batch mode

For batch mode we've carried out performance measurements for JPEG 2000 decoding exactly with the same parameters as we used at single image mode. In the table below, you can find averaged results for the best series of measurements (each lasting 10 seconds). All results don't include host I/O latency (image loading to RAM from HDD/SSD and saving back).

To get maximum performance at batch mode, we don't need very large images as for single image mode. For example, 4K image contains 4 times more pixels compared to 2K. It means that at batch mode we can expect that decoding time for 2K will be 4 times less than for 4K. In theory, if at single image mode we can do JPEG2000 decoding for 2K at 38 fps and for 4K at 15 fps, then it could be possible to achieve frame rate 15*4=60 fps for 2K decoding speed by processing 4 images with 2K resolution simultaneously, as a batch. We could expect even higher speedup using greater batch size, since at single image mode GPU is not completely occupied with 4K images and batch size for 2K is more than 4. If we also take into account simultaneous processing on both CPU and GPU, which is possible at batch mode, one could get additional acceleration for J2K decoding.

JPEG2000 decoding benchmarks at batch mode

  2k_wild_lossy.jp2 4k_wild_lossy.jp2 2k_wild_lossless.jp2 4k_wild_lossless.jp2
Fastvideo J2K decoder 100.9 fps 25.2 fps 37.3 fps 13.6 fps
Kakadu 7.10.2 (12 threads) 38.5 fps 11.8 fps 16.1 fps 5.3 fps
OpenJPEG 2.3.0 (12 threads) 13.3 fps 2.7 fps 12.0 fps 3.8 fps
J2K-Codec 2.2 7.1 fps 2.1 fps 2.6 fps 0.9 fps

We have published all info concerning time measurements, together with sample images, JPEG2000 parameters and hardware specifications to offer everyone an opportunity to reproduce our results and to check performance measurements for other J2K decoders at the same testing conditions. Our demo for fast J2K codec for Windows could be downloaded here.

Contact Form

This form collects your name and email. Check out our Privacy Policy on how we protect and manage your personal data.