You are on page 1of 15

Redes Para Multimedios

Tcnicas de Compresin
para Multimedia
Prof. Ernesto Garca
21 de Agosto de 2013

Audio
Digitization
Sampling
Quantization
Coding

Higher sampling rate -> higher quality


Higher bits per sample -> higher quality
Sampling at 8 KHz, 8 bit samples -> 64kbits/sec
CD-quality audio
Sampling at 44.1KHz, 16 bit samples -> 705.6
kbits/sec

Image/Video
Digitization
Scan a picture frame
Digitize every pixel

Color represented by RGB


Normally converted to Y, U and V
Luminance Y = 0.30R + 0.59G + 0.11 R
Chrominance U = (B-Y) * 0.493
V = (R-Y) * 0.877

4
8/26/2013

Compression Requirements
Storage Requirements

Uncompressed audio: 8kHz, 8-bit quantization implies


64Kbits to store per second
CD quality audio: 44.1 kHz, 16-bit quantization implies to
store 705.6 Kbits per second
PAL video format: 640x480 pixels, 24-bit quantization, 25
fps implies to store 184 Mbps
NTSC at 30 frames/second with 8-bit samples, implies to
store 216 Mbps

Compression is required !

Requirement on Network Bandwidth / Bit-rate

General Data Compression Scheme


Input Data

Encoder
(compression)
Codes /
Codewords

Storage or
Networks
Codes /
Codewords

B0 = # bits required before


compression
B1 = # bits required after
compression
Compression Ratio = B0 / B1.

Decoder
(decompression)
Output Data

Compression Techniques

Compression Techniques
Entropy Coding

Semantics of the information to encoded are ignored


Lossless compression technique
Can be used for different media regardless of their
characteristics

Source Coding

Takes into account the semantics of the information to be


encoded.
Often it uses lossy compression technique

Hybrid Coding

Combine entropy coding with source coding


Most multimedia compression algorithms are hybrid
techniques
Examples: JPEG, JPEG-2000, H. 264, MPEG-2, MPEG4, MPEG-7, MPEG-21

Entropy Encoding Techniques


Run-length encoding
Represent stream as (c1, l1), (c2, l2),, (ck, lk)
1111111111333332222444444 = (1, 10) (3, 5) (2,4)
(4, 5)

Huffman Encoding
Statistical encoding
Depends on occurrence frequency of single
characters or sequences of data bytes
To determine Huffman code, it is useful to
construct a binary tree
Leaves are characters to be encoded
Nodes carry occurrence probabilities of the
characters belonging to the subtree

Source Encoding Techniques


Transformation encoding
Transform the bit-stream into another domain
Data in the new domain more amenable to
compression
Type of transformation depends on data

Image/video transformed from time domain


into frequency domain (DCT)

Differential/Predictive Encoding
Encoding the difference between actual value
and a prediction of that value
Number of Techniques
Differential Pulse Code Modulation (DPCM)
Delta Modulation (DM)
Adaptive Pulse Code Modulation (APCM)

Vector Quantization
Divide the data stream into blocks or vectors
One or two dimensional blocks

Use codebooks
Find the closest symbol in codebook for a given
sample
Transmit the reference to that symbol

Video Compression
Spatial (intra-frame) compression:
Compresses each frame in isolation (by separated),
treating it as a bitmapped image.
Based on quantization of DCT coefficients.

Temporal (inter-frame) compression:


Compresses sequences of frames by only storing
differences between them.
Record displacement of object plus changed pixels
in area exposed by its movement.
Based on Motion Compensation (MC).

Spatial Compression
Image compression applied to each frame.

Can therefore be lossless or lossy, but lossless


rarely produces sufficiently high compression
ratios for volume of data.

Temporal Compression
Key frames are spatially compressed only
Key frames often regularly spaced
(e.g., every 10 frames).

Difference frames only store the differences


between the frame and the preceding frame or most
recent key frame.
Difference frames can be efficiently spatially
compressed.

You might also like