The faculty of Electronics and Information Technology


Bachelor of Science in Engineering
Computer Science
Computer Information System Engineering
Final grade
very good
19 September 2011
Wavelet compression in NVIDIA CUDA (details below)

Thesis: Wavelet compression in NVIDIA CUDA

Original thesis (polish): Kompresja falkowa w środowisku NVIDIA CUDA


The main goal of this thesis is to implement image and video sequence wavelet compressor. The compressor is implemented using NVIDIA CUDA technology which allows computing on GPU. The algorithms for wavelet transform, quantization and arithmetic coding are presented.

The thesis describes basics of the NVIDIA CUDA architecture. The particular emphasis is placed on the feasibility of the algorithms on the GPU. Developed encoder is verified for GPU implementation effectiveness.

Compressor overview

Developed application allows compressing images and video sequences using wavelet transform. Moreover, some parts of compressor are both implemented on CPU and GPU. This allows comparing speedup gained by using NVIDIA CUDA technology. Main features of developed application:

  • Command line interface - all application features are set by command line arguments. In case of any errors, application returns applicable message with error code.
  • Image compression - application allows compression of bitmap pictures in pgm, bmp, jpg, tiff format. Image size is restricted to multiplicity of 2d, where d is number of wavelet decomposition levels.
  • Video sequence compression - application allows compression of video sequences in RAW i420 avi format. Size restrictions are like in image compression.
  • Computing method - by default compressor uses CPU implementation. It is possible to change it to GPU with special command line argument.
  • Measurement of computing time - application has special code responsible for measuring computing time of each part of compression algorithm.
  • Bitrate control - compression ratio is controlled by command line argument.
  • Other parameters of application lets specifying details of each part of compression algorithm:
    • wavelet filter - Haar, Daub4, Daub6, CDF97, Antonini
    • wavelet decomposition levels
    • quantizer - uniform quantizer, dead-zone uniform quantizer

Developed codec uses standard lossy transform scheme. Input images and video sequence frames are transformed by wavelet transform and quantized. Then lossless step is performed by arithmetic coder. Image 1 shows encoding scheme with steps implemented on GPU, marked with green color.

Image 1. Image compression encoding scheme


Developed codec was verified for compression effectiveness and speed. Particular emphasis was put on comparison of NVIDIA CUDA GPU implementation with CPU implementation. Due to special mechanisms built into application it was possible to measure time spend in each step of compression algorithm. Below there are results for image compression and decompression.

Image 2. Image compression time for CPU and CUDA
Image 3. Image decompression time for CPU and CUDA
Image 4. Image compression time details for CPU
Image 5. Image compression time details for GPU


Developed compressor allows compression of image and video sequences. NVIDIA CUDA implementation of wavelet transform is up to 10 times faster than regular CPU implementation. However, due to high RD optimization cost, this leads only to 40 percent overall efficiency gain in image encoding. Other very costly step is arithmetic encoding, which due to its sequential character is impossible to parallelize. Video sequence encoding has similar results to image encoding. Complete verification results can be found in thesis text.