MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for...

16
MULTIMEDIA MULTIMEDIA TECHNOLOGY TECHNOLOGY SMM 3001 SMM 3001 DATA COMPRESSION DATA COMPRESSION

Transcript of MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for...

Page 1: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

MULTIMEDIA MULTIMEDIA TECHNOLOGYTECHNOLOGY

SMM 3001SMM 3001

DATA COMPRESSIONDATA COMPRESSION

Page 2: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

In this chapterIn this chapter

The basic principles for The basic principles for compressing datacompressing data

Data compression methods for Data compression methods for text & numeric datatext & numeric data

How digital images & graphics How digital images & graphics are compressed for storage & are compressed for storage & transmissiontransmission

Compression methods for digital Compression methods for digital video & audiovideo & audio

Page 3: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Data compression conceptsData compression concepts

Compression techniques are used to Compression techniques are used to replace a file with another that is replace a file with another that is smallersmaller

Decompression techniques expands Decompression techniques expands the compressed file to recover the the compressed file to recover the original data -- either exactly or in original data -- either exactly or in facsimilefacsimile

A pair of A pair of compression/decompression compression/decompression techniques that work together is techniques that work together is called a called a codeccodec for short for short

Page 4: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Data compression conceptsData compression concepts

Page 5: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Types of codecsTypes of codecs

Codecs that upon decompression always Codecs that upon decompression always reproduce the original file exactly are called reproduce the original file exactly are called lossless codecslossless codecs

Codecs that reproduce only an Codecs that reproduce only an approximation of the original file upon approximation of the original file upon decompression are called decompression are called lossy codecslossy codecs

Codecs that take approximately the same Codecs that take approximately the same amount of time to compress and amount of time to compress and decompress a file are referred to as decompress a file are referred to as symmetric codecssymmetric codecs

By contrast, codecs that feature simple fast By contrast, codecs that feature simple fast decompression but significantly slower decompression but significantly slower compression are called compression are called asymmetric asymmetric codecscodecs

Page 6: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compression encodingCompression encoding

Compression Compression is an encoding is an encoding process that process that filters the filters the original file in original file in several several successive successive stagesstages

Page 7: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Codec MethodsCodec Methods

Syntactic encodingSyntactic encoding (also called (also called entropy encodingentropy encoding) methods ) methods attempt to reduce the redundancy of attempt to reduce the redundancy of symbolic patterns in a file without symbolic patterns in a file without any regard to the type of information any regard to the type of information representedrepresented

Semantic methodsSemantic methods consider special consider special properties of the type of information properties of the type of information represented to reduce nonessential represented to reduce nonessential information in a fileinformation in a file

Hybrid methodsHybrid methods combine both combine both syntactic and semantic methodssyntactic and semantic methods

Page 8: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compressing Text and Numerical Compressing Text and Numerical DataDataLossless Syntactic MethodsLossless Syntactic Methods Run-Length Encoding (RLE)Run-Length Encoding (RLE)

looks for repeated sequences of symbolslooks for repeated sequences of symbols widely used for fax (facsimile) transmissionswidely used for fax (facsimile) transmissions

Huffman CodesHuffman Codes exploits frequency distribution of symbols in a exploits frequency distribution of symbols in a

sourcesource adaptiveadaptive Huffman coding builds its own Huffman coding builds its own

frequency tables rather than use predefined frequency tables rather than use predefined statisticsstatistics

Lempel-Ziv-Welch (LZW) compressionLempel-Ziv-Welch (LZW) compression based on recognizing patterns of strings in based on recognizing patterns of strings in

original fileoriginal file fast and yields good results (50% typical fast and yields good results (50% typical

reduction)reduction)

Page 9: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compressing ImagesCompressing Images

GIF (Graphic Interchange Format) CodecGIF (Graphic Interchange Format) Codec employs LZW method for lossless compressionemploys LZW method for lossless compression

TIFF (Tagged Image File Format) TIFF (Tagged Image File Format) CodecCodec lossless syntactic methodlossless syntactic method

JPEG (Joint Photographics Experts Group) JPEG (Joint Photographics Experts Group) CodecCodec umbrella term covering several lossy and umbrella term covering several lossy and

lossless methodslossless methods baseline method is most commonly used one -- baseline method is most commonly used one --

lossy method based on a hybrid methodlossy method based on a hybrid method

Page 10: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compressing VideoCompressing Video

Video compression employs both Video compression employs both spatial and temporal compressionspatial and temporal compression spatial techniques compress individual spatial techniques compress individual

framesframes temporal methods compress data in temporal methods compress data in

frames over timeframes over time QuickTime and AVI (Audio Video QuickTime and AVI (Audio Video

Interleaved) are two popular (and Interleaved) are two popular (and incompatible with each other) incompatible with each other) formatsformats

Page 11: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compressing VideoCompressing VideoSome additional methodsSome additional methods

DVI (Digital Video Interactive)DVI (Digital Video Interactive)

Motion-JPEGMotion-JPEG

MPEG (Motion Pictures Experts MPEG (Motion Pictures Experts

Group)Group)

The px64 StandardThe px64 Standard

Page 12: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Temporal Compression in Temporal Compression in VideoVideo Lossy strategies for Lossy strategies for

eliminating eliminating redundancy of redundancy of information between information between frames employ frames employ temporal compression temporal compression -- referred to as -- referred to as interframe interframe compressioncompression

Sequence of frames Sequence of frames are considered are considered togethertogether key frameskey frames difference framesdifference frames

Used in QuickTime Used in QuickTime and DVIand DVI

Page 13: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Temporal Compression in VideoTemporal Compression in Video(cont’d)(cont’d)

MPEG and related codecs employ a MPEG and related codecs employ a more complex frame-referencing more complex frame-referencing methodmethod intrapictures (I pictures)intrapictures (I pictures) predicted pictures (P pictures)predicted pictures (P pictures) bidirectional pictures (B pictures)bidirectional pictures (B pictures)

Page 14: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Compressing AudioCompressing Audio

Widely used method is ADPCM Widely used method is ADPCM (Adaptive Differential Pulse (Adaptive Differential Pulse Code Modulation)Code Modulation)

ADPCMADPCM lossy methodlossy method employs a differencing technique employs a differencing technique

related to those used in video related to those used in video compressioncompression

used in DVIused in DVI

Page 15: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

SummarySummary

Compressing data means reducing the Compressing data means reducing the effective size of a data file for storage or effective size of a data file for storage or transmissiontransmission

Particular paired Particular paired compression/decompression methods are compression/decompression methods are called codecscalled codecs

Codecs that cannot reproduce the original Codecs that cannot reproduce the original file exactly are called lossy methods; those file exactly are called lossy methods; those that reproduce the original exactly are that reproduce the original exactly are called lossless methodscalled lossless methods

Text and numbers usually require lossless Text and numbers usually require lossless methodsmethods

Images, video, and sound codecs are Images, video, and sound codecs are usually lossyusually lossy

Page 16: MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.

Summary Summary (cont’d)(cont’d)

Syntactic methods attempt to reduce the Syntactic methods attempt to reduce the redundancy of symbolic patterns in a file redundancy of symbolic patterns in a file without any regard to the type of without any regard to the type of information representedinformation represented

Semantic methods exploit characteristics Semantic methods exploit characteristics inherent in the type of information being inherent in the type of information being representedrepresented

The use of codecs is not an exact science The use of codecs is not an exact science -- the effectiveness and suitability of any -- the effectiveness and suitability of any method will depend on the exact nature of method will depend on the exact nature of the original file and the intended use for the the original file and the intended use for the compressed filecompressed file