12 bit jpeg codec

12-bit JPEG codec on CUDA

We have created extremely fast 12-bit JPEG codec based on CUDA technology. This is an extension of our full, performance-oriented implementation of Baseline JPEG Codec on CUDA. Our 12-bit JPEG codec is much faster in comparison with the best 12-bit JPEG codecs for multicore CPUs.

JPEG logoFeatures of 12-bit JPEG codec

  • Implementation is compliant with 12-bit Extension of JPEG Standard, libjpeg and libjpeg-turbo
  • JPEG compression and decompression for 12-bit per channel grayscale and color images
  • 12-bit JPEG encoder is extremely fast and is functioning completely on GPU
  • Arbitrary width and height
  • Subsampling modes: 4:4:4, 4:2:2, 4:2:0
  • Minimum input image size 1×1 for grayscale and color images with any subsampling
  • Maximum input image size is 12,000 × 12,000 or more (optional)
  • JPEG image quality in the range from 1 to 100
  • Standard quantization and Huffman tables for luma and chroma
  • Support for HDR images
  • Read/edit/write any EXIF section
  • Data input: 8/12-bit per channel images from RAM/HDD/RAID/SSD/GPU
  • Data output: final compressed/uncompressed image in RAM/HDD/RAID/SSD/GPU
  • Input formats: 12/16-bit PGM, 12/16-bit YUV, 36/48-bit PPM/BMP
  • Continuous data mode (input one image after another)
  • Standard set of computations for parallel implementation of 12-bit JPEG compression and decompression:
    • 12-bit JPEG Encoding on GPU: Input data parcing, Color Transform, 2D DCT, Quantization, Zig-zag, AC/DC, DPCM, RLE, Huffman coding, Byte stuffing, JFIF formatting
    • 12-bit JPEG Decoding on GPU: JFIF parcing, Restart marker search, Inverse Huffman decoding, Inverse RLE, Inverse DPCM, AC/DC, Inverse Zig-zag, Inverse Quantization, Inverse DCT, Inverse Color Transform, Output formatting
  • Floating point precision for Color Transform, 2D Discrete Cosine Transform and Quantization
  • Optimized for the latest NVIDIA GPUs and CUDA-7.5
  • Produced JPEG streams conform to the Digital Imaging and Communications in Medicine (DICOM) requirements
  • Compatibility with FFmpeg to read/write MJPEG streams (FFmpeg is under LGPLv2.1)
  • Integration of 12-bit JPEG Viewer with OpenGL
  • Compatible with Windows-7/8/10 (32/64) and Linux (32/64)

Benchmarks for 12-bit JPEG encoding on NVIDIA GeForce GTX 1080 (Windows-7 and CUDA-7.5, 64-bit)

We have utilized ~50 MPix 14-bit RAW image from Canon-5DSR camera, which we have converted to color 12-bit per channel data for benchmarking.

For testing we have utilized that 36-bit color image in PPM format with resolution 8736 × 5856. We got the following compression times (JPEG quality 90%, all computations on GPU, without DeviceIO latency, single image mode, no batch, no streaming)

  • JPEG encoding with quality 90% and subsampling 4:4:4 ~ 8.6 ms
  • JPEG encoding with quality 90% and subsampling 4:2:2 ~ 5.9 ms
  • JPEG encoding with quality 90% and subsampling 4:2:0 ~ 5.8 ms
  • JPEG encoding with quality 90% for grayscale image with the same resolution ~ 3.9 ms

For quite big images with 12 bits per color channel, we can get GPU performance of JPEG encoding in the range of 25 – 40 GByte/s. For smaller images the performance will be less, but still this is extremely fast.

Who need 12-bit JPEG Codec?

JPEG algorithm can be implemented for images with either 8-bit or 12-bit per color channel. There is an interest in use of 12-bit JPEG codec to insure better image quality. Modern cameras usually have bit depth more than 12 bits, that's why that algorithm could be widely utilized. Below there are some applications which do need 12-bit jpg codec:

  • RAW image and video processing
  • Digital Cinema
  • Medical imaging with DICOM (X-Ray, ultrasound, microscopes, etc.)
  • Augmented Reality and Virtual Reality
  • 3D Video
  • 3D Reconstruction
  • Astronomy
  • Geospatial software
  • Display projection systems
  • Traffic systems
  • Surveillance systems
  • High speed cameras
  • Machine vision and industrial cameras with high bit depth (12 bits or more)

Many imaging systems create and process 12 bpp RAW data and nowadays it's a minimum requirement to get an image with high accuracy. Unfortunately 12-bit JPEGs are quite rare because only a few viewers are compatible with 12-bit jpeg format. Our software fills that gap by offering high performance 12-bit JPEG/MJPEG codec. That codec supports both Baseline 8 bpp and Extended 12 bpp modes.

Licensing for 12-bit JPEG Codec on CUDA

We license 12-bit JPEG Codec and other components of GPU Image Processing SDK to software developers, camera manufacturers and resellers, internet providers, software integrators, etc. Our SDK is utilized in wide range of imaging applications. Demo SDK, 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.

More info about CUDA JPEG image compression

     Home                   Contacts                 Site Map
GPU Image Processing