MPEG CODING PROCESS. Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding.

Slides:



Advertisements
Similar presentations
Multimedia System Video
Advertisements

Introduction to H.264 / AVC Video Coding Standard Multimedia Systems Sharif University of Technology November 2008.
T.Sharon-A.Frank 1 Multimedia Compression Basics.
MPEG-1: A Standard for Digital Storage of Audio and Video Nimrod Peleg Update: Dec
M-JPEG M-JPEG April 15, 2015 INF5063: Programming heterogeneous multi-core processors.
Basics of MPEG Picture sizes: up to 4095 x 4095 Most algorithms are for the CCIR 601 format for video frames Y-Cb-Cr color space NTSC: 525 lines per frame.
1 Video Coding Concept Kai-Chao Yang. 2 Video Sequence and Picture Video sequence Large amount of temporal redundancy Intra Picture/VOP/Slice (I-Picture)
Source Coding for Video Application
Chapter 7 End-to-End Data
School of Computing Science Simon Fraser University
JPEG.
H.264 / MPEG-4 Part 10 Nimrod Peleg March 2003.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
1 Image and Video Compression: An Overview Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur,
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
Video Compression Concepts Nimrod Peleg Update: Dec
On Error Preserving Encryption Algorithms for Wireless Video Transmission Ali Saman Tosun and Wu-Chi Feng The Ohio State University Department of Computer.
MPEG-2 Digital Video Coding Standard
CSE679: MPEG r MPEG-1 r MPEG-2. MPEG r MPEG: Motion Pictures Experts Group r Standard for encoding videos/movies/motion pictures r Evolving set of standards.
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
CM613 Multimedia storage and retrieval Lecture: Lossy Compression Slide 1 CM613 Multimedia storage and retrieval Lossy Compression D.Miller.
Chapter 2 Source Coding (part 2)
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
MPEG MPEG-VideoThis deals with the compression of video signals to about 1.5 Mbits/s; MPEG-AudioThis deals with the compression of digital audio signals.
Introduction to JPEG and MPEG Ingemar J. Cox University College London.
MPEG-1 and MPEG-2 Digital Video Coding Standards Author: Thomas Sikora Presenter: Chaojun Liang.
Video Compression Techniques By David Ridgway.
Klara Nahrstedt Spring 2011
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Indiana University Purdue University Fort Wayne Hongli Luo
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
JPEG CIS 658 Fall 2005.
Codec structuretMyn1 Codec structure In an MPEG system, the DCT and motion- compensated interframe prediction are combined. The coder subtracts the motion-compensated.
June, 1999 An Introduction to MPEG School of Computer Science, University of Central Florida, VLSI and M-5 Research Group Tao.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
CS654: Digital Image Analysis
Introduction to Image and Video Coding Algorithms
Block-based coding Multimedia Systems and Standards S2 IF Telkom University.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
CHAPTER-VIDEO COMPRESSION STANDARDS 1. Contents  What is Video Compression?  Why Video compression?  Video Compression Standards  Evaluation of Video.
Introduction to JPEG m Akram Ben Ahmed
(B1) What are the advantages and disadvantages of digital TV systems? Hint: Consider factors on noise, data security, VOD etc. 1.
By Dr. Hadi AL Saadi Lossy Compression. Source coding is based on changing of the original image content. Also called semantic-based coding High compression.
H. 261 Video Compression Techniques 1. H.261  H.261: An earlier digital video compression standard, its principle of MC-based compression is retained.
Introduction to H.264 / AVC Video Coding Standard Multimedia Systems Sharif University of Technology November 2008.
IMAGE COMPRESSION.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
JPEG Image Coding Standard
JPEG.
CIS679: MPEG MPEG.
ENEE 631 Project Video Codec and Shot Segmentation
Standards Presentation ECE 8873 – Data Compression and Modeling
MPEG-1 MPEG is short for the ‘Moving Picture Experts Group‘.
MPEG-1 MPEG is short for the ‘Moving Picture Experts Group‘.
Presentation transcript:

MPEG CODING PROCESS

Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding  MPEG 1 Inter frame Encoding  Question –Answer  References

 In MPEG encoding process we try to remove Spatial and Temporal redundancy from MPEG frames.  Removing spatial redundancy is similar to JPEG compression process.  Removing spatial redundancy is also known as Intra frame compression/encoding of video.  Removing Temporal redundancy is known as Inter frame compression of video. What is MPEG Encoding?

Spatial and Temporal Redundancy-

 Raw video contains vast amount of data.  Sending these video through communication channel required very high bandwidth and storage capacity.  Without compression communication of video take huge time and very high cost.  20 Mb/s HDTV channel bandwidth require compression by factor Why MPEG Encoding ?

 I (Intra Frame)  P (forward predictive frame)  B (Bidirectional predictive frame)  D ( DC Frame) Types of Frame in MPEG1-

 I frame is also known as I picture or key frame.  I frame is equivalent to baseline JPEG image.  Starting of any video begin with I frame.  In editing application of mpeg video we edit I frame only.  Compression is very fast in I frame.  The length between I frame is known as GOP(group of pictures) size I Frame-

 Predict new frame on the basis of past and future frame  B- Frame is also known as bacward prediction  Decoding next I and p frame are necessary after decoding of B frame  So B frame require larger buffer size so that encoding and decoding both take much time  B frame concern with many controversy that’s why they often avoided in video  Some time not fully supported by H/w decoder B Frame-

Figure- I, P and B Frame

 D frame or DC pictures is unique in MPEG1 which is not present in later video standards.  Encode DC component only ( Removed AC coefficient) that’s why have very low quality.  D frames never take advantage of I,P and B frame for prediction of new frame.  D frames are only used for fast preview of video. D FRAME-

Layer of MPEG1 Video-

 Decomposing image to three components in RGB space.  Converting RGB to Y.Cb.Cr.  Dividing image into several macroblocks (each macroblock has 6 blocks, 4 for Y, 1 for Cb, 1 for Cr).  DCT transformation for each block. MPEG1- I Frame Encoding Process

 After DCT transform, Quantizing each coefficient.  Then use zig-zag scan to gather AC value.  Use DPCM to encode the DC value, then use VLC to encode it.  Use RLE to encode the AC value,then use VLC to encode it. Continue……………..

MPEG1- I Frame Encoding Process-

 In general, each pels in a picture consists of three components : R (Red), G (Green), B (Blue). But (R,G,B) must be converted to (Y,Cb,Cr) in MPEG-1,then they are processed.  We can view the color value of each pels from RGB color Space, or YCbCr color Space.  Because (Y,Cb,Cr) is less correlated then (R,G,B), so we can code the (Y,Cb,Cr) components more efficiently. Usually we use (Y,U,V) to denote (Y,Cb,Cr). Color Space Conversion -

 Dct is used to convert data from time domain to frequency domain.  By using this transform we can convert a 8 by 8 pel block to another 8 by 8 block.  In general most of the energy(value) is concentrated to the top-left corner.  After quantizing the transformed matrix, most data in this matrix may be zero,  Then using zig-zag order scan and run length coding can achieve a high compression ratio. DCT-Discrete Cosine Transformation-

 In DCT, coefficient in location (0,0) is called DC coefficient and the other values we call them AC coefficients.  In general, we use large quantization step in quantizing AC coefficients, and use small quantization step to quantize DC coefficient so as to preserve high precision. Continue………..

DCT Example-

 Quantization is to reduce a range of numbers to a single small value, so we can use less bits to represent a large number.  For example, we can round a real to a integer. That is a kind of quantization.  In MPEG-1, use a matrix called quantizer ( Q[i,j] ) to define quantization step. Every time when a pels matrix ( X[i,j] ) with the same size to Q[i,j] come,use Q[i,j] to divide X[i,j] to get quantized value matrix Xq[i,j] Quantization-

 Quantization Equation : Xq[i,j] = Round( X[i,j]/Q[i,j] )  Inverse Qantization Eqation : X'[i,j]=Xq[i,j]*Q[i,j] Continue…………………….

