1 / 21

The Discrete Cosine Transform (DCT)

Christopher Mitchell CDA 6938, Spring 2009. The Discrete Cosine Transform (DCT). The Discrete Cosine Transform. In the same family as the Fourier Transform Converts data to frequency domain. Represents data via summation of variable frequency cosine waves.

jaegar
Download Presentation

The Discrete Cosine Transform (DCT)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Christopher Mitchell CDA 6938, Spring 2009 The Discrete Cosine Transform (DCT)

  2. The Discrete Cosine Transform • In the same family as the Fourier Transform • Converts data to frequency domain. • Represents data via summation of variable frequency cosine waves. • Since it is a discrete version, conducive to problems formatted for computer analysis. • Captures only real components of the function. • Discrete Sine Transform (DST) captures odd (imaginary) components → not as useful. • Discrete Fourier Transform (DFT) captures both odd and even components → computationally intense.

  3. Significance / Where is this used? • Image Processing • Compression - Ex.) JPEG • Scientific Analysis - Ex.) Radio Telescope Data • Audio Processing • Compression - Ex.) MPEG – Layer 3, aka. MP3 • Scientific Computing / High Performance Computing (HPC) • Partial Differential Equation Solvers

  4. Significance, Cont. • Image Processing Example • Exhibits Energy Compaction • Drop small amplitude coefficients Original Image DCT Transformed Image

  5. Implementation Platform NVIDIA CUDA Version 2.0

  6. Implementation Platform, Cont. • What Happened to the Cell/BE? • Too many technical challenges compared to the deadline. • Algorithm is embarrassingly parallel • Conducive of launching hundreds of threads → GPU • Algorithm requires too much data per pass compared to local store size. • Would have to be creative with DMA and no guarantee of bottleneck mitigation.

  7. Algorithm Walk Through • Mathematical Basis • 1D Version: • Where: • 2D Version: • Where α(u) and α(v) are defined as shown in the 1D case.

  8. Algorithm Walk Through • CPU Version – 1D DCT

  9. Algorithm Walk Through • CPU Version – 2D DCT

  10. Algorithm Walk Through • Problem • 1D DCT is O(n2) • 2D DCT is O(n3) • Additionally, the Algorithm uses calls to calculate the cosine and square root. • Long Latency ALU Operations

  11. Algorithm Walk Through • CUDA Version – 1D DCT

  12. Algorithm Walk Through • CUDA Version – 2D DCT

  13. Algorithm Walk Through • Solution • 1D DCT is now O(n) • 2D DCT is now O(n2) • Parallelization key to success with this algorithm

  14. Testing • Platform • Intel Core 2 Duo E6700 @ 2.66 GHz. • Gigabyte GA-P35-DQ6 Motherboard • 2 GB RAM • 2 NVIDIA GeForce 8600 GTS Superclocked GPUs • 720 MHz. Core Clock • 256 MB GDDR3 Memory • 4 Multiprocessors → 32 Streaming Processors • Windows XP Professional (32-bit) w\ SP3 and NVIDIA ForceWare 178.24 Drivers

  15. Testing - Overview

  16. Testing – 1D DCT

  17. Testing – 1D DCT

  18. Testing – 2D DCT

  19. Testing – 2D DCT

  20. Future Work • Multiple GPU version • Have a dual card setup to test this with. • Need to find efficient way to split the problem between the two cards without incurring a large I/O penalty. • Still interested in trying a Cell/BE version of the algorithm. • Need to improve at CBEA programming. • DMA & local store size is the limiting factor for this particular problem.

  21. References • NVIDIA CUDA Programming Guide, Version 2.1 • http://developer.download.nvidia.com/compute/cuda/2_1/toolkit/docs/NVIDIA_CUDA_Programming_Guide_2.1.pdf • The Discrete Cosine Transform (DCT): Theory and Application • http://www.egr.msu.edu/waves/people/Ali_files/DCT_TR802.pdf • CDA 6938 Lecture Notes and Slides

More Related