I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

December 15, 2006

High-Definition Video on the PC

Now that HD-DVD and Blu-Ray are starting to enter the market in earnest, I thought I'd revisit HD video playback on the PC. I'm seriously considering buying one of the $199 Xbox 360 HD-DVD kits and retrofitting it into my Home Theater PC .

I'll start by comparing three clips from the Microsoft Windows Media High Definition Showcase page. It's a tad out of date now-- most of these sample high-definition clips were mastered in late 2003 or early 2004, long before HD-DVD or Blu-Ray. But the bitrates and sizes are still representative.

Most of the clips had similar performance characteristics, so I chose one clip from each category.

T2 Promo
720p
T2 Promo
1080p
Step Into Liquid Promo
1080p
Resolution 1280 x 720 1440 x 1080 1440 x 1080
Bitrate 6.93 Mbps 8.44 Mbps 8.44 Mbps
Audio Codec WMA 9 Pro
5.1 channel
384 Kbps
WMA 9 Pro
5.1 channel
384 Kbps
WMA 9 Pro
2 channel
384 Kbps
Video Codec WMA 9 Pro WMA 9 Pro WMA 9 Pro

Note that I included the Step Into Liquid promo because it's the only clip on the WMV HD Showcase page that requires an abnormally large amount of CPU power to decode. I'm still not sure exactly why. The resolution is the same, and the bitrate looks comparable. You'll also note that Microsoft has an odd definition of 1080p. The official television resolutions break down as follows:

Pixels per frame
480i 704 x 480 interlaced 168,960
480p 704 x 480 progressive 337,920
720p 1280 x 720 progressive 921,600
1080i 1920 x 1080 interlaced 1,036,800
1080p 1920 x 1080 progressive 2,073,600

The official definition of 1080p is 1920x1080, so I'm not sure what Microsoft was thinking there. Interlaced means resolution is effectively halved vertically in time; frames alternate between odd and even lines each cycle.

inset_progressive_scan_1a.jpg  

Interlaced video modes are generally considered inferior to progressive video modes, and should only be used if you have no way to enable progressive modes. Interlacing has a lot of problems and should be avoided whenever possible.

I compared CPU usage in Task Manager during full-screen playback of each clip in Windows Media Player 11 on a few systems I have around the house. Note that DirectX Video Acceleration was enabled in each case.

Pentium-M 1.75 GHz Athlon 64 1.8 GHz Core Duo 2.0 GHz
T2 Promo
720p
terminator-wmvhd-720p-pentium-m.png
75% CPU, perfect
terminator-wmvhd-720p-athlon-64.png
50% CPU, perfect
terminator-wmvhd-720p-core-duo.png
25% CPU, perfect
T2 Promo
1080p
terminator-wmvhd-1080p-pentium-m.png
85% CPU, perfect
terminator-wmvhd-1080p-athlon-64.png
75% CPU, perfect
terminator-wmvhd-1080p-core-duo.png
33% CPU, perfect
Step Into Liquid Promo
1080p
terminator-wmvhd-1080p-liquid-pentium-m.png
100% CPU, unwatchably choppy
terminator-wmvhd-1080p-liquid-athlon-64.png
95% CPU, very choppy
terminator-wmvhd-1080p-liquid-core-duo.png
40% CPU, perfect

I have a sneaking suspicion the reason Microsoft redefined "1080p" as 1440x1080 had to do with performance. I doubt any PC system could play a true 1080p clip at the time these clips were mastered.

It clearly requires a lot of CPU horespower to render high definition video. Driving 1920x1080 requires a lot of grunt-- both in terms of pixel-pushing video bandwidth, and also in terms of CPU power for the advanced encoding used to keep the file size down on these massive resolutions. Dual core does this especially well, although it appears to do so by brute force load sharing rather than any special multiprocessor optimizations in the decoder. The mainstream PC is only now catching up to the performance required to watch high definition video.

