Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast DCT transformation

Standard equation for generating DCT coefficients in JPEG compression process is DCT formula given by:

I have red that this implementation is expensive (slow), and there is much faster way. Is there explicit formula for this faster way of generating DCT coefficients?

like image 967
MrD Avatar asked Jan 19 '12 23:01

MrD


People also ask

What is fast DCT?

The discrete cosine transform (DCT) is the most popularly used signal processing tool for compressing images and sounds, found in standards such as JPEG and MP3. (Less often used methods include wavelet transforms, polyphase filters, Hadamard transforms, etc.)

What are the advantages of DCT transform?

Advantages and Disadvantages of the DCT The transformation is orthogonal (inverse is transpose and energy is preserved), fast algorithms can be used for computation, and the output for (near) constant matrices generally consists of a large number of (near) zero values.

What is DCT transform image processing?

DCT Definition The discrete cosine transform (DCT) represents an image as a sum of sinusoids of varying magnitudes and frequencies. The dct2 function computes the two-dimensional discrete cosine transform (DCT) of an image.

Why DCT is preferred over DFT?

> DCT is preferred over DFT in image compression algorithms like JPEG > because DCT is a real transform which results in a single real number per > data point. In contrast, a DFT results in a complex number (real and > imaginary parts) which requires double the memory for storage.


2 Answers

Yes, this general version is slow, very slow indeed. There are much faster approximation out there.

Fastest software DCT transformation can be found within the BinDCT family.

They only need some basic additions and shifts, and are therefore very fast, at the expense of some precision.

An excellent presentation of it : On the Process of Realizing the Best BinDCT Configuration for Image Compression (especially slide 12)

like image 95
Cyan Avatar answered Dec 09 '22 23:12

Cyan


Modern video codecs such MPEG4-AVC use the Hadamard Transform instead of the DCT as spatial transform.

The Hadamard Transform is an exact low complexity transform and gives results similar to the DCT (it can be considered an approximate of the DCT) but requires no multiplication. As a result, implementations of the HT are very fast.

like image 20
flanglet Avatar answered Dec 10 '22 00:12

flanglet