Related Articles

Smart GOP Splicing, Part 1

Dec 8, 2006 4:26 PM, By Steve Mullen


         Subscribe in NewsGator Online   Subscribe in Bloglines  

Those who have been recording their productions back to HDV know how excruciating the wait can be for an export-to-tape. Many have been able to avoid the long export process by exporting only to SD media. This can be accomplished in two ways. With Sony HDV camcorders, HDV tapes can be downconverted to high-quality DV25 by the camcorder or VTR. This enables editing to be performed entirely in SD. An export to a DVD requires only MPEG-2 encoding of an NTSC or PAL DVD. Alternately, 720p or 1080i HDV can be edited, but the final Sequence can be downconverted and encoded to MPEG-2 for an NTSC or PAL DVD.

As the requirement for high-definition DVD as a deliverable develops during 2007, there will be no way to avoid HD MPEG-2 encoding. What you might not realize is that the current tools for creating Blu-ray and HD-DVDs import “HDV.” Which means your NLE’s current HDV export tools typically can be used.

Below you will find an example of a segment of 720p HDV. Note the perfect series of 6-frame GOPs.

After editing, the timeline will show that GOP structures have been corrupted wherever there has been an edit. An example, using 1080i, 15-frame GOPs is shown below.



In order to obtain a perfect GOP series for export as HDV, the simplest procedure is to simply begin at the start of the Timeline and decode every GOP to a sequence of I-frames. Then each series of 6, 12, or 15 I-frames are re-encoded. (JVC’s 50/60p ProHD employs 12-frame GOPs.) Obviously, the decode and encode of every high-definition frame in a Timeline takes an enormously long time — even with today’s multi-core processors. The decode and encode also lowers image quality. If only there were a way to avoid decoding and recoding every frame when “conforming” the Timeline during export.

When you watch ATSC HD, at both the network and local level, MPEG-2 Transport Stream sources are switched in realtime with frame accuracy. Only the last GOP of outgoing MPEG-2 video and the first GOP of incoming MPEG-2 video are decoded and recoded. This prevents the image degradation that would result from decoding and recoding the entire bit stream. Why couldn’t a software version be implemented to accomplish the same task during the export of a timeline?

FAST, which was bought by Pinnacle, which has been bought by Avid, developed a version of such technology for its "blue" NLE, called Smart GOP Splicing. Avid Liquid 7.1 continues to incorporate this technology.

Logically, GOP splicing involves shortening an outgoing GOP, or shortening an incoming GOP, or shortening both GOPs. As long as the MPEG-2 format allows GOPs shorter than 6, 12, or 15 frames, it would seem the task is a simple one. Here are two examples:

Shorter Outgoing:
IBBPBB-IBB } PBB-IBBPBB-IBBPBB (cut-off PBB)
IBBPBB-IBB-IBBPBB-IBBPBB (splice two GOPs together)

Shorter Incoming:
IBBPBB-IBBPBB-IBB { PBB-IBBPBB (cut-off IBB and decode PBB to III)
IBBPBB-IBBPBB- III-IBBPBB (encode III to IBB)
IBBPBB-IBBPBB-IBB-IBBPBB (splice two GOPs together)

It sure looks simple. Nevertheless, look again at the spliced series of four GOPs. You will note the I-frames of the last three GOPs have moved closer together.

HDV, because it is written to tape, employs CBR (Constant Bit Rate) encoding. The encoder, therefore, keeps its output data rate as constant as possible. To meet this goal, it will sacrifice image quality — by increasing compression — when presented with a complex frame (720p) or field (1080i). Likewise, it will decrease compression — which increases image quality — whenever a frame or field is simple to encode.

Obviously, despite an encoder’s best efforts, there is no way to output a truly constant bit rate. Therefore, the encoder’s output is fed into a FIFO (First In First Out) buffer. (This is the “VBV buffer.”) The recording system then pulls data from the buffer at a constant rate. The goal is to prevent buffer overflow or buffer underflow.

Relative to P- and B-frames, I-frames push a huge quantity of data into the buffer. Normally, these peaks are smoothed by the P- and B-frames that occur before the next I-frame. Whenever I-frames occur too frequently, however, the buffer can overflow.

One way to prevent this error, as described in a Sarnoff Corporation patent on a broadcast MPEG-2 splicer, is “to adjust the VBV levels of the from-stream and to-stream…so the resulting spliced transport stream will not suffer overflow, underflow, or other undesirable buffer memory behavior.” You can think of this process as a feedback loop that adjusts encoder compression level based upon current VBV buffer “fullness.”

Smart GOP splicing is a promising concept for outputting high-quality HD, and we will examine a simulation of Smart GOP Splicing in the next edition. Editor's note: Because of Christmas, the next edition of HDV@Work will appear in your inbox a week early, on Monday, December 18.

© 2008 Penton Media, Inc.

Browse Back Issues
BROWSE ISSUES
   
DCP
August 2008
Millimeter
Jul/Aug 2008
DCP
July 2008
DCP
June 2008
Millimeter
May/Jun 2008
DCP
May 2008
Back to Top