All the video samples I cited are in Windows Media format. Windows Media, by all accounts, offers a very good next generation encoder, but it isn't the only encoder on the block. Both Blu-Ray and HD-DVD allow three different encoders:

Woe to the poor consumer who buys a HD-DVD or Blu-Ray disc encoded with the ancient MPEG-2 encoder. It'll look awful and take up a lot more room than it should. H.264 and MVC-1, however, are truly next generation encoders. They look better in less space, but they also require a lot more CPU power to decode. At least we have a few legitimate uses left for the ridiculous amounts of CPU power we've inherited over the years.

If you own a relatively new video card, it is possible to offload some of the video decoding chores from your CPU to your video card's GPU. But the configuration, drivers, and software necessary to achieve this acceleration is daunting. Anandtech found that, when properly configured, the latest video cards can significantly reduce the H.264 decoding burden on the CPU; ATI reduced it by half, and Nvidia reduced it by a fifth. But good luck getting everything set up in Windows XP. Here's hoping Windows Vista and DirectX Video Acceleration 2.0 enables hardware accelerated video decoding out of the box.

Posted by Jeff Atwood    View blog reactions

 

« Percentage of Chart Which Resembles Ms. Pac-Man Next-Gen DVD: Are Those Additional Pixels Worth Your Money? »

 

Comments

I understand that some HD video cameras capture at 1440x1080, and also this may the be resolution of some HD broadcasts, which are stuck with the often blocky-looking MPEG-2 codec.

Chris L on December 17, 2006 09:11 PM

1440x1080 as the same aspect ratio as a regular monitor (4:3) Widescreen monitor in 2003 wasn't common.

jay on December 17, 2006 10:27 PM

1440/1080 = 4:3 aspect ratio. So it might have to do with the specific camera they were using, or some such esoterica. IIRC, 4:3 isn't a valid HD ratio (and 1440X1080 is not a valid HD resolution either).

foobar on December 17, 2006 10:36 PM

Actually, vertical resolution is always used because horizontal can change drastically with aspect ratio. Like DVD, HD discs only support one resolution, but HDV cameras can record in 1920, 1440, and sometimes other ratios.

This doesn't make a damn bit of sense for T2, being natively 2.35:1, though.

Also, HD discs are probably going to use much higher peak bitrates than the old samples, which will make them even harder to decode. If you have a top-of-the-line system for an MPC, ffdshow can be enough, and CoreAVC manages to trump gpu-assists entirely in software, but I fully agree that hardware is the way to go if possible.

Good to see that ATI finally got real accelleration out the door, after simply pretending it worked and users are too dumb for months. btw, an updated Nvidia comparison with newer driver support:
http://www.pcper.com/article.php?aid=328

Foxyshadis on December 17, 2006 11:23 PM

> Actually, vertical resolution is always used because horizontal can change drastically with aspect ratio. Like DVD, HD discs only support one resolution, but HDV cameras can record in 1920, 1440, and sometimes other ratios.

By definition, HD must use a 16X9 resolution.

foobar on December 17, 2006 11:32 PM

Maybe something to do with an HDCAM original?

From Charles Poyntons excellent "Digital Video and HDTV - Algorithms and Interfaces", P115:-

"In Sony's HDCAM system, the 1920x1080 image is downsampled to 1440x1080... This is an internal representation only; there is no corresponding uncompressed external interface standard"

ISBN 1558607927 - www.poynton.com

Roddy on December 18, 2006 01:40 AM

The video has that resolution because it's in an anamorphic format:

http://gregl.net/videophile/anamorphic.htm

The actual video is encoded at 1440x1080 with a 1.33:1 aspect ratio. If you open one of the "1080P" video clips with ASF View, you can see in the header that the clip is defined as such. However, some of the video clips are true 1080P, like the Alexander trailer and the striker demo.

