Compression - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Compression

Description:

video (European PAL standard): video has 625 lines and 25 frames per second ... Maps values from spatial domain to frequency domain -- image areas with low ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 21
Provided by: CathieL
Category:

less

Transcript and Presenter's Notes

Title: Compression


1
Compression
2
What is Compression?
  • Process of reducing the amount of data required
    to represent a given quantity of information
  • Same amount of information represented using
    fewer bits -- relies on the notion of data
    redundancy
  • Sometimes called packing, coding or zipping

3
Why Compress?
  • Uncompressed data requires considerable storage
    capacity
  • Critical for delivery of motion video and audio
  • Without compression, not enough bandwidth to
    deliver a new screen image every 1/30 of a second
  • We also compress static images

4
Compression Applications
  • Storage -- data is compressed before being
    stored, decompressed before being retrieved.
  • Communications -- sender compresses data before
    sending it over line, receiver decompresses it
    after receiving it.

5
Static Screen Storage Requirements
  • In a typical 640x480 pixel window
  • Text 2 bytes of storage for each character, 8x8
    pixels for each character in display -- 9600
    bytes76,800 bits
  • Color display (very simple mode) single pixel of
    a bitmap can take on any of 256 colors. Thus, 1
    byte per pixel -- 307,200 bytes2,457,600 bits

6
Continuous Media Storage and Bandwidth
Requirements
  • For one second of playback
  • uncompressed audio signal of telephone quality
  • sampled at 8kHz (8k cycles per second)
  • quantized with 8bits/sample
  • Bandwidth requirement is 64kbits/second
  • Storage is 64kbits for 1 second of playback.

7
Continuous Media Storage and Bandwidth
Requirements (continued)
  • For one second of playback
  • uncompressed stereo audio signal of CD quality
  • sampled at 44.1kHz (44.1k cycles per second)
  • quantized with 16bits/sample
  • Bandwidth requirement is 705.6x103 bits/second
  • Storage is 705.6x103 bits for 1 second of
    playback.

8
Continuous Media Storage and Bandwidth
Requirements (continued)
  • For one second of playback
  • video (European PAL standard)
  • video has 625 lines and 25 frames per second
  • luminance sampled at 13.5MHz
  • chrominance sampled at 6.75MHz (2 components)
  • uniform 8 bit coding of each sample
  • Bandwidth requirement is 216x106 bits/second
  • Storage for 640x480pixels with 3 bytes/pixel (1
    luminance, 2 chrominance) 921,600 bytes/frame
    or 230.4x105 bytes for 1 second 184.32x106 bits
    for 1 second of playback

9
Compression Concepts
  • Compression ratio size of original file divided
    by size of compressed file
  • Data quality Lossy compression ignores
    information that the viewer may not miss and
    therefore information may be lost. Lossless
    compression preserves original data precisely.
    Note This has nothing to do with information
    that may be lost in analog-to-digital conversion.
  • Compression speed time it takes to
    compress/decompress.

10
Types of Compression
  • Entropy encoding -- lossless. Data considered a
    simple digital sequence and semantics of data are
    ignored.
  • Source encoding -- lossy. Takes semantics of
    data into account. Amount of compression depends
    on data contents.
  • Hybrid encoding -- combination of entropy and
    source. Most multimedia systems use these.

11
Types of Compression
  • Entropy encoding -- lossless.
  • Data in data stream considered a simple digital
    sequence and semantics of data are ignored.
  • Short Code words for frequently occurring
    symbols. Longer Code words for more infrequently
    occurring symbols
  • For example E occurs frequently in English, so
    we should give it a shorter code than Q
  • Examples of Entropy Encoding
  • Run-length coding
  • Huffman coding
  • Arithmetic coding

12
Entropy Encoding
  • Run-Length Coding
  • Runs (sequences) of data are stored as a single
    value and count, rather than the individual run.
  • Example
  • This
  • WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWW
    WWBWWWWWWWWWWWWWW
  • Becomes
  • 12WB12W3B24WB14W
  • Get more info on Wikipedia

13
Entropy Encoding
  • Huffman Coding
  • Use of a variable length code table for encoding
    a source symbol where the variable-length code
    table has been derived in a particular way based
    on the estimated probability of occurrence for
    each possible value of the source symbol.
  • Commonly Used as a final stage of compression
  • Get more info on Wikipedia

14
Entropy Encoding
  • Arithmetic Coding
  • Encodes the entire message into a single number,
    a fraction n where (0.0 n lt 1.0)
  • Get more info on Wikipedia

15
Types of Compression
  • Source Encoding lossy
  • Takes semantics of data into account. Amount of
    compression depends on data contents.
  • This method is one where compressing data and
    then decompressing it retrieves data that may
    well be different from the original, but is
    "close enough" to be useful in some way.
  • Used frequently on the Internet and especially in
    streaming media and telephony applications.
  • Examples Discreet-Cosine Transform, Subsampling,
    Differential Pulse Code Modulation (DPCM)

16
Source Encoding
  • Discreet Cosine Transform (DCT)
  • A Fourier-related transform similar to the
    discrete Fourier transform (DFT), but using only
    real numbers.
  • Often used in signal and image processing.
  • Maps values from spatial domain to frequency
    domain -- image areas with low frequency (large
    blocks of single color) are compressed more
    efficiently
  • Used in JPEG, MJPEG, MPEG, and DV Compression
  • Get more info on Wikipedia

17
Source Encoding
  • Wavelet-Based Coding
  • Produces as many coefficients as there are pixels
    in the image (i.e. there is no compression yet
    since it is only a transform). These coefficients
    can then be compressed more easily because the
    information is statistically concentrated in just
    a few coefficients. This principle is called
    transform coding. After that, the coefficients
    are quantized and the quantized values are
    entropy encoded and/or run length encoded.
  • Well suited for image compression
  • Get more info on Wikipedia

18
Source Encoding
  • Differential Pulse Code Modulation
  • Store all bits of first sample and then store
    only how next sample differs
  • Used in digital telephone systems and is also the
    standard form for digital audio in computers and
    various compact disc formats.
  • Get more info on Wikipedia

19
Hybrid Encoding
  • JPEG
  • image compression using a discrete cosine
    transform, then quantization, then Huffman coding
  • MP3
  • A part of the MPEG-1 standard for sound and music
    compression, using subbanding and MDCT,
    perceptual modeling, quantization, and Huffman
    coding
  • JPEG 2000
  • image compression using wavelets, then
    quantization, then entropy coding

20
More on Compression
  • How Compression Works
Write a Comment
User Comments (0)
About PowerShow.com