Contents
- 格式:pdf
- 大小:166.28 KB
- 文档页数:56
PVRG-MPEGCODEC1.1
AndyC.Hung
June14,1993Copyrightc1990,1991,1993AndyC.Hung,Allrightsreserved.
ThisworkwasdoneatthePortableVideoResearchGroup(PRVG),StanfordUniversity.
Thisdocumentisprovidedforgeneralinformationaluse.Noresponsibilityisassumedbytheauthorswith
regardtotheaccuracyoftheinformationcontainedherein.
Thedocumentationdescribedhereinmaybeused,copied,ortranscribedwithoutfeeorprioragreement
providedthatacknowledgementorreferenceismadeofthesource.
SunisatrademarkofSunMicrosystems,Inc.UNIXisatrademarkofAT&T.DECstationisatrademark
ofDigitalEquipmentCorporation.
ThispackageisbasedontheUNIXoperatingsystem.Weappreciateanycommentsorcorrections-they
canbesenttoAndyC.Hungatachung@cs.stanford.edu.Wecannotguaranteethatanybugswillbecorrected
however.
FundedbytheDefenseAdvancedResearchProjectsAgency.
IamespeciallygratefultoHewlettPackardandStormTechnologyfortheirfinancialsupportduringthe
earlierstagesofcodecdevelopment.Anyerrorsinthecodeanddocumentationaremyown.Thefollowing
peopleareacknowledgedfortheiradviceandassistance.Weapologizeifwehavemissedanyonefromthislist.
Thanks,oneandall.
ThePortableVideoResearchGroupatStanford:TeresaMeng,PeterBlack,NavinChaddha,BenGordon,
SheilaHemami,Wee-ChiewTan,EliTsern.
AdriaanLigtenbergofStormTechnology.JeanneWiseman,AndrewFitzhugh,GregoryYovanof,and
ChuckRosenbergofHewlettPackard.EricHamiltonandJean-GeorgesFritschofC-CubeMicrosystems.
LawrenceRoweoftheBerkeleyPlateauResearchGroup.
TomLaneoftheIndependentJPEGGroup.
ThierryTurletti,Inria.
KatsumiTahara,Sony;CiaranMcGoldrick;KarlLillevold;MatsLofkvist;HiroshiSaitoh,Panasonic;
FrankGadegast;ChadFogg,Cascade;AndersKlemets;GrahamLogan;JellevanZeijl;GeorgeWarner,
AT&T;ChrisAdams,HewlettPackard.
Dedicatedtothestandardizationcommitteesandtheireffortsinbringingtheadvancementoftechnologyto
everyone.
iContents
Contentsii
1GettingStarted1
1.1CommonQuestionsandAnswers1
1.2FurtherInformation2
2UnderstandingImageCompression3
2.1Introduction3
2.2ColorSpace3
2.3MPEGModel4
2.4MotionCompensationandEstimation4
2.5TransformStage6
2.6Quantization8
2.7CodingModel9
2.8EntropyCoding10
2.9Layering11
2.10Detailsonencoding12
2.11MotionEstimation13
2.12RateControl14
2.13DCIntraframeMode14
3CallingParameters15
3.1Encoder15
3.1.1Whatarethefiles?18
3.1.2EncodingExamples18
3.2Decoder18
3.2.1DecodingExamples19
3.3ProgramTrace19
3.4ReturnValues22
4TheProgramInterpreter23
4.1Terminology23
4.2Tokens23
4.2.1SpecialCharacters24
4.3Comments25
4.4Aborting25
4.5StructureDefinition25
4.6Invalidcommands26
4.7Printing27
4.8ArithmeticCommands27
4.9StackCommands28
4.10MemoryAccessCommands28
4.11ProgramAccessCommands28
ii4.12LabelsandEquivalences29
4.13BranchCommands29
4.14ReservedMemoryLocations30
4.15ReservedProgramLocations31
4.16CommandList31
4.17Examples32
4.17.1IntraframeCoding32
4.17.2ReferenceBlockCoding33
4.17.3ReferenceRateControl34
4.18EnablingtheProgramInterpreter:Anexample34
5ProgramDocumentation36
5.1ProgramFlow36
5.2FunctionalDescription36
5.2.1mpeg.c37
5.2.2codec.c39
5.2.3huffman.c39
5.2.4io.c40
5.2.5chendct.c41
5.2.6lexer.c42
5.2.7marker.c43
5.2.8me.c44
5.2.9mem.c44
5.2.10stat.c45
5.2.11stream.c45
5.2.12transform.c46
Bibliography48
iiiChapter1
GettingStarted
ThisdocumentdescribesthePortableResearchVideoGroup’s(PVRG)PVRG-MPEGsoftwarecodec.Theinitial
versionofthiscodecwasdevelopedin1990,basedontheveryearlyMPEGsimulationmodelspecifications.
ThePVRG-MPEGsoftwarecodecthatisdescribedhereisbasedontheSantaClara1991draft.Since1991,very
littledevelopmentonthePVRG-MPEGsoftwarecodechasoccurred,untilrecentverificationbecamepossible.
Weshouldcautiontheuserthatbugsareprobablystilllurking.
1.1CommonQuestionsandAnswers
Let’sanswersomecommonquestionsabouttheMPEG-Iproposedstandard.Inthefollowingdiscussionwewill
useMPEGtorefertoMPEG-I.Anotheremergingstandardforhigherbit-ratesisMPEG-II(orMPEGphaseII).
WhatisMPEGMPEGstandsforMovingPictureExpertsGroupwhichisresponsibleforaudio,video,and
combinedsynchronizationofinformationindigitalimagesequencecoding.MPEGisajointinternational
committee(ISO-IEC/JTC1/SC2/WG8).
HowdoesMPEG-IdifferfromH.261?TheMPEG-Ialgorithmisdefinedforhigherbitrates–0.9Mbps
to1.5MbpsandconsequentlyforhigherqualitytheH.261.TheH.261specificationtargetsasomewhat
lowertelecommunicationrate,aslowas64kbps,andashortinteractivedelay.Thecombinedencoder-
decoderdelayinMPEGmaybehigherthanisacceptablefortruetelecommunication;thisdelaymaynot
beobjectionableinmultimedia.
HowdoesMPEGdifferfromJPEG?MPEGistargetedtowardimagesequencecompression.JPEGis
targetedtowardstill(single)imagecompression.
Whatdoesthisparticularpackagedo?ThispackageimplementstheMPEGCommitteeDraft(Santa
Clara’91)compressionspecificationswithsomeencodingalgorithmsbasedonMPEGsimulationmodels
1-3,thoughnotidentical.ItshouldbeabletoencodeanddecodestreamsformostMPEGplayers.