Regarding the Step Into Liquid trailer using a disproportionate amount of CPU, that could have something to do with the fact that it contains scenes that have constant change over the entire image. Encoded WMV9/MPEG4/H.264 video does not have constant, known CPU requirements; scenes with little motion require much less CPU than scenes with a lot of constant motion.

Beyonder on December 18, 2006 09:20 AM

Dude, just buy a friggin Mac and watch smooth HD at full rez. Heck, even Jim Allchin wants one. Reward competence.

DMB on December 18, 2006 09:54 AM

If you get a mac hoping for future HD playback, you'll be in for a very rude surprise: Quicktime doesn't support anything above _baseline_ AVC (and no VC-1 aka wmv at all right now). HD discs are encoded in _advanced profile_ of either codec, which is twice as hard to decode, and HD broadcasts are usually _main profile_, both of which Quicktime will simply refuse to decode, een if you have a mac pro quad to back it up. Then you're right back to using VLC and having no hardware acceleration.

All those famous Apple trailers? All baseline-encoded; by re-encoding into advanced you can cut 20-30% off their size without losing quality.

Foxyshadis on December 18, 2006 11:14 AM

> Quicktime doesn't support anything above _baseline_ AVC (and no VC-1 aka wmv at all right now).

Incorrect. See http://images.apple.com/quicktime/pdf/H264_Technology_Brief.pdf

> The initial implementation of Apple’s H.264 decoder conforms to all levels of Main
profile in progressive format. Apple’s H.264 encoder can create MPEG-4 files that
interoperate with both Baseline and Main profile-conforming decoders.

This is Quicktime 7 they're talking about.

And you can hardly complain about Apple not supporting WMV!

Also see drunkenbatman's summary which is lengthy but good:

http://www.drunkenblog.com/drunkenblog-archives/000312.html

Lastly I'll note that there are new wavelet-based video codecs like CRC-WVC coming down the pipeline. No idea what the resource requirements are going to be like, but you can't complain about better quality for a lower bitrate.

http://www.byte.com/documents/s=9988/byt1165682023304/

Alastair Rankine on December 18, 2006 02:08 PM

Excuse me folks, just do a search for "hdv 1440x1080". There are HDV cameras that record MPEG-2 files in 16x9 ratio with 1440x1080 resolution. The pixels just have to be stretched when played back. DVD's work the same way: they are 720x480 = 1.5:1, but always get stretched/squeezed to 1.33:1 or 1.78:1.

Chris L on December 19, 2006 10:09 AM

The movies you mention above are actually sold together when you purchase the DVD. They are 2 disk packs, the first being the DVD version, the second being the WMV HD disk.

I have most of these movies, and will discuss two of them, "Step Into Liquid", and "Standing in the shadows of MoTown".

Before we start, I will give you the punch line. The DVD contains a lot more detail than the WMV HD version.

I have a very special entertainment PC. On the computer side, it has NVidia 6600GT for video, Creative Soundblaster 4 Pro audio, but the DVD video side is outta control. I use a Sigma XCard which delivers a digital 720 x 480 DVD image to the H3D Holo3DGraph card, which has a Faroudja 2300 chip for all the exciting video stuff, and then I use the RGBHV output on the H3D card to deliver a perfect image matched to the result ion of the digital display.

So I have two video outputs, one using VGA, the other using the H3D RGBHV (which is VGA by any other name), and I can bring them together through a simple 2-into-1 box.

I also have 2 DVD players in this unit. So I can queue up both the WMV HD and DVD version of these movies so they are both playing at the same time in sync, and toggle the 2 into 1 video box between them to instantly switch from WMV-HD to DVD and back.

I used a 720P (1280 x 720) theater projector for my output, and used the native 720P from the WMV HD so that the resolution would match perfectly. The screen was 120 inches.

The color matching was perfect. If anything, the Faroudja DVD gave slightly better color, but in Step into Liquid, the color of the water was identical for both.

