HOME NEWS PRODUCTS DOWNLOAD SUPPORT SALES ABOUT  

 Blog 
 Features 
 Samples 
 Screenshots 
 Customers 
 Support 
 How to Buy 
 
   Digigami MegaPEG.X News Blog       - ATOM FEED -

Wednesday, March 16, 2005
MPEG-2 ENCODER: Debunking I-Frame Injection
Scene change detection is a popular concept in video compression, and when mixed with MPEG-1 or MPEG-2, we often hear that an encoder is 'capable' of I-frame 'injection' on scene breaks. Additionally, Final Cut Pro provides the videographer with the ability to manually place compression markers on the timeline which have the effect of inserting I-frames into the GOP structure of the MPEG file.

Based on my analysis, injecting I-frames at scene breaks is unnecessary, and in this post I'm going to show how the underlying compression structure of MPEG-1 and MPEG-2 make this so.

First of all, let's consider the role of I, P and B frames in compression. I-frames stand alone; they rely on no other frames for proper decoding. P-frames are predicted in a single direction: they rely on the previous I or P frame for motion compensation. B-frames are placed between pairs of IP frames (display order). B-frames can be reconstructed using both information from the IorP frame earlier in time and the IorP frame occurring later in time.

Each of these three types of frames has an approximate cost in bits to the encoder. Generally speaking, if you study the statistics of IPB frame sizes, P-frames take about twice as many bits to compress as B-frames. And I-frames take twice as many bits to compress as P-frames. I-frames are the most expensive.

The prevailing notion is that by injecting an I-frame at the beginning of a scene, the scene will be coded most efficiently. I'm sure that was true back in the day prior to video codecs which used out-of-order bi-directional motion compensation.

Because of bi-directional motion compensation, it is not necessary that an I-frame occur at the beginning of a scene change. Instead, quantitatively, we find that if a B-frame happens to fall on the first frame of a new scene, it will happily refer to the next upcoming I or P frame as its 'reference' frame. This obviates the need for the I-frame to be the first frame. In my analysis of compressed video, I find that in GOP structures with at least 1 B frame (ie. IBPBP), the bidirectional prediction, if properly performed by the encoder, will take the scene change without a hiccup.

In reality, unless we have another reason to insert an I-frame (ie. random-access point or chapter marker), we should really have the longest GOP pattern possible.

A P-frame is a superset of the capabilities of an I-frame, and from the standpoint of
compression efficiency, is preferrable to the I-frame because of the increased coding efficiency afforded by motion-compensation.

Blogged by 元 under MPEG-2 ENCODER: Debunking I-Frame Injection  

 
Archives
11/01/04
11/13/04
11/21/04
11/23/04
11/27/04
11/29/04
12/01/04
12/09/04
03/07/05
03/16/05
03/17/05
03/27/05
06/18/05
07/06/05
08/18/05
09/14/05
09/23/05
09/27/05
10/21/05
11/03/05
11/04/05
11/08/05
12/01/05
12/07/05
12/12/05
12/13/05
12/14/05
12/15/05
12/16/05
12/18/05
12/19/05
12/20/05
12/21/05
12/22/05
12/24/05
12/25/05
12/26/05
12/27/05
01/04/06
01/06/06
01/07/06
01/10/06
01/29/06
02/03/06
04/05/06
04/06/06
05/04/06
05/24/06
06/07/06
06/08/06
06/09/06
06/10/06
06/12/06
06/20/06
06/30/06
09/25/06
10/06/06
10/13/06
01/11/07
02/17/07
02/21/07
09/04/07

Digigami...

 

Site by web design long beach

Copyright © 1996-2006 Digigami, Inc. All Rights Reserved.

Made on a Mac