Fast CUDA JPEG encoder
We have wide experience with high speed cameras and software and it's a usual problem - how to increase duration for high speed video recording. All our cameras do online video streaming to PC RAM via PCI-Express framegrabber or CameraLink interface. In that case total recording time is restricted by the size of free RAM which is usually in the range of 1-12 GBytes. Conventional high speed camera data rate is about 800 MB/s or even much more, so one can record up to 16 seconds of high speed video in a raw format.
The basic idea how to improve the situation is quite straightforward. We need to compress incoming to PC stream with lossy algorithm to achieve compression ratio of 10-20 times to be able to write compressed data stream to HDD/SSD/RAID in realtime. Usual CPU is unable to cope with that problem, so we decided to use GPU with NVIDIA CUDA technology instead. We believe that it's a good idea to use video cards to implement the latest NVIDIA findings for parallel computations.
We have implemented JPEG lossy compression algorithm (JPEG baseline for 8/24-bit images) because we consider it to fulfil our considerations. The main demands are the following:
Lossy JPEG compression algorithm meets all criteria for parallel computations on the GPU. To create high-performance JPEG encoder for high speed video applications we have also done algorithm optimization for GPU calculations. This is full, performance-oriented implementation of Baseline JPEG. We got ultra fast JPEG compression and decompression on the GPU due to full parallel implementation of Baseline JPEG algorithm. Our JPEG codec is much more fast in comparison with the best commercial multithreaded JPEG codecs for multicore CPUs.
Fast JPEG image compression features for CUDA JPEG codec
We have succeeded to make parallel all stages of JPEG algorithm including entropy encoding and decoding. There was a widespread opinion that Huffman algorithm could be only serial. In our solution Huffman coding is not a bottleneck anymore and it's fully parallel. Now we don't off-load anything from GPU to CPU to make JPEG codec faster. CUDA JPEG codec is extremely fast and is functioning completely on GPU.
Benchmarks for JPG encoding on NVIDIA GeForce GTX 1080 TI (Windows-7 and CUDA-8.0, 64-bit)
Now we need just 0.51 ms for Baseline JPEG encoding of 24-bit color image with 4K resolution 3840 × 2160, JPEG quality 90% and subsampling 4:2:0 (it corresponds to image compression ratio ~10:1). We have chosen the above JPEG encoding parameters because they correspond to so called "visually lossless" compression.
These are the latest performance benchmarks for encoding of 2K and 4K images, 24-bit (JPEG compression on GPU, without DeviceIO latency, single image mode, no batch, no streaming) on NVIDIA GeForce GTX 1080 TI and Quadro P6000:
These are JPEG decoding performance benchmarks on NVIDIA GeForce GTX 1080 TI and Quadro P6000 (no DeviceIO latency, single image mode, no batch, no streaming):
The above results are much faster than benchmarks of libjpeg-turbo on CPU. Even if we take into account host to device and device to host transfers, the performance of CUDA JPEG codec will be much higher. More results for performance measurements you can download here.
We can also extend our JPEG compression software by fast image processing pipeline for high speed and high resolution cameras: bad pixel removal, dark frame subtraction, shading correction, white balance, demosaicing, color correction, image filtering, denoising, 1D LUT, 3D LUT, gamma, color management, histogram, online resize, crop, rotate, sharp, OpenGL output, integration with FFmpeg, bayer compression, J2K compression, etc.
We license CUDA JPEG and other components of GPU Image Processing SDK to software developers, camera manufacturers, internet providers, software integrators, etc. Our SDK is utilized in wide range of imaging applications. Demo version, documentation, licensing info and quotation are available upon request. We are also offering custom software design according to agreed specification. If you need to get significant speed up for your image processing application, don't hesitate to contact us.
Roadmap 2018 for further improvements of CUDA JPEG Codec
For any further information concerning CUDA JPEG codec or free trial please contact us via email.
|Moscow representative: NPO Astek - 129344, Moscow, Iskra Street 17-A, Build. 3
Phone: +7 (495)-542-04-49