The end result was unbelievable. The DVD had more detail than the WMV HD. Both movies have lots of wrinkly old people: they are both histories of a genre, one surfing, the other MoTown, and in both movies, the WMV HD noise reduction removed all the wrinkles, and fine details like fly-away hair, whiskers, even freckles on the surfing kids.

The reality experience was much better on the DVD than the WMV HD version. Film naturally has some grain, which doesn't interfere with DVD transfer, but HD transfer requires a lot more noise reduction decisions to be made, and they are usually not made well.

Sound? Well, the sound tracks for both were Dolby Digital, and while DTS would have been better, the audio is riveting, particularly for those HUGE waves in Step into Liquid. You GOTTA see that movie on a bog screen. You will simply stop breathing at times.

So in summary, I am not preaching DVD forever, just that i am watching these guys very closely, and using the best technology to render DVD's in the meanwhile.

Of course, the studios want to move to new, proprietary formats as fast as possible, because people are buying these 2 TB disk servers, and moving their DVD collections to a hard disk archive. They can see the DVD market going the way of the CD market, which is shrinking, shrinking, and they want to jump out of the DVD format.

BUT HD ain't quite there yet. If you are a real enthusiast, spend up on an HD-DVD player and a decent projector. You will like the show. But if you want to watch EVERYTHING (that is, the existing library of 50,000 DVD's) in real quality, get Faroudja correction, done right at the DVD. When it is done at the projector, the signal is already analog and messy, and needs to be re-digitized for correction, and the results are inferior.

Peace.

Richard Gibbs on December 19, 2006 05:26 PM

Something is weird about your tests here, I have no problems playing the "Step Into Liquid" 1080p demo or any of the other 1080p demos on the wmvhd site on my AMD Athlon64 "Orleans" 3200+ 2.0GHz 512M with a Asus N6200TC graphics card.

The task manager actually seem to make the playback choppy, so try it without that or any other program started at the same time.

This computer is considered a budget computer, the graphics card is a budget card and doesnt even have a fan on it, it's not choppy at all, plays perfectly.

PL on January 7, 2007 02:00 AM

don't you know that...
bitrate...blue ray max 54Mbps
the most in the world...1Gbps
........
And where is Isa Ibnu maryam know???
.......
nanosusitita@yahoo.com

nn on February 19, 2007 07:16 AM

I an interested in HD (1920 x 1080p) for a way to view my photos. I take 35mm slides and digital photos. I have scanned my slides to about 20mp and my digital photos are 13mp. I am looking for a method to display them on my HD (1920 x 1080p) 46 inch LCD screen. My photos presently exist on DVDs (file sizes range from 4 to 14 MB each) and are in JPG format. I would appreciate any information that would assist me.

Norman Perry on March 26, 2007 01:11 PM

isn't 1440x1080 a computer screen that is widescreen. That is to say, computer screens that are wide are NOT 16:9 but 16:10 Thus 1440x1080 is a computer widescreen ratio.

levi freeman on October 5, 2007 06:59 AM

>I an interested in HD (1920 x 1080p) for a way to view my photos. I >take 35mm slides and digital photos. I have scanned my slides to about >20mp and my digital photos are 13mp. I am looking for a method to >display them on my HD (1920 x 1080p) 46 inch LCD screen. My photos >presently exist on DVDs (file sizes range from 4 to 14 MB each) and are >in JPG format. I would appreciate any information that would assist me.

A DVD player won't output into high definition even if you have the high def files. What you could do is connect your computer to your LCD screen and display them that way. (Make sure you computer supports a high def output and use the connectors as well.)

James on October 24, 2007 06:57 PM

HD, by definition is 16x9 aspect ratio for its image format, yes, but that doesn't take into account the PIXEL aspect ratio, which varies by HD format.

Nick on November 28, 2007 11:29 AM

HD-DVD is dead, go for the Blu-Ray

mike on March 18, 2008 02:53 PM







(hear it spoken)


(no HTML)




Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.