mpeg

7
MPEG - MPEG stands for Moving Picture Expert Group which worked to generate the specifications under ISO (the International Organization for Standardization) and IEC (the International Electro technical Commission). - Video as sequence of pictures (frames) o JPEG applied to each frame o High correlation between successive frames -> only small portion of each frame is involved with any motion o A combination of actual frame contents and predicted frame contents are used o Need of motion estimation and motion compensation - Frame/frame types o I-frames: (Interframe or Intraframe) are coded with reference to other frames. Serve as reference pictures for predictive-coded frames (P, B) o P-frames: coded using motion compensated prediction form a past I-frame or P-frame o B-frames: are bi-directionally predictive-coded. Highest degree of compression, but require both past and future reference pictures for motion compensation - MPEG encoding o Uses motion compensation Idea is that a pattern of pixels appears in a different position in following frames o Input frames are preprocessed (color space conversion and spatial resolution adjustment) o Frame types are decided for each frame/picture o Each picture is divided into macro blocks of 16*16 pixels o Macro blocks are intracoded for I-frames and predictive coded for P and B frames Attempt to predict where macroblock in frame n will appear in frame n+1 (forward prediction) and frame n-1 (backward prediction) o Macro blocks are divided into six blocks of 8*8 pixels (4 luminance and 2 chrominance) and DCT is applied to

Upload: ria-singh

Post on 05-May-2017

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mpeg

MPEG- MPEG stands for Moving Picture Expert Group which worked to generate the specifications under

ISO (the International Organization for Standardization) and IEC (the International Electro technical Commission).

- Video as sequence of pictures (frames)

o JPEG applied to each frame

o High correlation between successive frames -> only small portion of each frame is involved with any motion

o A combination of actual frame contents and predicted frame contents are used

o Need of motion estimation and motion compensation

- Frame/frame types

o I-frames: (Interframe or Intraframe) are coded with reference to other frames. Serve as reference pictures for predictive-coded frames (P, B)

o P-frames: coded using motion compensated prediction form a past I-frame or P-frame

o B-frames: are bi-directionally predictive-coded. Highest degree of compression, but require both past and future reference pictures for motion compensation

- MPEG encodingo Uses motion compensation

Idea is that a pattern of pixels appears in a different position in following frames

o Input frames are preprocessed (color space conversion and spatial resolution adjustment)

o Frame types are decided for each frame/pictureo Each picture is divided into macro blocks of 16*16 pixelso Macro blocks are intracoded for I-frames and predictive coded for P and B frames

Attempt to predict where macroblock in frame n will appear in frame n+1 (forward prediction) and frame n-1 (backward prediction)

o Macro blocks are divided into six blocks of 8*8 pixels (4 luminance and 2 chrominance) and DCT is applied to each block, then transform coefficients are quantized and zig-zag scanned, variable-length coded

Page 2: Mpeg

Picture sequence I B B P B B I (display order) Bitstream order -- I P B B P B B I

The MPEG compression methodology is considered as asymmetric--where the encoder is more complex than the decoder.[2] The encoder needs to be algorithmic or adaptive whereas the decoder is 'dumb' and carries out fixed actions.[2] This is considered advantageous in applications such as broadcasting where the number of expensive complex encoders is small but the number of simple inexpensive decoders is large.

This approach of the ISO to standardization in MPEG is considered novel because it is not the encoder which is standardized; instead, the way in which a decoder shall interpret the bitstream is defined. A decoder which can successfully interpret the bitstream is said to be compliant.[2] The advantage of standardizing the decoder is that over time encoding algorithms can improve yet compliant decoders will continue to function with them.[2]

Page 4: Mpeg

A video codec is a device or software that enables video compression and/or decompression for digital video. The compression usually employs lossy data compression. Historically, video was stored as an analog signal on magnetic tape. Around the time when the compact disc entered the market as a digital-format replacement for analog audio, it became feasible to also begin storing and using video in digital form, and a variety of such technologies began to emerge.

Audio and video call for customized methods of compression. Engineers and mathematicians have tried a number of solutions for tackling this problem.

There is a complex balance between the video quality, the quantity of the data needed to represent it, also known as the bit rate, the complexity of the encoding and decoding algorithms, robustness to data losses and errors, ease of editing, random access, the state of the art of compression algorithm design, end-to-end delay, and a number of other factors.

Digital video codecs are found in DVD (MPEG-2), VCD (MPEG-1), in emerging satellite and terrestrial broadcast systems, and on the Internet. Online video material is encoded in a variety of codecs, and this has led to the availability of codec packs - a pre-assembled set of commonly used codecs combined with an installer available as a software package for PCs.

