facebook rss twitter

Review: ATI Avivo Video and Display Engine - Technology Discussion

by Ryszard Sommefeldt on 20 September 2005, 00:00

Quick Link: HEXUS.net/qabsw

Add to My Vault: x

Capture and Encode

Capture

Avivo Video Path - Capture

The Capture stage of Avivo is the most obvious one in terms of what you think should be done. Ponder it for a second and you'll likely come up with what I'm about to tell you. The Avivo video path when concerned with capture is all about getting video into the system digitally. For a digital broadcast format being tuned, that's pretty easy; the capture hardware (550 PRO for the time being) just tunes to the transmission signal and demodulates the video data from the signal that carries it.

ATI have recently started providing DVB-T tuners on All-In-Wonder hardware that can capture digital video broadcasts which use their own NxtWave hardware for demod. ATI will use the same technology blocks on their R5-series hardware when necessary. For analogue video there's then an extra analogue-to-digital (ADC) step and filtering to get that video data into the digital domain and processed before passing to the Encode stage.

ATI use ADCs with 12-bit precision to get the analogue signal converted into digital frame data. ATI's own Rage Theater 200, itself no slouch in terms of analogue video processing, possesses a 10-bit ADC for conversion. The extra resolution allows more accurate conversion with less loss of signal data, preserving the tuned and demodulated signal as much as possible as it's passed further down the video path into the filter hardware.

Image filtering

Frame data is then passed through filter hardware on the Avivo capturing device. First of all, the comb filters' job is to clean up the frame data by analysing the frame (or a frame ahead if the comb filter is 3D, using time as the 3rd dimension) and applying the filtered signal back onto the existing one, removing high frequency artifacts and other visual problems. The filter separates the image data into luma (black and white) and chroma (colour) components as it works, to determine what colours the video field should be and how bright they are.

Noise amplification can also be applied at this stage of the video path to boost the signal. The gain control is used to ensure large brightness changes across groups of frames doesn't happen. Avivo uses analysis to do that on the fly across frame pairs, changing luma if needed.

Capture Points

The things to take from the Capture stage are the new 12-bit ADC in Theater 550 PRO versus the older 10-bit resolution implementation in Theater 200 and the implementation of 3D comb (analysis of future frame data to affect the signal data of the first, to improve quality) over the 2D-only filter in older hardware as the quality improvements that define the Capture stage of Avivo.

Don't forget that there's audio capture including hardware AV-sync in 550 PRO, too. Oft neglected (and sadly by us for this article, too), the audio side isn't a strictly a part of Avivo but the two will go hand in hand.

Encode

Avivo Video Path - Encode

The heart of Avivo's Encode stage is a native MPEG2 processing engine. The capture stage with 550 PRO generates raw video data which is then processed by the chip into an MPEG2 digital stream using advanced encoding techniques. Additionally, the R5-series of GPUs now gains the ability to assist with the transcode of video to other formats. It's not apparent if the format list that ATI can support is fixed, but assume a level of programmability, especially since the basics of video transcode are pretty much the same for all popular broadcast and consumer formats.

H.264

ATI's big push with Avivo and hardware transcode assist is H.264. More commonly known as MPEG-4 Part 10 or MPEG-4 AVC (Advanced Video CODEC), H.264 (it's quicker to type than MPEG-4 AVC) is a product of the ITU-T Video Coding Experts group and is set to be the dominant video format for broadcast transmission, the upcoming Blu-Ray and HD-DVD physical disk formats that will replace DVD and also a wide range of other consumer devices not least Sony's handheld games console PSP.

MPEG-4 AVC is starting to replace MPEG-2 (H.262) in consumer electronics (remember, for two high-profile examples, that Microsoft's MCE system is still H.262 based, as are DVDs) due to a higher quality at a lower encoded bitrate. Being able to squeeze higher quality video into a smaller transmission bandwidth (be that over the air via DVB-T or as a file you download onto your PC) is an obvious upside. The downside is that there's a higher computational cost in generating it.

Think about encoding H.262/MPEG-2 for a minute first of all. MPEG-2 is what you'll find in current broadcast DVB-T in the UK and on DVD video disks that have been around for the last decade or so.

First the encoder is used to generate macroblocks. The macroblock arrays define the video data for that frame. That video data is then used as input to encode the next frame (motion compensation), then discrete cosine transformation (DCT, of which hardware implements inverse DCT to decode H.262) results in values that help define that frame. Those values are encoded and compressed losslessly using Huffman coding.

Whether you care to understand what those basic steps (generate macroblocks, motion compensation, DCT, run-length encoding + Huffman) are, it's important to note that they can be computationally cheap. Even today's basic consumer processors can encode DVD-quality MPEG-2 video much faster than it can be captured. Implementing it in silicon is therefore easy for IHVs like ATI. Therefore its choice as the base encode format is sensible.

H.264 is much more computationally expensive however. More encoding chatter follows, don't worry if you don't understand what each section means, I'm simply illustrating all the extra computation needed for H.264.

Firstly, H.264 allows the use of more than one or two prior frames when generating the initial frame data for the frame being encoded. You've got 5-bits for that now, or 32 frames back in the frame chain that you can feasibly analyse. That step of encoding can therefore be up to 16 times more expensive (assuming the same analysis, which is often more expensive in itself) than H.262 encoding using B-frames (2 prior).

Then the motion compensation algorithm can have variable block sizes, rather than the fixed blocks in H.262. Choosing the right block size is more expensive. H.264 then defines antialiasing of macroblocks, which H.262 doesn't. More computation for that. 1/8 pixel sampling can be done for motion compensation analysis, which isn't part of H.262. Again, more processing power. More advanced DCT is performed to implement in-loop deblocking. The list goes on and on and is an article in itself.

Using just your CPU for encode can result in real-time per pass (you usually want two passes) for PSP-class video (240-272 scanlines, much less than the 720 required for HD video), but really only with something as powerful as an Athlon FX-57. Ouch.

Therefore you can see why, when H.264 is attempting to do a Dr. Evil. and take over the world, that it'd be prudent for your PC to give you a hand encoding your own. Avivo implements pretty much the first half of the steps needed to encode H.264 with quality enhancement from stuff like CABAC. Good news for those looking to process H.264 as an output format, I think you'll agree.

Transcoding into H.264 and other formats

Avivo gives transcode assist to H.264 AVC, H.262, VC-1 (standards-based superset version of WMV9's basic video CODEC), WMV9 PMC (portable media center version of WMV9 for low-res, low computational power devices), MPEG-4 SVC (simple version of H.264, less computationally expensive) and the latest DivX (MPEG-4 SVC, essentially). That also implies some support for Nero Digital (H.264 ASP and AVC, depending on output profile) which is playable on some standalone decks using their container forma and whose software has support for Sony's PSP.

The actual functional encode assist that you get with an R5-series GPU we'll investigate further after the first of the R5 series products launches.

Encode Points

The key thing to take from the Encode stage is support for H.264 AVC encode in hardware (although not the entire set of stages). That's the really big thing given its pervasive nature in upcoming consumer electronics like XBox360, PS3, PSP, HD-DVD, HD broadcast transmissions via DVB-T, and much more. Assist for the other mentioned CODECs follows on from the H.264 AVC focus since they're all, really, just one big happy family in terms of processing. That's a generalisation of sorts, but it'll do for explaining Avivo.

So your R5-series GPU will give you a hand processing hard-to-compute-with-a-CPU video. All good, ja? And if you're not encoding video, you're decoding it.