Newest Viewed Downloaded

Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007

Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007

Lossy Compression

Apart from lossless compression, we can further reduce the bits to represent media data by discarding “unnecessary” information. Media such as image, audio and video can be “modified” without seriously affecting the perceived quality. Lossy multimedia data compression standards include JPEG, MPEG, etc.

Methods of Discarding Information

Original image 1/2 resolution and zoom in Reducing resolution

½ color levels Original image Reduce pixel color levels

2.3bits/pixel (JPEG) For audios and videos we can similarly reduce the sampling rate, the sample levels, etc. These methods usually introduce large distortion. Smarter schemes are necessary!

Distortion

Distortion: the amount of difference between the encoded media data and the original one. Distortion measurement Mean Square Error (MSE) mean( ||xorg – xdecoded||2) Signal to Noise Ratio (SNR) SNR = 10log10 (Signal_Power)/(MSE) (dB) Peak Signal to Noise Ratio PSNR = 10log10(255^2/MSE) (dB)

The Relation of Rate and Distortion

D Bit Rate 0 D_max H The lowest possible rate (average codeword length per symbol) is correlated with the distortion.

Quantization

Maps a continuous or discrete set of values into a smaller set of values. The basic method to “throw away” information. Quantization can be used for both scalars (single numbers) or vectors (several numbers together). After quantization, we can generate a fixed length code directly.

Uniform Scalar Quantization

xmin xmax Quantization step D =(xmax-xmin)/N Decision boundaries Quantization value Assume x is in [xmin, xmax]. We partition the interval uniformly into N nonoverlapping regions. A quantizer Q(x) maps x to the quantization value in the region where x falls in.

Quantization Example

Q(x) = [floor(x/D) + 0.5] D Q(x)/ D x/D 0 1 2 3 -3 -2 -1 0.5 1.5 -0.5 -1.5 -2.5 2.5 Midrise quantization

Quantization Example

Q(x) = [round(x/D)] D Q(x)/ D x/D 0 1 2 3 -3 -2 -1 1 2 -1 -2 -3 3 Midrise quantization

Quantization Error

xn xn+1 Quantization error x Quantization value To minimize the possible maximum error, the quantization value should be at the center of each decision interval. If x randomly occurs, Q(x) is uniformly distributed in [-D/2, D/2]

Quantization and Codewords

xmin xmax Each quantization value can be associated with a binary codeword. In the above example, the codeword corresponds to the index of each quantization value. 000 001 010 011 100 101

Another Coding Scheme

xmin xmax 000 001 011 010 110 111 The above codeword is different in only 1bit for each neighbors. Gray code is more resistant to bit errors than the natural binary code. Gray code

Bit Assignment

bits dB 1 more bit About 6db gain If the # of quantization interval is N, we can use log2(N) bits to represent each quantized value. For uniform distributed x, The SNR of Q(x) is proportional to 20log(N) = 6.02n, where N=2n

Non-uniform Quantizer

0 Perceived distortion ~ D / s For audio and visual, the tolerance of a distortion is proportional to the signal size. So, we can make quantization step D proportional to the signal level. If signal is not uniformly distributed, we also prefer non-uniform quantization.

Vector Quantization

Decision Region Quantization Value

Predictive Coding

1 3 4 5 3 2 1 0 3 4 5 6 7 0 1 2 1 1 -2 -1 -1 -1 3 1 1 1 1 0 1 3 4 5 3 2 1 0 3 4 5 6 7 + + … + + - + - + - … + - encoder decoder Lossless difference coding revisited

Predictive Coding in Lossy Compression

Local decoder 1 3 4 5 3 2 1 0 3 4 5 6 7 0 1 1 1 1 -1 -1 -1 -1 1 1 1 1 1 0 1 2 3 4 3 2 1 0 1 2 3 4 5 Q + - Q + + + + + - … Encoder … - + - Q Q(x) = 1 if x > 0, 0 if x == 0 and –1 if x < 0

A Different Notation

Buffer + Audio samples or image pixels Entropy coding 0101… Lossless Predictive Encoder Diagram -

Showing 1 - 20 of 26 items Details

Name: 
lec7
Author: 
Hao
Company: 
N/A
Description: 
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007
Tags: 
quantiz | code | valu | transform | bit | distort | imag | predict
Created: 
9/1/2007 2:55:33 PM
Slides: 
26
Views: 
4
Downloads: 
0
Rating: 
0


Comment



Share this presentation
|

Comments

Share this presentation:

|
Sitemap