Encoding media by the public has seen an upsurge with the availability of DVD-writers. Since commercially available DVDs are usually dual-layer, and hence bigger than the more common single layer writable DVDs, it is often the case that the material has to be compressed again, sacrificing quality so that the media will fit onto a single layer disc.

An audio codec is a hardware device or a computer program that compresses/decompresses digital audio data according to a given audio file format or streaming audio format. The term codec is a combination of 'coder-decoder'. The object of a codec algorithm is to represent the high-fidelity audio signal with minimum number of bits while retaining the quality. This can effectively reduce the storage space and the bandwidth required for transmission of the stored audio file. Most codecs are implemented as libraries which interface to one or more multimedia players, such as XMMS, Winamp or Windows Media Player.

In some contexts, the term "audio codec" can refer to a hardware implementation or sound card. When used in this manner, the phrase audio codec refers to the device encoding an analog audio signal.

Page 5: Mpeg

Audio compression is a form of data compression designed to reduce the size of audio files. Audio compression algorithms are implemented in computer software as audio codecs. Generic data compression algorithms perform poorly with audio data, seldom reducing file sizes much below 87% of the original, and are not designed for use in real time. Consequently, specific audio "lossless" and "lossy" algorithms have been created. Lossy algorithms provide far greater compression ratios and are used in mainstream consumer audio devices.

As with image compression, both lossy and lossless compression algorithms are used in audio compression, lossy being the most common for everyday use. In both lossy and lossless compression, information redundancy is reduced, using methods such as coding, pattern recognition and linear prediction to reduce the amount of information used to describe the data.

The trade-off of slightly reduced audio quality is clearly outweighed for most practical audio applications where users cannot perceive any difference and space requirements are substantially reduced. For example, on one CD, one can fit an hour of high fidelity music, less than 2 hours of music compressed losslessly, or 7 hours of music compressed in MP3 format at medium bit rates.

Video compression refers to reducing the quantity of data used to represent digital video images, and is a

straightforward combination of image compression and motion compensation. This article deals with its

applications: compressed video can effectively reduce the bandwidth required to transmit video via terrestrial

broadcast, via cable TV, or via satellite TV services

Most video compression is lossy — it operates on the premise that much of the data present before compression is not necessary for achieving good perceptual quality. For example, DVDs use a video coding standard called MPEG-2 that can compress around two hours of video data by 15 to 30 times, while still producing a picture quality that is generally considered high-quality for standard-definition video. Video compression is a tradeoff between disk space, video quality, and the cost of hardware required to decompress the video in a reasonable time. However, if the video is overcompressed in a lossy manner, visible (and sometimes distracting) artifacts can appear.

Video compression typically operates on square-shaped groups of neighboring pixels, often called macroblocks. These pixel groups or blocks of pixels are compared from one frame to the next and the video compression codec (encode/decode scheme) sends only the differences within those blocks. This works extremely well if the video has no motion. A still frame of text, for example, can be repeated with very little transmitted data. In areas of video with more motion, more pixels change from one frame to the next. When more pixels change, the video compression scheme must send more data to keep up with the larger number of pixels that are changing. If the video content includes an explosion, flames, a flock of thousands of birds, or any other image with a great deal of high-frequency detail, the quality will decrease, or the variable bitrate must be increased to render this added information with the same level of detail.

The programming provider has control over the amount of video compression applied to their video programming before it is sent to their distribution system. DVDs, Blu-ray discs, and HD DVDs have video compression applied during their mastering process, though Blu-ray and HD DVD have enough disc capacity that most compression applied in these formats is light, when compared to such examples as most video streamed on the internet, or taken on a cellphone. Software used for storing video on hard drives or various optical disc formats will often have a lower image quality, although not in all cases. High-bitrate video codecs with little or no compression exist for video post-production work, but create very large files and are thus almost never used for the distribution of finished videos. Once excessive

Page 6: Mpeg

lossy video compression compromises image quality, it is impossible to restore the image to its original quality

Video is basically a three-dimensional array of color pixels. Two dimensions serve as spatial (horizontal and vertical) directions of the moving pictures, and one dimension represents the time domain. A data frame is a set of all pixels that correspond to a single time moment. Basically, a frame is the same as a still picture.

Video data contains spatial and temporal redundancy. Similarities can thus be encoded by merely registering differences within a frame (spatial), and/or between frames (temporal). Spatial encoding is performed by taking advantage of the fact that the human eye is unable to distinguish small differences in color as easily as it can changes in brightness and so very similar areas of color can be "averaged out" in a similar way to jpeg images (JPEG image compression FAQ, part 1/2). With temporal compression only the changes from one frame to the next are encoded as often a large number of the pixels will be the same on a series of frames.