10.07.2015 Views

Introduction to Multimedia Compression

Introduction to Multimedia Compression

Introduction to Multimedia Compression

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Introduction</strong> <strong>to</strong> <strong>Multimedia</strong><strong>Compression</strong>National Chiao Tung UniversityChun-Jen Tsai2/21/2012


Data is Everything, and Nothing Everyday, we are bombarded by all kinds ofinformation (data)textbooks, news papers, movies, songs, conversations,lectures, preaching, … What are the purposes of all the information?To cause chemical reactionsin your brainsTo “duplicate” chemical reactionsfrom one brain <strong>to</strong> the otherTo …2/22


Three Aspects of Data To distribute information (data) around <strong>to</strong> serve yourpurposes, there are three aspects one should worryabout:QuantityReliabilitySecurity Example: “knowledge of multimedia compression”3/22


The Paper That Starts It All … In 1948, Claude E. Shannon published therevolutionary paper, “A Mathematical Theory ofCommunication.”Later, in 1949, a book was published based on this paper,but the first word of the title was changed from “A” <strong>to</strong> “The” The paper provides many insights in<strong>to</strong> the essence ofthe communication problemIn particular, Shannon perceived that all communication isessentially digital !4/22


Data Distribution Systems Shannon was the first person <strong>to</strong> partition acommunication system as follows:InformationSourcesSourceEncoderChannelEncoderChannelDecoderSourceDecoderReceivedInformationGet most compactRepresentation ofinformationChannelGet most robustRepresentation ofinformation→ The information content of a source and the information capacity of a channelcan be identified using the concept of entropy5/22


The Origin of Information Theory The term “entropy” was first used in thermodynamicsand in statistical mechanicsSome people think that information theory grew out ofstatistical mechanics because L. Szilard applied an idea ofinformation <strong>to</strong> solve a physical problem in 1929 However, Shannon’s work evolved from the field ofelectrical communication“entropy” was used in information theory merely due <strong>to</strong> itsmathematical analogy with the entropy of statisticalmechanics6/22


Entropy in Thermodynamics In thermodynamics, entropy is a measure of thermalenergy of a body of gasLow entropyHigh entropy Statistical mechanics says that an increase in entropymeans a decrease in predictability7/22


Linking Back <strong>to</strong> Information Theory The complexity of a system depends on ourknowledge of the system; the more we know aboutthe system, the less words we need <strong>to</strong> “describe” thesystem In information theory, the amount of informationconveyed by a message increases as the amount ofuncertainty as <strong>to</strong> what message actually will beproduced becomes greater8/22


Some “Information” Check the “entropy” of the following messagesMy dog cannot flyMy dog runs faster than a chickenMy dog is a lady dogMy dog runs slower than a chickenMy dog can sing It seems that, a rare message carries moreinformation than a common message9/22


Frequency-based Coding Morse codeInvented in 1838 by Morse forelectrical telegraph, andexpanded by Vail in 1844To shorten the transmissionof messages, English text wascoded based on relativefrequencies of occurrenceThe efficiency of Morse codecan only be improved by 15%using modern theory †Questions: efficient for all languages?fig. ref.: wikipedia† J. R. Pierce, An <strong>Introduction</strong> <strong>to</strong> Information Theory, 2nd. Ed., Dover Publications, 1980.10/22


Context-based Coding Braille code, by Louis Braille in 1825 Grade 1 BrailleLetters and numbersA or 1 B or 2 C or 3 D or 4 E or 5 F or 6 G or 7 H or 8 I or 9 J or 0Symbols! “ or ? ” ( or ) – Grade 2 BrailleAND CH SH ST TH11/22


Model-based Coding Statistical structure is not the only way ofcompression. Describing “things” using “models” isusually less wordy For example, what is the minimal precise descriptionof π ?Shannon’s idea – the unpredictability of patterns of digits in πKolmogorov’s idea – the size of a program that computes π12/22


How Large Is the Amount of Data? 1 second of CD audio:44100 samples × 2 channels × 16 bits/sample= 1,411,200 bits 1 second of 1080p HD video:1920 × 1080 pixels × 3 color channels × 8 bits/color sample× 30 frames= 1,492,992,000 bitsSometimes, large data amount is a technique against piracy13/22


The Future Is Here Super Hi-Vision † (8K system)7680 × 4320 = 33 Mega pixels per framePhysical data rate (video-only): 180-600 Mbps† http://www.nhk.or.jp/digital/en/super_hi/14/22


Data <strong>Compression</strong> Concept X – original data, X c – compressed representation,y – reconstruction Lossless compression: when y is equal <strong>to</strong> x Lossy compression: when y is different from x <strong>Compression</strong> ratio: |X| : |X c | or (|X| – |X c |/ |X|) *100%x x c ycompressiondecompressionFor example, |X| = 65536 bytes, |X c | = 16384 bytes, thecompression ration is 4:1 or 75%. Data rate: for time-varying data, the number of bitsper second (or sample) required <strong>to</strong> represent the data15/22


Lossless and Lossy <strong>Compression</strong>s Text compression techniques are often losslessAny counter examples? Image, audio, video compression techniques areoften lossyAny counter examples? Dis<strong>to</strong>rtion: the difference between the original and thereconstructionIf the dis<strong>to</strong>rtion is small, we say the “quality” or “fidelity” ishigh. Or, we say the reconstruction is a “high-definition” copyof the original16/22


Modeling and Coding One of the most powerful <strong>to</strong>ols in data compressionis called “data modeling”Model – a systematic way <strong>to</strong> describe data A common data compression scheme is <strong>to</strong> “encode”a description of the model, and a description of howthe data differ from the model (aka, residual)By encode, we mean <strong>to</strong> put the data in binary digitsDataSourceModelAre they similar?17/22


Example 1: Linear Model Data sequence x i ,91111111413151716172021. . . Model: x′ n = n + 8, n = 1, 2, … Residual:e n = x n – x ′ n= 0, 1, 0, –1, 1, –1, 0, …18/22


Example 2: Differential Model Data sequence x i ,272829262729283032343638. . . Model: x′ 1 = 0, x′ n = x n–1 , n = 2, … Residual:e n = x n – x ′ n= 27, 1, 1, –1, –2, 1, 2, …19/22


What About Speech Models? Typical speech signals:frequencytimespectrogramwaveform20/22


What About Image Models? Typical image signals:21/22


Example 3: Variable Length Coding Given a sequence of symbols:If fixed length coding (FLC) is used: 3 bits per symbolIf variable length coding (VLC) is used: 2.58 bits per symbol→ 1.16 : 1 compression ratio22/22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!