Coding and Compression - University of Missouri

Download Report

Transcript Coding and Compression - University of Missouri

CODING AND COMPRESSION
PRESENTED BY: PING CHEN
CECS401 UMC
DATE: April, 29 2000
1
Coding and Compression
Introduction
Lossless Data Compression
Runlength, Huffman, Dictionary compression
Audio
ADPCM, LPC, CELP
Image
hierarchical coding, subband coding
MPEG
2
Introduction
A key problem with multimedia is the huge
quantities of data that result from raw digitized
data of audio, image or video source.
The main goal for coding and compression is to
alleviate the storage, processing and
transmission costs for these data.
There are a variety of compression techniques
commonly used in the Internet and other
system.
3
Introduction
The components of a system are
capturing, transforming, coding and
transmitting.
Sample
Transform
Coding
4
Introduction
Sampling --- Analog to Digital Conversion.
An input signal is converted from some continuously
varying physical value(e.g. pressure in air, or
frequency or wavelength of light) into a continuously
electrical signal by some electro-mechanical device.
This continuously varying electrical signal can then
be converted to a sequence of digital values, called
samples, by some analog to digital conversion circuit.
Two factors determine the accuracy of the
sample with the original continuous signal:
5
Introduction
The maximum rate at which we sample.
Based on Nyquist’s theorem, the digital sampling rate must
be twice of the highest frequency in continuous signal.
The number of bits used in each sample. (known as
the quantization level.)
however, it is often not necessary to capture all
frequencies in the original signal.
For example, voice is comprehensible with a much smaller
range of frequencies that we can actually hear.
6
Introduction
The goal of transform is to decorrelate the
original signal, and this decorrelation results in
the signal energy being redistributed among
only a small set of transform coefficients.
The original data can be transformed in a
number of ways to make it easier to apply
certain compression techniques.
The most common transform in current
techniques are the Discrete Cosine Transform
and wavelet transform.
7
Lossless Data Compression
Lossless means the reconstructed image doesn’t
lose any information according to the original
one.
There is a huge range of lossless data
compression techniques.
The common techniques used are:
runlength encoding
Huffman coding
dictionary techniques
8
Lossless Data Compression
Runlength compression
Removing repetitions of values and replacing them
with a counter and single value.
Fairly simple to implement.
Its performance depends heavily on the input data
statistics. The more successive value it has, the more
space we can compress.
9
Lossless Data Compression
Huffman compression
Use more less bits to represent the most frequently
occurring characters/codeword values, and more bits
for the less commonly occurring once.
It is the most widespread way of replacing a set of
fixed size code words with an optimal set of different
sized code words, based on the statistics of the input
data.
Sender and receiver must share the same codebook
which lists the codes and their compressed
representation.
10
Lossless Data Compression
Dictionary compression
Look at the data as it arrives and form a dictionary.
when new input comes, it look up the dictionary. If the
new input existed, the dictionary position can be
transmitted; if not found, it is added to the dictionary
in a new position, and the new position and string is
sent out.
Meanwhile, the dictionary is constructed at the
receiver dynamically, so that there is no need to carry
out statistics or share a table separately.
11
Audio
The input audio signal from a microphone is
passed through several stages:
firstly, a band pass filter is applied eliminating
frequencies in the signal that we are not interested
in.
then the signal is sampled, converting the analog
signal into a sequence of values.
This is then quantised, or mapped into one of a set
of fixed value.
These values are then coded for storage or
transmission.
12
Audio
Some techniques for audio compression:
ADPCM
LPC
CELP
13
Audio
ADPCM -- Adaptive Differential Pulse Code
Modulation
ADPCM allows for the compression of PCM encoded
input whose power varies with time.
Feedback of a reconstructed version of the input
signal is subtracted from the actual input signal,
which is quantised to give a 4 bits output value.
This compression gives a 32 kbit/s output rate.
14
Audio
Transmitter
Original
Em

Xm
+
Em*
Qunatizer
Coder
Channel
+
Xm'
Xm*
Predictor

+
Receiver
Channel
Reconstructed
Em*

Decoder
+
Xm*
+
Xm'
Predictor
15
Audio
LPC -- Linear Predictive Coding
The encoder fits speech to a simple, analytic model
of the vocal tract. Only the parameters describing the
best-fit model is transmitted to the decoder.
An LPC decoder uses those parameters to generate
synthetic speech that is usually very similar to the
original.
LPC is used to compress audio at 16 Kbit/s and
below.
16
Audio -- CELP
CELP -- Code Excited Linear Predictor
CELP does the same LPC modeling but then
computers the errors between the original speech
and the synthetic model and transmits both model
parameters and a very compressed representation of
the errors.
The result of CELP is a much higher quality speech at
low data rate.
17
Image
Hierarchical Coding
based on the idea that coding will be in the form of
quality hierarchy where the lowest layer of hierarchy
contains the minimum information for intelligibility.
It is ideal for transmission over packet switched
network, low level packets can be filtered out
wherever a low bandwidth link is encountered and
still delivering a better quality to sites.
18
Image
Subband Coding
an example of an encoding algorithm that can map
onto hierarchical coding.
based on the fact that the low spatial frequencies
components of a picture do carry most of the
information within the picture.
The picture can thus be divided into its spatial
frequencies components.
Allocate each subband to one of the hierarchy layers.
19