Smart GOP Splicing, Part 2 | www.creativeplanetnetwork.com
RSS
Home
Loading

Smart GOP Splicing, Part 2

In the last edition of HDV@Work, I examined the promise of an encoding feature called Smart Splicing, which is a feature of Avid Liquid that can increase the efficiency of MPEG-2 encoding. This should hold special interest for HDV producers, who in the next year will be called upon to deliver high-definition DVDs.

To learn more about Smart Splicing, I created a simple simulation. The Table below shows a yellow cell representing the last B-frame before the outgoing (pale green frames) GOP, and the rightmost yellow cell represents the first I-frame after the incoming (pale blue frames) GOP. The pale green and blue cells represent two un-trimmed, 6-frame, Closed GOPs.

Notation in the cells indicates that each I-frame is 1.44Mb; each P-frame is 1/2 of an I-frame (0.72Mb); and each B-frame is 1/4 of an I-frame (0.36Mb). The total data in one GOP is 3.6Mb; therefore, the bit rate for five GOPs (one-second) is 18Mbps.

Click on image to enlarge

According to the Sarnoff patent mentioned in the last edition, “With respect to rate control (which ultimately determines picture quality of the transition clip…)…due to masking in the human visual system, a small degradation in video quality at a scene change is often imperceptible to a viewer.” To explore this concept, I included a green “quality” indicator in my simulation.

The Table below shows the progressive shortening of outgoing and incoming GOPs. The red percent indicates the amount of bit rate overload caused by the trim — which in turn becomes the amount by which data for each frame are reduced by increasing compression. In the first section of the Table, the final B-frame of the outgoing GOP and the initial I-frame of the incoming GOP have been trimmed away.

Click on image to enlarge

Values in blue are the reduced data for each frame. (To save space, not all permutations are presented.) The Chart below shows the increased data rate caused by trimming.

Given the 18Mbps bit rate, each GOP carries 3.6Mb; therefore, the average amount of data for each frame is 0.60Mb. The blue cells'' values are average data for all frames within the two transition GOPs, plus data from the preceding (ending with the yellow B-frame) GOP and the following GOP (beginning with the yellow I-frame).

The Chart below shows these values based upon GOP lengths of 1 to 6 (untrimmed GOP). The average data per frame (shown in pink) is 0.622Mb, which yields a data rate of 18.64Mbps. Therefore, despite the significant increase in source data caused by trimming, a Smart Splicer keeps data output quite consistent.

The Table''s green percent value indicates post-trim image quality. Quality decreases significantly when both GOPs are trimmed. (See the end of the article for alternate trimming examples.) If, however, a GOP''s structure is optimized to better match its shorter length, quality can be increased. Below the orange P indicates the alteration.



Below you will see: an IBB structure changed to IBP and an IB structure changed to IP. (The former alteration enables the B-frame to truly be bi-directional.)

Click on image to enlarge

The data values in the previous Chart reflect GOP optimization. In order to make GOP alterations rapidly — and other splicing decisions — Liquid supports an “index” file for each HDV file. The index provides relevant data for each frame and GOP.



The “smarter” the splicer, the higher the splice quality. The Chart below shows Quality based upon GOP length.
Chart 3.jpg

Remember that all Charts and Tables are based upon my simulation and do not represent the actual performance of any real-world splicer.






Smart GOP Splicing Limitations


While it is clearly possible to implement a Smart GOP Splicer, there are limitations to its use:

1. When the splicer determines that a GOP will be created that is shorter than allowed by the MPEG-2 format, it will not execute a smart splice. Encoders have two parameters: maximum length (N) and minimum length (M).

2. When the splicer determines that the quality of a spliced GOP will fall below an acceptable level, it will not execute a smart splice. For example, if the minimum quality level were 50 percent, the sample below would not be smart-spliced.

Click to enlarge image

Below, the worst case, where all but one frame has been trimmed from each GOP. This results in three I-frames in a row. To keep the data rate at an acceptable level, compression must significantly be increased for the two I-frames. This yields a significant decrease in quality.

Click to enlarge image

Whenever GOPs do not meet the criteria to be smart-spliced, they must be decoded and recoded. Therefore, even with a cuts-only timeline, there may be a need for a significant amount of conforming during export.

Likewise, whenever effects have been applied, all rendered frames must be conformed. In the experimental production I created using Liquid, almost every shot was color-corrected, so Liquid''s ability to smart-splice provided no advantage to the final export.

Despite these limitations, a Smart GOP Splicer provides an advantage in two types of productions: news, where effects typically are not applied, and rough drafts of long-form works. Both are production genres in which Avid has a very strong presence.

Bottom line, Smart GOP Splicing is not a panacea for the long export times required for high-definition MPEG-2. Moreover, the situation is far worse for the export of both VC-1 and any type of AVC. AVCHD encoding is reported to be about seven times slower than HDV encoding.

The need for high-speed encoding exists even when the source is not HDV, ProHD, or XDCAM HD. Editing with DVCPRO HD, AVC Intra, HDCAM, HDCAM SR, or even uncompressed: all require encoding to create high-definition DVDs. Until a solution is developed, high-definition export is going to be a painful process.

Additional Trimming Examples


The Table below shows the progressive shortening of an outgoing GOP. In the first section of the Table, the final B-frame has been trimmed away.

Click to enlarge image



The Table below shows the progressive shortening of an incoming GOP. In the first section of the Table, the initial I-frame has been trimmed away.

Click to enlarge image

Note that in all cases, quality remains above 50 percent. Thus, were the quality threshold set at 50 percent, all samples could be smart-spliced.