Multimedia Systems - PowerPoint PPT Presentation

Loading...

PPT – Multimedia Systems PowerPoint presentation | free to download - id: 56b334-ODIyY



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Multimedia Systems

Description:

Multimedia Systems Lecture - 9 Lecture Outline Compression Fundamentals Why is compression required Data Compression Compression Problems Information Theory Basics CODEC? – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 44
Provided by: webUettax
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Multimedia Systems


1
Multimedia Systems
  • Lecture - 9

2
Lecture Outline
  • Compression Fundamentals
  • Why is compression required
  • Data Compression
  • Compression Problems
  • Information Theory Basics
  • CODEC?
  • Compression Model
  • Compression Techniques
  • Compression Algorithms types
  • Compression Performance

3
Background Why Compression?
  • Let us consider the general requirements imposed
    on most multimedia systems
  • Storage
  • multimedia elements require significant storage
    space, e.g., A full screen true colour image is
  • 640 x 480 x 3 921600 bytes
  • The storage of one second of uncompressed CD
    quality stereo audio is
  • 44.1 kHz x (16/8) x 2 x 1 176400 bytes
  • The raw video size of PAL (_at_ 25 frames/sec)
    sampled at 352 x 288 with 16 bits per pixel, is
  • 352 x 288 x 16 x 25 40.55 Mbit/s 5 Mbyte/s

4
Background Why Compression?
  • Throughput
  • Continuous media require very large throughput.
    For example, an uncompressed CD quality stereo
    audio stream needs 176400 bytes/sec.
  • Interaction
  • to support fast interaction, the end-to-end delay
    should be small. A face-to-face application,
    such as video conferencing, requires the delay to
    be less than 50ms. Furthermore, multimedia
    elements have to be accessed randomly.
  • It is challenging to transfer such files through
    the available limited bandwidth network.
  • Hence concluded that multimedia content/data is
    usually large and need to be reduced using
    compression.

5
Data Compression
  • Compression aims for efficient digital
    representation of a source.
  • Data Compression is the representation of the
    source in digital form with as few bits as
    possible while maintain-ing an acceptable loss in
    fidelity.
  • In simple words, compression is used to reduce
    the amount of data with as little compromise to
    source/data quality as possible for the given
    application.
  • Source can be any data including still images,
    speech, audio, video or whatever signal needs to
    be stored transmitted.

6
Data Compression
  • A compressed video (or other multimedia content)
    requires lower bandwidth than uncompressed video.
    In other words, the compressed video requires
    lower data rates (bit rates) for transmission,
    and takes up less storage space.
  • An image is compressed for recording/storage, and
    decompressed for display. This process is also
    referred to as encoding and decoding.

7
Synonyms for Data Compression
  • Signal compression signal coding
  • Source coding source coding with fidelity
    criterion (in information theory)
  • Noiseless Noisy Source coding (lossless lossy
    compression)
  • Bandwidth compression

8
Types of Data Compression Problem
  • Distortion-rate Problem
  • Given the constraint on transmitted data rate or
    storage capacity, problem is to compress the
    source at or below this rate but at the highest
    fidelity possible
  • e.g. Voice mail, video conferencing, digital
    cellular
  • Rate-distortion Problem
  • Given the constraint on the fidelity, problem is
    to achieve it with as few bits as possible
  • e.g. CD-Quality audio

9
Information Theory Basics
  • The theoretical background of compression is
    provided by Information theory and rate
    distortion theory
  • Representation of data is the combination of
    information and redundancy.
  • Data compression is essentially a redundancy
    reduction technique.
  • Data compression scheme can be broadly divided
    into two phases
  • Modeling
  • Coding

10
Information Theory Basics
  • In modeling phase information about redundancy is
    analyzed represented as a model
  • This can be done via observing the empirical
    distribution of the symbols the source generates
  • In the coding phase the difference between the
    actual data and the model is coded

11
Discrete Memoryless Model
  • Source is discrete memoryless if it generates
    symbols statistically independent of one another
  • Described by
  • the source alphabet Aa1,a2,a3an and
  • associated probabilities P(p(a1), p(a2),
    p(a3),. p(an))
  • The amount of information content for a source
    symbol I(ai) is
  • The base 2 logarithm indicates the information
    content is represented in bits. Higher
    probability symbols are coded with less bits.

12
Discrete Memoryless Model
  • Averaging the information content over all
    symbols, we get the entropy E as follows
  • Hence, entropy is the expected length of a binary
    code over all the symbols.
  • Estimation of entropy depends on the observation
    assumption on the structure of source symbols

13
Noiseless source coding theorem
  • The Noiseless Source Coding Theorem states that
  • any source can be losslessly encoded with a code
    whose average number of bits per source symbol is
    arbitrarily close to, but not less than, the
    source entropy E in bits by coding infinitely
    long extensions of the source.

