版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 医疗科技创新与临床应用
- 中医科传统疗法推广与应用总结
- 中医养生知识分享
- 护理专业护士护理实践与护理经验
- 医院清洁人员服务规范
- 2026年湖北艺术职业学院高职单招职业适应性测试参考题库有答案解析
- 群体性灾难应激反应心理救援系统2026
- 口腔疾病防治与治疗进展汇报
- 2026年广东舞蹈戏剧职业学院高职单招职业适应性测试备考题库有答案解析
- 2026年宝鸡职业技术学院高职单招职业适应性测试备考题库有答案解析
- 2025年宪法知识题库及参考答案综合卷
- 2026年社区工作者考试题库300道(有一套)
- 2026年福建省能源石化集团有限责任公司招聘备考题库及答案详解一套
- 2025年家庭投资理财规划:科学配置与稳健增值指南
- 杜氏肌营养不良运动功能重建方案
- 2026贵州大数据产业集团有限公司第一次招聘155人模拟笔试试题及答案解析
- 肿瘤药物给药顺序课件
- 海南计算机与科学专升本试卷真题及答案
- 企业安全一把手授课课件
- 学校中层干部述职报告会
- 音乐疗法对焦虑缓解作用-洞察及研究
评论
0/150
提交评论