Sei sulla pagina 1di 5

Literary Survey on Data Compression Techniques -- Vishwaraj Anand, IIT Patna Abstract:

This Literature survey discusses the details of Data Compression and the techniques to do compression in an effective way. Algorithms used for MP3, MPEG and JPEG are also discussed.

Introduction:
Data compression is the process of encoding data so that it takes less storage space or less transmission time than it would if it were not compressed. Compression is possible because most real-world data is very redundant. Data of various sources are compressed to save storage space and also to reduce data transfer over internet. A data compression technique is thus considered efficient only if it does a considerable compression and also does not eat up much of the processing power of machines. These fields include: Self-extracting archive Image compression Speech coding Video compression Multimedia compression Minimum message length HTTP compression Free File Format These are generally grouped under two categories Lossy and Lossless compression based on needs. For example Text, Spread sheets, executable can only be Lossless while Image, Video and multimedia can be Lossy also. In this paper JPEG, MPEG and MP3 are discussed.

Techniques:
Image stored in the form of pixels is compressed (Lossy) by reducing the colour space to the most common colours and by using transform coding and fractal compression. Lossless

compression is done by run length encoding and entropy encoding. Voice compression is done by Code Excited Linear Prediction (CELP) coding, which is used in the GSM standard. In CELP, modelling is divided in two stages, a linear predictive stage that models the spectral envelope and code-book based model of the residual of the linear predictive model. Channel coding may be done to avoid losses due to transmission errors. Nearly all commonly used video compression methods apply a discrete cosine transform (DCT) for spatial redundancy reduction. Video formats are rarely lossless compressed. Lossy techniques include inter-frame and intra-frame compression for images and audio compression for voice data. Inter-frame compression is basically image compression on various frames. Intra-frame compression is done by comparing each frame in the video with the previous one. For pixels that dont change in subsequent frames a short command is issued to copy the previous pixels else a little longer command to darken or lighten or flip the pixel is issued. Since this technique encodes playing sequence only video editing becomes difficult.

Algorithms:
In Lossless Techniques, the compression and decompression are simply reverse of each other. Common methods include RunLength Encoding, Statistical Compression (Huffman encoding and Lempel ziv - Welch encoding) and Relative compression. In Lossy Techniques, the common techniques include JPEG, MPEG, MP3, etc.

JPEG
JPEG compression and decompression consist of 4 distinct and independent phases. 1. Dividing Image: The image is divided into 8 x 8 pixel blocks. Coloured images have 3 bytes per pixel (one for each RGB) instead for 1 byte per pixel in B/w images. 2. Conversion to frequency domain: Each block is represented by intensity of a colour. After converting the block to the frequency domain, each value will be the amplitude of a unique cosine function. The cosine functions each have different frequencies. The block is represented by multiplying the functions with their corresponding amplitudes, then adding the results together. This is done by Fast Fourier Transform (FFT) or Discrete Cosine Transform (DCT).

3. Quantization: The JPEG algorithm removes extra information by dividing

each cosine coefficient in the data matrix by some predetermined constant, and then rounding up or down to the closest integer value. 4. Entropy Coding: After quantization, the algorithm is left with blocks of 64 values, many of which are zero. To further compress the algorithm uses a zigzag ordered encoding as in figure, which collects the high frequency quantized values into long strings of zeros.
5. Encoding: DC values are encoded using Delta Modulation. Zigzag tokens

with {size, skip} information are encoded using Huffman encoding. (size tells no of bits needed to represent next token and skip tells no of zeros before current token).

Decompression is almost the reverse of compression in JPEG.

MP3
Stereo audio streams contain largely redundant information. MPEG audio compression takes advantage of these facts to reduce extent and detail of mostly inaudible frequency ranges. Sampling frequencies range from 8 kHz to 96 kHz. There are 1 to 48 channels per stream. Temporal Noise Shaping (TNS) minimizes quantization noise by making frequency domain predictions so that they can be compressed with better quality. The final process of compression to MP3 format can be summarised as below: 1. Loading original .wav file 2. Dividing music into small time intervals 3. Performing spectral analysis 4. Removing sounds outside hearing range 5. Removing masked components 6. Creating new file (.mp3) MP3 encoding significantly reduces the memory space required for music (typically factor of 10) but it also requires a fast system for compression and decompression.

MPEG
It aims at reduction of spacial and temporal redundancy. Spacial redundancy removal takes advantage of similarity among most neighboring pixels. This is similar to the JPEG encoding. Common steps include: 1. Macro Blocks - Taking groups of pixels (16x16) and converting RGB to YUV color-space. 2. Applying Discrete Cosine Transformation (DCT) based on Fourier analysis where signals are represented as sum of sine and cosines. Concentrate on higher-frequency values and reduce the lower frequencies as repetitions. 3. Represent pixels in blocks with fewer numbers. 4. Quantization - Reducing data required for DCT coefficients. This step is responsible for heavy reduction in file size and maintaining quality also. 5. Using Run-Length and Entropy coding to do compression. Temporal Redundancy removal takes advantage of similarity between successive frames. This is done by using Motion vectors between successive frames. MP3 is used for audio compression in MPEG. Various formats of MPEG are as follows: 1. MPEG-1: Initial audio/video compression standard Used by VCDs MP3 = MPEG-1 audio layer 3 Target of 1.5 Mb/s bitrate at 352x240 resolution Only supports progressive pictures 2. MPEG-2: Super-set of MPEG-1

Rates up to 10 Mbps (720x486) Can do HDTV 3. MPEG-4: Includes support for AV objects, 3D content, low bitrate encoding, and DRM In practice, provides equal quality to MPEG-2 at a lower bitrate, but often fails to deliver outright better quality MPEG-4 Part 10 is H.264, which is used in HD-DVD and Blu-Ray 4. MPEG-7: New standard Allows content-description (ease of searching) 5. MP3, for audio: MPEG Layer-3

Conclusions:
Media compression is indispensable even as storage and streaming capacities increase due to increase in data demand created by data oriented applications. There has been a massive acceleration of mirror world and high definition video stream. Future goals are oriented towards increasing ease of access to media information. Data compression has come up a long way in recent years but there is definitely room for improvement. Use of Robust Compression and smarter algorithms can really change the computing we do today.

References:
1. http://img.zdnet.com/techDirectory/LOSSY.GIF - Picture of lossy and lossless communication. 2. http://www.data-compression.com/index.shtml - Text reference for definitions. 3. http://en.wikipedia.org/wiki/Data_compression - Text reference for algorithms. 4. http://docs.google.com/ - The JPEG compression algorithm. 5. http://acoustics.mie.uic.edu/merit/openingpage.html - MP3 encoding.

Potrebbero piacerti anche