版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
CS414–MultimediaSystemsDesign
Lecture7–BasicsofCompression(Part1)
CS414-Spring2014AdministrativeMP1ispostedSeeClasswebsiteandcompassMP1lecturewillbeonFebruary7inclass.Please,readtheMP1beforeattendingtheclassMP1dueFebruary19(Wednesday)5pm.QuestiononDLP3DGlassesDLP=DigitalLightProcessingDLP=projectiontechnologyDLP=ATexasInstrumentprocessofprojectingvideoimagesusingalightsourcereflectingoffanarrayoftensofthousandsofmicroscopicmirrors….CS414-Spring2014TodayIntroducedConceptsNeedforcompressionandcompressionalgorithmsclassificationBasicCodingConceptsFixed-lengthcodingandvariable-lengthcodingCompressionRatioEntropyRLECompression(EntropyCoding)HuffmanCompression(StatisticalEntropyCoding)CS414-Spring2014ReadingMediaCodingandContentProcessing,Steinmetz,Nahrstedt,PrenticeHall,2002DataCompression–chapter7Basiccodingconcepts–Sections7.1-7.4andlecturenotesCS414-Spring2014IntegratingAspectsofMultimediaCS414-Spring2014Image/VideoCaptureImage/VideoInformationRepresentationMediaServerStorageTransmissionCompressionProcessingAudio/VideoPresentationPlaybackAudio/VideoPerception/PlaybackAudioInformationRepresentationTransmissionAudioCaptureA/VPlaybackNeedforCompressionUncompressedaudio8KHz,8bit8Kpersecond30Mperhour44.1KHz,16bit88.2Kpersecond317.5Mperhour100Gbytediskholds315hoursofCDqualitymusicUncompressedvideo640x480resolution,8bitcolor,24fps7.37Mbytespersecond26.5Gbytesperhour640x480resolution,24bit(3bytes)color,30fps27.6Mbytespersecond99.5Gbytesperhour1980x1080resolution,24bits,60fps(384,912MBps)1,385Gbyteper1hourofHDTVCS414-Spring2014BroadClassificationEntropyCoding(statistical)lossless;independentofdatacharacteristicse.g.RLE,Huffman,LZW,ArithmeticcodingSourceCodinglossy;mayconsidersemanticsofthedatadependsoncharacteristicsofthedatae.g.DCT,DPCM,ADPCM,colormodeltransformHybridCoding(usedbymostmultimediasystems)combineentropywithsourceencodinge.g.,JPEG-2000,H.264,MPEG-2,MPEG-4,MPEG-7CS414-Spring2014DataCompressionBranchofinformationtheoryminimizeamountofinformationtobetransmittedTransformasequenceofcharactersintoanewstringofbitssameinformationcontentlengthasshortaspossibleCS414-Spring2014ConceptsCoding(thecode)mapssourcemessagesfromalphabet(A)intocodewords(B)Sourcemessage(symbol)isbasicunitintowhichastringispartitionedcanbeasingleletterorastringoflettersEXAMPLE:aabbbccccdddddeeeeeefffffffggggggggA={a,b,c,d,e,f,g,space}B={0,1}CS414-Spring2014TaxonomyofCodesBlock-blocksourcemsgsandcodewordsoffixedlength;e.g.,ASCIIBlock-variablesourcemessagefixed,codewordsvariable;e.g.,HuffmancodingVariable-blocksourcevariable,codewordfixed;e.g.,RLEVariable-variablesourcevariable,codewordsvariable;e.g.,ArithmeticCS414-Spring2014ExampleofBlock-BlockCoding“aabbbccccdddddeeeeeefffffffgggggggg”Requires120bitsSymbolCodeworda000b001c010d011e100f101g110space111ExampleofVariable-VariableCoding“aabbbccccdddddeeeeeefffffffgggggggg”Requires30bitsdon’tforgetthespacesSymbolCodewordaa0bbb1cccc10ddddd11eeeeee100fffffff101gggggggg110space111Concepts(cont.)Acodeisdistinctifeachcodewordcanbedistinguishedfromeveryother(mappingisone-to-one)uniquelydecodable
ifeverycodewordisidentifiablewhenimmersedinasequenceofcodewordse.g.,withprevioustable,message11couldbedefinedaseitherdddddorbbbbbbCS414-Spring2014StaticCodesMappingisfixedbeforetransmissionmessagerepresentedbysamecodewordeverytimeitappearsinmessage(ensemble)HuffmancodingisanexampleBetterforindependentsequencesprobabilitiesofsymboloccurrencesmustbeknowninadvance;CS414-Spring2014DynamicCodesMappingchangesovertimealsoreferredtoasadaptivecodingAttemptstoexploitlocalityofreferenceperiodic,frequentoccurrencesofmessagesdynamicHuffmanisanexampleHybrids?buildsetofcodes,selectbasedoninputCS414-Spring2014TraditionalEvaluationCriteriaAlgorithmcomplexityrunningtimeAmountofcompressionredundancycompressionratioHowtomeasure?CS414-Spring2014MeasureofInformationConsidersymbols
siandtheprobabilityofoccurrenceofeachsymbolp(si)Incaseoffixed-lengthcoding,smallestnumberofbitspersymbolneededisL≥log2(N)bitspersymbolExample:Messagewith5symbolsneed3bits(L≥log25)CS414-Spring2014Variable-LengthCoding-EntropyWhatistheminimumnumberofbitspersymbol?Answer:Shannon’sresult–theoreticalminimumaveragenumberofbitspercodewordisknownasEntropy(H)Entropy–measureofuncertaintyinrandomvariableCS414-Spring2014EntropyExampleAlphabet={A,B}p(A)=0.4;p(B)=0.6ComputeEntropy(H)-0.4*log20.4+-0.6*log20.6=.97bitsCS414-Spring2014CompressionRatioComparetheaveragemessagelengthandtheaveragecodewordlengthe.g.,averageL(message)/averageL(codeword)Example:{aa,bbb,cccc,ddddd,eeeeee,fffffff,gggggggg}Averagemessagelengthis5Ifweusecode-wordsfromslide11,thenWehave{0,1,10,11,100,101,110}Averagecodewordlengthis2.14..BitsCompressionratio:5/2.14=2.336CS414-Spring2014SymmetrySymmetriccompressionrequiressametimeforencodinganddecodingusedforlivemodeapplications(teleconference)Asymmetriccompressionperformedoncewhenenoughtimeisavailabledecompressionperformedfrequently,mustbefastusedforretrievalmodeapplications(e.g.,aninteractiveCD-ROM)CS414-Spring2014EntropyCodingAlgorithms(ContentDependentCoding)Run-lengthEncoding(RLE)ReplacessequenceofthesameconsecutivebyteswithnumberofoccurrencesNumberofoccurrencesisindicatedbyaspecialflag(e.g.,!)Example:abcccccccccdeffffggg(20Bytes)abc!9def!4ggg(13bytes)CS414-Spring2014VariationsofRLE(Zero-suppressiontechnique)Assumesthatonlyonesymbolappearsoften(blank)ReplaceblanksequencebyM-byteandabytewithnumberofblanksinsequenceExample:M3,M4,M14,…SomeotherdefinitionsarepossibleExample:M4=8blanks,M5=16blanks,M4M5=24blanksCS414-Spring2014HuffmanEncodingStatisticalencodingTodetermineHuffmancode,itisusefultoconstructabinarytreeLeavesarecharacterstobeencodedNodescarryoccurrenceprobabilitiesofthecharactersbelongingtothesubtreeExample:HowdoesaHuffmancodelooklikeforsymbolswithstatisticalsymboloccurrenceprobabilities:P(A)=8/20,P(B)=3/20,P(C)=7/20,P(D)=2/20?CS414-Spring2014HuffmanEncoding(Example)P(C)=0.09P(E)=0.11P(D)=0.13P(A)=0.16P(B)=0.51Step1:SortallSymbolsaccordingtotheirprobabilities(lefttoright)fromSmallesttolargestthesearetheleavesoftheHuffmantreeCS414-Spring2014HuffmanEncoding(Example)P(C)=0.09P(E)=0.11P(D)=0.13P(A)=0.16P(B)=0.51P(CE)=0.20P(DA)=0.29P(CEDA)=0.49P(CEDAB)=1Step2:BuildabinarytreefromlefttoRightPolicy:alwaysconnect
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024-2025部編版語文一年級上冊識字7小書包
- 攝影入門課程-攝影基礎(chǔ)與技巧全面解析
- 小學(xué)三年級上冊家鄉(xiāng)教案
- 化妝美甲合伙人協(xié)議書范本模板
- 改造舊房子出售協(xié)議書范文范本
- 測向交叉定位算法
- 上海市水電工程合作協(xié)議書范文
- 瀝青混凝土路面施工組織規(guī)劃設(shè)計
- 2023-2024學(xué)年云南省大理市下關(guān)第一中學(xué)高三下學(xué)期第二次模擬數(shù)學(xué)試題試卷
- 混凝土購銷協(xié)議(15篇)
- 【教學(xué)課件】積極維護(hù)人身權(quán)利-示范課件
- 等級保護(hù)課件
- 酒精依賴課件
- 數(shù)學(xué)繪本《亂七八糟的魔女之城》課件
- 醫(yī)院智能化弱電設(shè)計方案
- “雙減”背景下家校社協(xié)同育人的內(nèi)涵、機制與實踐路徑
- 汽車?yán)碚撛囶}卷及答案
- (完整版)辦理《出生醫(yī)學(xué)證明》委托書
- 施工安全用電檢查表(標(biāo)準(zhǔn)范本)
- 論動體的電動力學(xué)(雙語)
- 四年級語文上冊教學(xué)課件-12.盤古開天地-部編版(共31張PPT)
評論
0/150
提交評論