Home

Jiri Matela Martin Srom

GPUJPEG

The first test implementation of the JPEG image compression standard for NVIDIA GPUs used for real-time transmission of high-definition video.

Authors:

Project Admins:
  1. Requirements
  2. Usage of library
  3. Usage of console application
  4. Performance

Overview:

  • It uses NVIDIA CUDA platform.
  • Not optimized yet (it is only the first test implementation).
  • Encoder and decoder use Huffman coder for entropy encoding/decoding.
  • Encoder produces by default baseline JPEG codestream which consists of proper codestream headers and one scan for each color component without subsampling and it uses restart flags that allows fast parallel encoding. The quality of encoded images can be specified by value 0-100.
  • Optionally encoder can produce interleaved stream (all components in one scan) or/and subsampled stream.
  • Decoder can decompress only JPEG codestreams that can be generated by encoder. If scan
    contains restart flags, decoder can use parallelism for fast decoding.


  • Encoding of JPEG codestream is divided into following phases:
    1. Input data loading
    2. Preprocessing
    3. Forward DCT
    4. Huffman encoder
    5. Formatting codestream
  • Decoding of JPEG codestream is divided into following phases:
    1. Input data loading
    2. Parsing codestream
    3. Huffman decoder
    4. Inverse DCT
    5. Postprocessing
  • On CPU is implemented:
    • Input data loading
    • Parsing codestream
    • Huffman encoder/decoder (when restart flags are disabled)
    • Output data formatting
  • On GPU is implemented:
    • Preprocessing/Postprocessing (color component parsing, color transformation RGB <-> YCbCr)
    • Forward/Inverse DCT (discrete cosine transform), implementation from NVIDIA NPP library (NVIDIA Performance Primitives)
    • Huffman encoder/decoder (when restart flags are enabled)

License:

This software contains source code provided by NVIDIA Corporation.
This software uses NVIDIA Performance Primitives library [3].
This software source code is based on SiGenGPU [4].

Copyright (c) 2011, CESNET z.s.p.o
Copyright (c) 2011, Silicon Genome, LLC.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR             
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

References: