1、23456 In fact,there have been computers based on decimal number system or other number systems.But these computers are too complicated,expensive,and less stable for every day use.Intuitively,if a single logic unit represents less possible values,the computer will be more stable.For an electronic sig
2、nal,the binary system provides only two possible states:low or high,corresponding to 0 or 1 respectively.An electronic switch can be easily represented by two stable states of electronic signal.These sates can be defined as on and off represented by 1 and 0 respectively.To represent more than two th
3、ings(on and off),one bit is not enough,so we need a sequence of bits.In general,m bits are capable of representing 2m things because m bits can make 2m combinations of 0 and 1.Computer memory has no idea what type of data a stored bit pattern represents.78Data typesProgramMemoryA number 38Math routi
4、ne00100110A character#Text editor00100011Part of an image Image recorder10100110Part of a song Music recorder10110110Part of a film Video recorder101001119 Integers represent numbers which have no fractional part.As discussed in Chapter 2,each bit pattern can be treated as a binary number,and each b
5、inary number can be converted to the corresponding decimal integer.Its natural to use a bit pattern to represent integers.A fixed-point representation【定点表示法定点表示法】is the method used for storing integers in binary format.The decimal point is assumed at the right of the least significant(rightmost)bit【
6、最低有效位;最低有效位;最右位最右位】without any gap.101112 Unsigned representation is used to represent positive integers and zero.Storing unsigned integers is a straightforward process,which is almost the same as the procedures shown in Chapter 2.!After the number is changed to binary of n bits,the computer adds(m-
7、n)0s to the left when n is smaller than the length of memory location m.For instance,an 8-bit memory location uses unsigned representation 00001111 to store 15,here four(8-4)0s are added the leftmost of 1111.Note that the left leading 0s are essential.13141516171819202122232425Contents ofMemoryUnsig
8、nedSign-and-magnitudeOnes complementT w o s complement00000+0+0+000011+1+1+100102+2+2+200113+3+3+301004+4+4+401015+5+5+501106+6+6+601117+7+7+710008-0-7-810019-1-6-7101010-2-5-6101111-3-4-5110012-4-3-4110113-5-2-3111014-6-1-2111115-7-0-12627282930Transform the fraction 0.815 to binaryPlease notice th
9、at we have to stop as it seems that an irregular infinite repetition is occurring3115030302711415231672112320101232 .75*2=1.50 .50*2=1.0033Floating-point numbers standardsSignExponentMantissasingle precision (32 bits)1 bit8 bits23 bitsdouble precision (64 bits)1 bit11 bits52 bits3435 Excess represen
10、tation is also known as biased representation.It adds a designated biased value(or magic number)to the original value to store all exponents as an unsigned integer.If the exponent occupies m bits in computer memory,the designated biased value is 2m1_ 1(referred to as L).The shifting in excess system
11、 with 4-bit allocation is shown in the following figure.This new system is generally called Excess-L,like Excess-7.36 For instance,we use IEEE 754 single precision format to represent-281.875.For single precision,the number is divided into sign bit,exponent,and fraction(also called significand【有效有效数
12、数;尾数尾数】or mantissa).The exponent is encoded as an 8-bit pattern,so the bias is 127(or Excess-127).We proceed as follows:(1)The sign is negative,so value of sign bit is 1,that is S=1.(2)Transform 281.875 to decimal:(100011001.111)2.(3)Normalization:(100011001.111)2=(1.00011001111)2 28.(4)E is the exp
13、onent field and M is the mantissa.E=8+127=135=(10000111)2 and M=(00011001111)2.We need to add 12 zeros to the right of M to make it 23 bits.373839404142434445464748495051CharacterFrequencyHuffman CodeA1600 2 bitsB10010 3 bitsC15011 3 bitsD2910 2 bitsE3011 2 bits525354MP3 is a dominant standard.This
14、standard is a part of MPEG-1(Motion Picture Experts Group)【动态图像专家组动态图像专家组】555657Image formatBrief descriptionCharacteristicsApplication sceneExtension nameBitMaPBMP(BitMaP)is the standard image file format used in Windows operating system,which uses bit map as storage format.In addition to optional
15、image depth,it does not use any other compression techniques.Support 1-24 color depth.Image software running on Windows.BMPPersonal Computer eXchangePCX was developed by ZSOFT in the development of image processing software Paintbrush.Its a proprietary format for PC-based drawing program,and the gen
16、eral desktop publishing,graphic arts and video capture software support this format.Run-length encoding.PC-based drawing programs.PCX58Image formatBrief descriptionCharacteristicsApplication sceneExtension nameTagImage FileFormatTIFF was a generic image file format developed by Aldus and Microsoft f
17、or the desktop publishing system.Supports multiple encoding methods.Desktop publishing system,GIS,and remote sensing.TIFFTagged GraphicsTGA was developed by Truevision for its graphics card.It has been accepted by the international graphic image industry.Supports Irregularly shaped graphics.The fiel
18、d of multimedia.TGA59Image formatBrief descriptionCharacteristicsApplication sceneExtension nameGraphics Interchange FormatGIF was developed by CompuServe in 1987,its compression rate is generally about 50%,and almost all software support it.Can save multiple color images.The Internet,simple animati
19、on.GIFJoint Photographic Expert GroupJPEG is the networks most popular image format,developed by the Joint Photographic Experts Group.It is a lossy compression format,and can compress an image in a small storage space.JPG is short for JPEG,and jpg is a suffix,jpeg can be used as a suffix or to repre
20、sent a file format.Variable compression ratio.The Internet.JPEG60Image formatBrief descriptionCharacteristicsApplication sceneExtension nameExchangeable Image file FormatEXIF was promoted by Fuji for digital camera in 1994,it is capable of storing photographic date,the use o f a p e r t u r e,f l a
21、s h exposure data and other information.Stores exposure data,like photography date.Digital Cameras.EXIFkodak Flash PiXF P X w a s j o i n t l y developed by Kodak,Microsoft,HP,and Live Picture,which has multi-resolution.With multiple resolution.Used by the Picture Easy Software application included
22、with Kodak digital cameras.FPX61Image formatBrief descriptionCharacteristicsApplication sceneExtension nameScalable Vector GraphicsIt is based on XML(Extensible Markup Language),developed by the World Wide Web Consortiums.And it can be arbitrarily enlarged while keeping very clear edge.Can enlargeGr
23、aphicarbitrarily.Designing Web graphics pages of high resolution.SVGkodak PhotoCDPCD is a Photo CD file format developed by Kodak.The format uses YCC color mode to define colors in the image.Uses YCC color mode.Save pictures on CD-ROM.PCD62Image formatBrief descriptionCharacteristicsApplication scen
24、eExtension namePhotoShopDocumentPSD is a proprietary file format for an image processing software-Photoshop,and it can support a variety of image features such as layers,channels,masks and different color modes.It is a non-compressed format as it saves the original file.Retains all the original info
25、rmation.Image processing software named Photoshop.PSDCorelDRAWCDR is a dedicated graphics file format for the well-known graphics software CorelDRAW,which can record the file attributes,location and pagination,etc.,but it is relatively poor in the degree of compatibility.Records properties,position
26、and pagination of file.Mapping software named CorelDRAW.CDR63Image formatBrief descriptionCharacteristicsApplication sceneExtension nameDrawing eXchange FormatDXF is a graphic file format of AutoCAD,which is stored in ASCII.It is very accurate on presenting graphics size.Stores graphics in ASCII.Whe
27、n user needs to exchange CAD data between AutoCAD and other software.DXFUlead PhotolmapctIt is a dedicated image format for an image editing software named Ulead Photolmapct,and it is capable of recording all the properties of image processed by Photolmapct.Replace layer with object to record inform
28、ation of image.Image editing software named Ulead Photoimpact.UFO64Image formatBrief descriptionCharacteristicsApplication sceneExtension nameEncapsulated PostScriptIt is a cross-platform standard format,mainly for storing vector and raster images.Using PostScript language to describe.Printing or pr
29、intout.EPSAdobe IllustratorAI is a vector graphics file format for Adobes software ILLUSTRATOR.It is a hierarchical file,each object in AI is independent and has its own property.Output in any size at the highest resolution.Vector software named Adobe illustrator.AI65Image formatBrief descriptionCha
30、racteristicsApplication sceneExtension namePortable Network GraphicsThe current version of PNG(Portable Network Graphics)is the International Standard(ISO/IEC 15948:2003),and p u b l i s h e d a s a W 3 C recommendation in 2003.It can provide lossless compression.Supports 24-bit and 48-bit true colo
31、r.JAVA program,web page and S60 program.PNGHigh Dynamic Range ImagingHDRI(High Dynamic Range Imaging)【高动态范围成像】has larger brightness range than normal RGB format(only 8 bits).It records brightness in the way of direct corresponding,which is different from the traditional image.Has the ability to save
32、 enough lighting information.When user needs environment lighting information of the picture.HDRI66Image formatBrief descriptionCharacteristicsApplication sceneExtension nameRAW Image FormatRAW file contains all the photo information of the original image file before it enters the cameras image proc
33、essor after generated in the sensor.Many image processing software can process RAW file.The s o f t w a r e p r o v i d e s adjustment of sharpness,white balance,gradation and color for a RAW format picture.Contains all photo information of the original image file.When user needs a fine picture.RAW6
34、7【时间时间压缩压缩】686970V i d e o formatBrief descriptionV i d e o encodingA u d i o encodingExtension namePopularityReal MediaIt was formulated by Realnetworks,and its compression ratio depends on network transmission rates.RealVideo9 RACCrm/rmvbPopularF l a s h VideoIt was formulated by Adobe Systems,and
35、 can be played by Adobe Flash Player version 6 and newer over the Internet.H.263MP3flvReplaced by F4VF4VIt is similar with Flash Video,but can support H.264 high-definition video encoding.H.264MP3f4vPopular71V i d e o formatBrief descriptionV i d e o encodingA u d i o encodingExtension namePopularit
36、yA u d i o V i d e o Interleave AVI(Audio Video Interleave)【音频视频交叉存取格式】w a s r e l e a s e d b y Microsoft,which can be called conveniently with good image quality.MPEG-4MP3aviPopularMatroskaMatroska can integrate different types of audio tracks and subtitle tracks in a single file multiple,and its
37、video encoding has very large degree of freedom.M a n y different typesM a n y different typesmkvPopular72V i d e o formatBrief descriptionV i d e o encodingA u d i o encodingExtension namePopularityBHD BHD(Black Hawk Down)【黑鹰坠落】is developed by Baofeng【暴风】laboratory specifically for Baofeng player t
38、o play.It uses patented technology and is optimized for video quality,video size,video frame rate,bit rate,cellphone power saving,etc.FXVFXAbhdLatestMOVM OV i s t h e f o r m a t o f QuickTime movie for storing frequently used digital media type.It was developed by Apple.MPEG-4 MP3movClassic73Video
39、formatBrief descriptionV i d e o encodingAudio encodingExtension namePopularityWMV WMV(Windows Media Video)【Windows媒体视频格式】is a technical standard developed by Microsoft for multimedia spreading through the Internet in real-time.It is an upgrade on the ASF(Advanced Stream Format)format.Its main advan
40、tages are:scalable media types,local or network playback,etc.The latest version of WMV is VC-1 standard.WMVWMAwmvClassic74V i d e o formatBrief descriptionV i d e o encodingA u d i o encodingExtension namePopularityMP4MPEG(Moving Picture Experts Group)-4【动态图像专家组-4】(ISO/IEC 14496)is an international
41、standard based on the second generation of compression and encoding technologies.It uses audio-visual media object as basic unit and a d o p t s c o n t e n t-b a s e d compression encoding.MPEG-4 MP3mp4Popular75V i d e o formatBrief descriptionV i d e o encodingA u d i o encodingExtension namePopul
42、arity3GPA multimedia standard d e v e l o p e d b y T h i r d Generation Partnership Project(3GPP),so that users can use 3G mobile phones to enjoy high-quality audio,video,and other multimedia content.H.263AMR_NB 3gpClassicWebMWebM was proposed by Google,it is an open and free media file format.It i
43、s actually a new container format based on the development of Matroska.It includes VP8 video track and Ogg Vorbis audio track.VP8Ogg VorbisLatest7677StandardBrief descriptionMain technologiesPopularityH.261H.261 is mainly used in older video conferencing and video telephony products,which was develo
44、ped by ITU-T in 1984.It is the first use of digital video compression standardInter-frame prediction based on motion compensation,16x16 macro-block,discrete cosine transform on 88 sub-blocks.OutdatedH.263In 1995,ITU-T launched H.263 for low bit rate video conferencing.Its encoding algorithm is basic
45、ally the same with H.261,but added some improvements to improve encoding performance and error correction capability.2D prediction,motion compensation of half-pixel precision,syntax-based arithmetic encoding.Classic78StandardBrief descriptionMain technologiesPopularityH.264H.264 was proposed by Join
46、t Video Team in 2003,it significantly improved compression ratio,and strengthened the treatment of errors and loss in IP network,mobile network.T w o-l a y e r s encoding system,m a c r o b l o c k division supporting unequal shape,m u l t i-f r a m e reference.Popular79StandardBrief descriptionMain
47、 technologiesPopularityH E V C(H.265)HEVC(High Efficiency Video Coding)【高性能视频编码】is a video compression standard developed by the JCT-VC organization,also called H.265.It can double the data compression ratio while keeping the same video quality,compared with MPEG-4.Using this standard,the resolution
48、 can reach 81924320.Redefined grammar for video image segmentation,intra-frame prediction supporting 33 directions,encoding unit of optional size.Latest80StandardBrief descriptionMain technologiesPopularityMPEG-1MPEG-1 was developed by MPEG in 1992,used for encoding the active image and sound on dig
49、ital storage medium like VCD,with digital rate of 1.5Mb/s.Bi-directional encoding scheme,progressive s c a n n i n g i m a g e,motion vector of half-pixel precision.OutdatedMPEG-2MPEG-2 was released in 1994,it is designed to get high image quality and higher transmission rates,providing transfer rat
50、e of 4Mbps to 100Mbps.It can be used for Digital Video Broadcasting(DVB),home DVD and high-definition television(HDTV).Supporting interlace scanning video,four levels of encoded image resolution,five profiles based on various compression ratio.Classic81StandardBrief descriptionMain technologiesPopul