Related Articles

HDV editing using Avid’s Liquid 7.1, Part 4

Aug 25, 2006 10:38 AM, Steve Mullen


         Subscribe in NewsGator Online   Subscribe in Bloglines  

In the previous installment, we began looking at how multiple formats are handled within a Sequence. (Please review Part 3 as it has been revised since it was posted. See Part 1 here and Part 2 here.) (Avid supplied the upper digital value of “240” specified in my story. This may have been an error or a correct reflection of Avid allowing 2 IRE additional headroom. Typically the upper value is “235.”)

In this installment, we will look at the exact role that codec choice plays in a sequence preset. We are going to confront one of most fundamental debates in working with HDV — should we edit it “natively” or by using an “intermediate” codec?

HDV can be input as compressed digital data (via FireWire), uncompressed digital data (via HD-SDI), or uncompressed analog data (via analog component). PCI cards such as those sold by Blackmagic and AJA support the latter two paths. The following Table shows these three paths.

 

Compressed Digital Data

Uncompressed Digital Data

Uncompressed Analog Data

Path

FireWire

HD-SDI

Analog Component

Process

 

 

A/D Converter

Form

IBP-frame & MP2

Uncompressed Digital Data

Process

 

Decode

Audio

 

Digital 48kHz

Video

 

Digital YUV

Process

 

4:2:0 (only MPEG-2) or 4:2:0 to 4:2:2

No Codec

 

Uncompressed

MPEG-2

 

I-frame

MPEG-2

 

IBP-frame (ready for DVD)

DVC

 

DVCPRO HD (downsamples resolution)

JPEG

 

PhotoJPEG (draft only)

CineForm

 

Wavelet

Canopus

 

HQ HD

Avid

 

DNxHD

Bits

8-bit

8-bit or 10-bits (not MPEG-2)

Sampling

4:2:0

4:2:0 (only MPEG-2) or 4:2:2:

Type

Native

Intermediate

Storage

Disk File

Note 1: No matter the connection path, recorded HDV is 8-bit, 4:2:0 sampled data.

Note 2: Green indicates highest quality; Blue indicates high quality; Orange indicates moderate quality; Red indicates low quality. Yellow indicates a direct path.

As the chart indicates, there are many intermediate codecs available. None of them increase the quality of HDV — in fact, with the exception of uncompressed video, all require an additional compression step after HDV has been decoded. Moreover, intermediate codecs (with the exception of IBP-frame MPEG-2) are less storage-efficient than is HDV.

While some consider interpolating 4:2:0 sampling to 4:2:2 sampling an increase in quality, this conversion can also be performed by an NLE when HDV special effects are rendered. Likewise, placing 8-bit data within a 10-bit word does not increase image quality.

Using an intermediate codec, however, does offer four advantages:

Ø During the transcode, it is possible for bad frames and broken timecode to be repaired.
Ø When HDV, an interframe codec, is transcoded to I-frame MPEG-2, the intraframe format can be decoded efficiently, thereby improving performance. Apple’s AIC codec is an example of an I-frame MPEG-2 format.
Ø All intraframe, intermediate codecs can be decompressed with great efficiency. This enables more streams of video to be mixed together. However, because each frame requires greater data, total disk throughput will be much larger than what an equal number of HDV streams would require.
Ø Many projects require video be processed sequentially by several applications. With the exception of PhotoJPEG, intraframe, intermediate formats are more robust than HDV. Obviously, uncompressed video is the least fragile of these codecs. However, Avid, Canopus, and CineForm codecs are all ideal for tasks that require multiple compression cycles.

When a frame of video is needed by an NLE’s display or effects engine, the appropriate codec is automatically employed to decompress an intermediate format or decode MPEG-2 to uncompressed YUV data. (If the source is already uncompressed, it is used directly.) There is a little-mentioned process involved in generating the YUV digital video. HDV’s 4:2:0 sampling is interpolated to 4:2:2 or 4:4:4. For an NLE that uses the YUV color space, this process occurs after the decompression or decode. For an NLE that uses the RGB color space, this process occurs during the conversion from YUV to RGB. Because HDV employs symmetric color sampling, interpolation is straightforward.

