Fundamentals of Video Compression Introduction to Digital Video Basic Compression Techniques Still Image CompressionTechniques - JPEG Video Compression
Factors Associated with CompressionThe goal of video compression is to massively reducethe amount of data required to store the digitalvideo file, while retaining the quality of theoriginal video# Real-Time versus Non-Real-Time# Symmetrical versus Asymmetrical# Compression Ratios# Lossless versus Lossy# Interframe versus Intraframe# Bit Rate Control
Lossless vs. Lossy Compression In lossless compression, data is not altered or lostin the processof compression or decompression Some examples of lossless standards are: Run-Length Encoding Dynamic Pattern Substitution - Lampel-ZivEncoding Huffman Encoding Lossy compression is used for compressingaudio, pictures, video Some examples are: JPEG MPEG H.261 (Px64) Video Coding Algorithm
Real-Time V/s Non-Real-TimeSome compression systems capture, compress to disk, decompress andplay back video (30 frames per second) all in real time; there are nodelays.Other systems are only capable of capturing some of the 30 frames persecond and/or are only capable of playing back some of the frames.Insufficient frame rate is one of the most noticeable video deficiencies.Without a minimum of 24 frames per second, the video will be noticeablyjerky. In addition, the missing frames will contain extremely importantlip synchronisation data.If the movement of a persons lips is missing due to dropped framesduring capture or playback, it is impossible to match the audio correctlywith the video.
Symmetrical V/s AsymmetricalThis refers to how video images are compressed and decompressed.Symmetrical compression means that if you can play back asequence of 640 by 480 video at 30 frames per second, then you canalso capture, compress and store it at that rate.Asymmetrical compression means just the opposite. The degree ofasymmetry is usually expressed as a ratio. A ratio of 150:1 means ittakes approximately 150 minutes to compress one minute of video.Asymmetrical compression can sometimes be more elaborate andmore efficient for quality and speed at playback because it uses somuch more time to compress the video.The two big drawbacks to asymmetrical compression are that it takesa lot longer, and often you must send the source material out to adedicated compression company for encoding
Compression RatioThe compression ratio relates the numerical representation ofthe original video in comparison to the compressed video.For example, 200:1 compression ratio means that theoriginal video is represented by the number 200. Incomparison, the compressed video is represented by thesmaller number, in this case, that is 1.With MPEG, compression ratios of 100:1 are common, withgood image quality.Motion JPEG provides ratios ranging from 15:1 to80:1, although 20:1 is about the maximum for maintaining agood quality image.
Interframe V/s IntraframeOne of the most powerful techniques for compressing video isinterframe compression. Interframe compression uses one or moreearlier or later frames in a sequence to compress the currentframe, while intraframe compression uses only the currentframe, which is effectively image compression.Since interframe compression copies data from one frame toanother, if the original frame is simply cut out (or lost intransmission), the following frames cannot be reconstructed properly.Making cuts in intraframe-compressed video is almost as easy asediting uncompressed video one finds the beginning and ending ofeach frame, and simply copies bit-for-bit each frame that one wants tokeep, and discards the frames one doesnt want.Another difference between intraframe and interframe compression isthat with intraframe systems, each frame uses a similar amount ofdata.
Bit Rate ControlA good compression system should allow the userto instruct the compression hardware andsoftware which parameters are most important. In some applications, frame rate may be ofparamount importance, while frame size is not.In other applications, you may not care if theframe rate drops below 15 frames per second, butthe quality of those frames must be of very good.
Introduction to Digital Video Video is a stream of data composed of discrete frames,containing both audio and pictures Continuous motion produced at a frame rate of 15 fps orhigher Traditional movies run at 24 fps TV standard in USA (NTSC) uses 30 fpsWith digital video, four factors have to be kept in mind.# Frame rate# Colour Resolution# Spatial Resolution# Image Quality
Frame RateThe standard for displaying any type of non-film video is 30 frames persecond (film is 24 frames per second). Additionally these frames are split inhalf (odd lines and even lines), to form what are called fields.When a television set displays its analogue video signal, it displays the oddlines (the odd field) first. Then is displays the even lines (the even field).Each pair forms a frame and there are 60 of these fields displayed everysecond (or 30 frames per second). This is referred to as interlaced video. Fragment of the "matrix" After processing the fragment on the left by the sequence (2 frames) FRC filter the frame rate increased 4 times
Colour ResolutionThis second factor is a bit more complex. Colour resolutionrefers to the number of colours displayed on the screen at onetime. Computers deal with colour in an RGB (red-green-blue)format, while video uses a variety of formats. One of the mostcommon video formats is called YUV. This test table was used to estimate the color resolution. First we determine the border when one of the colors on the resolution chart disappears, and color sharpness is found on the scale on the right.
Spatial ResolutionThe third factor is spatial resolution - or in other words, "How big is thepicture?". Since PC and Macintosh computers generally have resolutionsin excess of 640 by 480,The National Television Standards Committee ( NTSC) standard used inNorth America and Japanese Television uses a 768 by 484 display.The Phase Alternative system (PAL) standard for European television isslightly larger at 768 by 576. Spatial resolution is a parameter that shows how many pixels are used to represent a real object in digital form. Fig. 2 shows the same color image represented by different spatial resolution. Left flower have a much better resolution that right one
Image qualityThe final objective is video that looks acceptable for yourapplication.For some this may be 1/4 screen, 15 frames per second(fps), at 8 bits per pixel.Other require a full screen (768 by 484), full frame ratevideo, at 24 bits per pixel (16.7 million colours).
MPEG Compression Compression through Spatial Temporal
Spatial Redundancy Take advantage of similarity among most neighboring pixels
Spatial Redundancy Reduction RGB to YUV less information required for YUV (humans less sensitive to chrominance) Macro Blocks Take groups of pixels (16x16) Discrete Cosine Transformation (DCT) Based on Fourier analysis where represent signal as sum of sines and cosines Concentrates on higher-frequency values Represent pixels in blocks with fewer numbers Quantization Reduce data required for co-efficients Entropy coding Compress