14
Entropy Reduction
  • Consider a discrete memoryless source, with
  • source alphabet A1 a, ß, ?, d
  • probability p(a) 0.65, p(ß) 0.20, p(?)
    0.10, p(d) 0.05
  • The entropy of this source is
  • E -(0.65 log2 0.65 0.20 log2 0.20 0.10
    log2 0.10 0.05 log2 0.05)
  • 1.42 bits per symbol
  • A data source of 2000 symbols can be represented
    using 2000 x 1.42 2840 bits

15
Entropy Reduction
  • Now assume we know something about the structure
    of the sequence
  • Alphabet A2 0, 1, 2, 3
  • Sequence D 0 1 1 2 3 3 3 3 3 3 3 3 3 2 2 2 3 3
    3 3
  • p(0) 0.05, p(1) 0.10, p(2) 0.20, and p(3)
    0.65
  • E 1.42 bits per symbol
  • Assume the correlation between consecutive bits
    and we attempt to reduce it by ri si - si-1 for
    each sample si

16
Entropy Reduction
  • Now
  • D 0 1 0 1 1 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0
  • A2 -1, 1, 0
  • P(-1) 0.05, p(1) 0.2, and p(0) 0.75
  • E 0.992
  • If appropriate entropy coding technique used
    maximum compression can be achieved

17
Unique Decipherability
  • Consider the following table
  • Symbols are encoded with codes A, B and C.
  • Consider the string S aa?aßad

18
Unique Decipherability
  • Deciphering CA(S) and CB(S) are unambiguous and
    we get the string S
  • CC(S) is ambiguous and not uniquely decipherable
  • Fixed length codes are always uniquely
    decipherable.
  • Not all variable length codes are uniquely
    decipherable.

19
Unique Decipherability
  • Uniquely decipherable codes maintain prefix
    property, i.e. no codeword in the code-set forms
    the prefix of another distinct codeword
  • Popular variable-length coding techniques
  • Shannon-Fano Coding
  • Huffman Coding
  • Elias Coding
  • Arithmetic Coding
  • Fixed-length codes can be treated as a special
    case of uniquely decipherable variable-length
    code.

20
Compression and Decompression
CODEC
21
Compression and Decompression
  • Data compression is a method that takes an input
    data D and generates a shorter representation of
    the data c(D) with a fewer number of bits
    compared to that of D
  • The reverse process is called decompression,
    which takes the compressed data c(D) and
    generates or reconstructs the data D'
  • Sometimes the compression (coding) and
    decompression (decoding) systems together are
    called a "CODEC"

22
Classification of compression algorithms
  • If the reconstructed data D' is an exact replica
    of the original data D, we call the algorithm
    applied to compress D and decompress c(D) to be
    lossless. Otherwise the algorithms are lossy
  • Text, scientific data, medical images are some of
    the applications which requires lossless
    compression
  • Compression can be static or dynamic, depends on
    the coding scheme used

23
Data compression model
  • A data compression system mainly consists of
    three major steps
  • removal or reduction in data redundancy
  • reduction in entropy
  • entropy encoding

24
Data compression modelREDUCTION IN DATA
REDUNDANCY
  • Removal or reduction in data redundancy is
    typically achieved by transforming the original
    data from one form or representation to another
  • Popular transformation techniques are
  • Discrete Cosine Transform (DCT)
  • Discrete Wavelet Transformation (DWT) etc
  • This step leads to the reduction of entropy
  • For Lossless compression this transformation is
    completely reversible

25
Data compression model REDUCTION IN ENTROPY
  • Non reversible process
  • Achieved by dropping insignificant information in
    the transformed data (Lossy!!!)
  • Done by some quantization techniques
  • Amount of quantization dictate the quality of the
    reconstructed data
  • Entropy of the quantized data is less compared to
    the original one, hence more compression.

26
Compression Techniques
  • Entropy coding is lossless
  • Source coding and Hybrid coding are lossy

27
Compression Performance
  • The performance measures of data compression
    algorithms can be looked at from different
    perspectives depending on the application
    requirements
  • amount of compression achieved
  • objective and subjective quality of the
    reconstructed data
  • relative complexity of the algorithm
  • speed of execution, etc.

28
Compression Performance AMOUNT OF COMPRESSION
ACHIEVED
  • Compression ratio
  • the ratio of the number of bits to represent the
    original data to the number of bits to represent
    the compressed data
  • Achievable compression ratio using a lossless
    compression scheme is totally input data
    dependent.
  • Sources with less redundancy have more entropy
    and hence are more difficult to achieve
    compression

29
Compression Performance SUBJECTIVE QUALITY METRIC
  • MOS mean observers score or mean opinion score
    is a common measure
  • A statistically significant number of observers
    are randomly chosen to evaluate visual quality of
    the reconstructed images.
  • Each observer assigns a numeric score to each
    reconstructed image based on his or her
    perception of quality of the image, say within a
    range 15 to describe the quality of the image5
    being the highest quality and 1 being the worst
    quality.
  • MOS is the average of these scores