Quantization Example-Q[i][j]=2

 After DCT and quantization most AC values will be zero. By using zig-zag scan we can gather even more consecutive zeros, then we use RLE to gain compression ratio.  After zig-zag scan, many zeros are together now, so we encode the bitstream as (skip,value)pairs,where skip is the number of zeros and value is the next non-zero componet  zig-zag scan and RLE are only used in AC coefficien Zig-Zag Scan And Run Length Encoding(RLE)-

Zigzag scan Example-

Run Length Encoding-

 Variable Length Coding is a statistical coding technique. It uses short codeword to represent the value which occurs frequently and use long codeword to represent the value which occurs less frequently. With this method can make the code string shorter than the original data.  In MPEG-1, the last of all encoding processes is to use VLC to reduce data redundency and the first step in decoding process is to decode VLC to reconstruct image data. VLC(Variable Length Coding)-

 Encoding and decoding processes with VLC must refer to a VLC code table.  This code table has two entries. One is original data and the other is the corresponding codeword.  In MPEG-1 standard, many different VLC code tables are defined.  You can find them in MPEG-1 Standard 2- ANNEX C.  Using multiple VLC code tables is to improve compression ratio of VLC. Continue………………….

 Decomposing image to three components in RGB space  Converting RGB to YCbCr  Perform motion estimation to record the difference between the encoding frame and the reference frame stored within the frame buffer  Dividing image into several macroblocks (each macroblock has 6 blocks, 4 for Y, 1 for Cb, 1 for Cr) Inter Frame Encoding Process-

 DCT transformation for each block  Quantizing each coefficient Use zig-zag scan to gather AC value  Reconstruct the frame and store it to the frame buffer if necessary  DPCM is applied to encode the DC value, then use VLC to encode it  Use RLE to encode the AC value, then use VLC to encode it Continue…………………

Inter Frame Coding-

 Coding of the P pictures is more complex than for I pictures,  Motion- compensated macro blocks may be constructed.  Their difference between the motion compensated macro block and the current macro block is transformed with a 2-dimensional  DCT giving an array of 8 by 8 transform coefficients.  The coefficients are quantized to produce a set of quantized coefficients.  The quantized coefficients are then encoded using a run-length value technique. P Frame Coding-

 In coding P pictures, the encoder has more decisions to make than in the case of I pictures.  Thee main decisions are as follow  How to divide the picture up into slices,  Determined the best motion vectors to use, decide whether to code each macroblock as intra or predicted,  How to set the quantizer scale Continue………………………

 Selection of Macro block Type-There are 8 types of macro block in P pictures.  Motion Compensation Decision-The encoder has an option on whether to transmit motion vectors or not for predictive-coded macro blocks.  Intra/Non-intra Coding Decision Decisions to be Made When Coding the P Frame-

 Coded/Not-Coded-Decision-After quantization, if all the coefficients in a block is zero then the block is not coded.  Quantizer/No Quantizer Decision-Quantizer scale can be altered which will affect the picture quality. Continue……………………

 B pictures are divided into slices in the same way as I and P pictures.  Since B pictures are not used as a reference for motion compensation,  Errors in B pictures are slightly less important than in I or P pictures.  Consequently, it might be appropriate to use fewer slices for B pictures. Coding of B frame-

 Selection of Macro block Type There are 12 types of macro block in B pictures. Compare with P pictures, there are extra types due to the introduction of the backward motion vector. If both the backward and backward motion vectors are present, then motion-compensated macro blocks are constructed from both previous and future pictures, and the result is averaged to form the "interpolated" motion-compensated macroblock. Decisions to be made when coding the B frame-

 Selecting Motion Compensation Mode  Intra/Non-Intra Coding  Coded/Not Coded Decision Continue……………………..

References:- 1.Murat Tekalp “ Digital video processing’’ Prentice Hall Signal Processing series publication, ISBN: (alk paper) published Year AL Bovik, “The Essential Guide to Video Processing” Academic Press is an imprint of Elsevier publication, ISBN: published Year /