




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 微软程序员考试题及答案
- 声带息肉护理查房
- 汽车美容与装饰实训课件 8-0项目二汽车外部的清洁护理 任务五汽车外饰的清洁护理实训
- 桥梁油漆施工方案
- 采购项目保障措施方案
- 温度变送器考试题及答案
- 幕墙质量自评方案
- 如何设计电子贺卡
- 思想引领面试题及答案
- 幼儿园健康领域障碍跑教案设计
- 内蒙古交通集团有限公司社会化招聘考试试卷及答案2022
- 国家开放大学《当代中国政治制度》期末考试题库
- 智能智能服务系统开发合同
- 2025届新高考语文古诗文默写100题汇编(含答案解析)
- 征信异议申诉合同(2篇)
- 中医小儿贴敷培训课件
- 自杀患者应急预案
- 路由路径靠算法(课件)-七年级信息科技全一册同步教学(人教版2024)
- 中建双优化案例指引
- 《幕墙维护维修技术规程》
- 康复设备及器材供货安装及售后服务方案
评论
0/150
提交评论