For display on a computer monitor, YUV is converted to RGB. However, if your computer has a board that outputs analog component or HD-SDI, the data are not converted, thus remaining in YUV colorspace.

When multiple streams of video are combined (mixed) by a special effects engine, the digital video streams, either RGB or YUV, are processed as either 4:2:2 or 4:4:4 video. The output is, of course, also 4:2:2 or 4:4:4 video. This video, either RGB or YUV, is then processed appropriately for internal and/or external display.

Depending on the number of streams, the nature of the codec(s) employed, the number and complexity of the effects applied, and both the computing power and disk throughput of your computer, the output of the display engine or effects engine may be previewed:

Ø only after some, or all, of the effects have been rendered.

Ø at less than full frame rate
Ø at near full frame rate
Ø at full frame rate

These performance differences must considered when:

A) The editor plays back the timeline
B) The timeline is exported to tape

When exporting HDV, realtime export is not possible. However, using today’s powerful computers, realtime timeline playback is sometimes achievable.

Preview render files are the key to full-frame-rate playback when realtime previews are either not possible or when preview playback performance is poor. Preview files can be generated three ways:

1. Rendered results are compressed and stored in a file. This is the optimal codec option because DVC-based codecs require have moderate computation and disk requirements.

2. Rendered results are simply stored in a file. Obviously, this option requires no computation and so is very fast. Unfortunately, with HD, both disk throughput and storage requirements are huge.

3. Rendered results are encoded and stored in a file. Native MPEG-2 encoding is compute-intensive, although both disk throughput and storage requirements are minimal.

When you specify a Sequence codec, you are specifying the codec that will be used when a preview file is generated. This codec is typically also the default export codec.

Tip 7: Liquid supports the options 2 and 3 for preview files: previews using the “2vuy” uncompressed, 4:2:2 codec and previews using the MP@H-14 HDV codec.

So does it make a difference whether a native or an intermediate codec is employed? The answer is “it can, but need not.” To understand this answer, we must consider is how an NLE utilizes preview files. Here again, there are three options.

1. A preview file is decompressed/decoded and played back at full frame rate.

2. A preview file is decompressed/decoded and processed by additional special effects.

3. A preview file is decompressed/decoded and mixed, using special effects, with additional layers of video.

NLEs such as Liquid and FCP never utilize the latter two options. Preview files are never used for anything except playback.

Native HDV preview files — having gone through two cycles of encoding and decoding — will suffer more than will high-quality intermediate codecs. An uncompressed preview file — assuming your system can handle it — offers little loss in quality as there has been only one MPEG-2 encode and decode cycle. The other high-quality intermediate codecs have undergone one MPEG-2 encode/decode cycle and one compression/decompression cycle.

Obviously, those NLEs that (to save render time) use preview files for further computation (options 2 and 3) definitely are sensitive to whether preview files are native or not. The use of a native codec can result in a severe loss in quality. However, by deleting preview files whenever you need to view a Sequence at maximum quality, the NLE will generate new frames from the source(s).

Exactly the same logic applies to exporting a Sequence. FCP and Liquid never use preview files during export. Both NLEs generate every new frame from scratch. Moreover, those NLEs that default to using preview files during export can be forced to not do so.

With FCP and Liquid, when one uses realtime previews, there is no quality difference between native and intermediate editing. However, when you need to render previews, the use of an intermediate codec does offer slightly greater preview quality.

With other NLEs, performance is the primary advantage of editing using an intermediate codec. Performance is increased in two areas. First, given adequate disk throughput and an effects engine engineered for the intermediate codec, more streams can be handled in realtime. Second, preview files, which took time to render, can be reused. And, when these files are reused, quality is minimally impacted.

Now that we understand how multiple SD and HD formats are processed within a Timeline, in the next installment I’ll show you how Liquid can automatically handle different aspect-ratio video in the same Sequence.

© 2008 Penton Media, Inc.

Browse Back Issues
BROWSE ISSUES
   
DCP
November 2008
DCP
October 2008
Millimeter
Sept/Oct 2008
DCP
September 2008
DCP
August 2008
Millimeter
Jul/Aug 2008
Back to Top