30
Compression Performance OBJECTIVE QUALITY METRIC
  • Common quality metrics are
  • root-mean-squared error (RMSE)
  • signal-to-noise ratio (SNR)
  • peak signal-to-noise ratio (PSNR).
  • If I is an M N image and I is the corresponding
    reconstructed image after compression and
    decompression, RMSE is calculated by
  • The SNR in decibel unit (dB) is expressed as

31
Compression Performance CODING DELAY AND
COMPLEXITY
  • Coding delay
  • a performance measure for compression algorithms
    where interactive encoding and decoding is the
    requirement (e.g., interactive video
    teleconferencing, on-line image browsing,
    real-time voice communication, etc.)
  • The complex the compression algorithm ? Increased
    coding delay
  • Compression system designer often use a less
    sophisticated algorithm for the compression
    system.

32
Compression Performance CODING DELAY AND
COMPLEXITY
  • Coding complexity
  • a performance measure considered where the
    computational requirement to implement the codec
    is an important criteria
  • MOPS (millions of operations per second), MIPS
    (millions of instructions per second) are often
    used to measure the compression performance in a
    specific computing engine's architecture.

33
JPEG Compression
  • JPEG (stands for Joint Photographic Experts
    Group) is a joint ISO and CCITT working group for
    developing standards
  • for compressing still images
  • The JPEG image compression standard became an
    international standard in 1992
  • JPEG can be applied to colour or grayscale images
  • By changing appropriate parameters, the user can
    select
  • the quality of the reproduced image
  • compression processing time
  • the size of the compressed image

34
JPEG Compression
  • The JPEG standard have three levels of definition
    as follows
  • Baseline system
  • must reasonably decompress colour images,
    maintain a high compression ratio, and handle
    from 4bits/pixel to 16bits/pixel.
  • Extended system
  • covers the various encoding aspects such as
    variable length encoding, progressive encoding,
    and hierarchical mode of encoding.
  • Special lossless function
  • ensures that at the resolution at which the image
    is compressed, decompression results in no loss
    of any detail the was in the original image.

35
JPEG Compression Process
36
JPEG - Preparation
  • A source image consists of at least one and at
    most 255 planes.
  • Each plane Ci may have different number of pixels
    in the horizontal (Xi) and vertical (Yi)
    dimension.
  • The resolution of the individual plane may be
    different.
  • Each pixel is represented by a number of bits p
    where 2 p 12.
  • The meaning of the value in these planes is not
    specified in the standard.
  • The image is divided into 8 x 8 blocks.

37
JPEG Discrete Cosine Transform
  • DCT transforms the data from a spatial domain to
    a frequency domain.
  • It removes redundancy in the data.
  • It is proven to be the optimal transform for
    large classes of images.
  • The DCT algorithm is symmetrical, and an inverse
    DCT algorithm can be used to decompress an image.
  • The DCT coefficients of each 8x8 blocks are
    calculated using the formula below.

38
JPEG Discrete Cosine Transform
  • Here is an example. On the left is the 8 x 8
    block of pixels, and on the right is the DCT
    coefficients.

39
JPEG - Quantization
  • The DCT output matrix is quantized to reduce the
    precision of the coefficients.
  • This increases the compression DCT(0, 0) is
    known as the DC coefficient which represents the
    basic colour, i.e., wave-length, of the image
    block
  • The other DCT coefficients are known as AC
    coefficients which represent the frequency
    components of the data block.
  • AC coefficients further away from the DC
    coefficient can be dropped to reduce the data
    size
  • JPEG baseline algorithm defines a set of
    quantization tables
  • Each element q in the table, known as quantum is
    used in the following formula to calculate the
    quantized coefficients Q

40
JPEG - Quantization
On the left is quantum matrix for quality level
1, and on the right the result of quantizing the
example from slide.
41
JPEG Entropy Encoding
  • The DC-coefficients are treated separately from
    the AC-coefficients.
  • A DC-coefficient is encoded as the difference
    between the current coefficient and the previous
    one.
  • The AC-coefficients are encoded using Huffman
    and/or arithmetic encoding.
  • They are put in a zig-zag order as shown in the
    diagram below

42
Additional View of Zig-Zig Sequencing
43
References and further reading
  • Chapter 1 of Digital Compression for Multimedia
    Principles Standards by Jerry D.Gibson
  • Chapter 1 of JPEG200 Standard for Image
    Compression Concepts, Algorithms and VLSI
    Architecture by Tinku Acharya Ping-Sing Tsai
  • http//www.moviola.com/compression_fundamentals
  • http//www.data-compression.com/theory.html
About PowerShow.com