rm compression er

Upload: josimar-martinez

Post on 14-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 RM Compression ER

    1/15

    Redes Para Multimedios

    Prof. Ernesto Garca

    Tcnicas de Compresin

    para Multimedia

    21 de Agosto de 2013

  • 7/29/2019 RM Compression ER

    2/15

    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.6kbits/sec

  • 7/29/2019 RM Compression ER

    3/15

    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

  • 7/29/2019 RM Compression ER

    4/15

    8/26/2013

    4

    Compression Requirements Storage Requirements

    Uncompressed audio: 8kHz, 8-bit quantization implies64Kbits to store per second

    CD quality audio: 44.1 kHz, 16-bit quantization implies tostore 705.6 Kbits per second

    PAL video format: 640x480 pixels, 24-bit quantization, 25fps implies to store 184 Mbps

    NTSC at 30 frames/second with 8-bit samples, implies tostore 216 Mbps

    Compression is required !

  • 7/29/2019 RM Compression ER

    5/15

    Requirement on Network Bandwidth / Bit-rate

    5

  • 7/29/2019 RM Compression ER

    6/15

    General Data Compression SchemeEncoder

    (compression)

    Storage orNetworks

    Decoder(decompression)

    Input Data

    Output Data

    Codes /Codewords

    Codes /Codewords

    B0 = # bits required beforecompression

    B1 = # bits required aftercompression

    Compression Ratio = B 0 / B 1.

  • 7/29/2019 RM Compression ER

    7/15

    Compression Techniques

  • 7/29/2019 RM Compression ER

    8/15

    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 beencoded.

    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, MPEG-

    4, MPEG-7, MPEG-21

  • 7/29/2019 RM Compression ER

    9/15

    Entropy Encoding Techniques Run-length encoding

    Represent stream as (c 1, l1), (c 2, 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

  • 7/29/2019 RM Compression ER

    10/15

    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 domaininto frequency domain (DCT)

  • 7/29/2019 RM Compression ER

    11/15

    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)

  • 7/29/2019 RM Compression ER

    12/15

    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

  • 7/29/2019 RM Compression ER

    13/15

    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).

    Video Compression

  • 7/29/2019 RM Compression ER

    14/15

    Image compression applied to each frame.

    Can therefore be lossless or lossy, but losslessrarely produces sufficiently high compression

    ratios for volume of data.

    Spatial Compression

  • 7/29/2019 RM Compression ER

    15/15

    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 mostrecent key frame.Difference frames can be efficiently spatially compressed.

    Temporal Compression