Hallelujah! God [Allah/Budha/FSM] be praised! Something has happened that I’d completely given up hope on. A working, released and effective h.264 hardware decoding solution for linux has been let loose, from the most unlikely of sources, nVidia. OK, so maybe they’re not the most unlikely of sources, that’d be someone like Motorola or something, but given their recent history, it was unexpected.

To put this in perspective, I’ve had a fairly serious linux HTPC setup for about 3 years and it has been our sole source of TV/Music/Video (We don’t own a stereo or DVD player) for the past 18 months or so. Whilst CPU power has incresaed to the point where HW h.264 decoding is less important, when I started, it (or more generally MPEG4 decoding) was the holy grail. High Def h.264 video was virtually unheard of as, until the hardware decode support arrived for Windows, there was no way to play it. Now the two major players, ATI and nVidia, have each had their own implementations of this, UVD and PureVideo(HD) respectively, for quite some time now, but neither released anything for linux. Recently nVidia even went as far as removing XVMC support entirely. Intel have had patchy implementations, even for Windows, but it has only been their newest G45 chipset that has made HighDef decoding possible (Even the G43 and G41 chips don’t do it). Now sure, you might be saying “Who cares? We have fast CPUs!” but the fact of the matter is that to play 1080p content properly, you need at least an E8400 Intel CPU and if anyone tells you different then they haven’t played full resolution/bitrate files. A little while ago my bro in-law gave me a 720p camcorder recording of my nephew and, most embarrasingly, as the whole family sat around we got to watch a slideshow of frames as a 2Ghz Core2 Duo struggled to play it. Clearly, this is an area that linux has severely lagged behind Windows on.

There have been a few false starts along the way for linux (Don’t even get me started on the Via implementation of it!) but now nVidia have released a working, albeit beta, driver and patches for mplayer, ffmpeg etc. Better yet, it actually seems to work! It would be remiss of me not to mention the ATI beta driver that was also released recently with support for something they’re calling XVideo Bitstream acceleration (XvBA), but as no one actually seems to be able to get this to do anything, yet alone produce any meaningful benchmarks, it is a curiousity at best. So, it seems, nVidia take the prize in this pony race.

This puts me in a bit of a bind. A few months ago when my HTPC hardware was giving up at life, I decided I’d stick with Intel as they’re fairly good Open Source players and at the time seemed like the most likely to get out a working h.264 implementation. Now, as Murphy would have it, they’re the last of the major contenders to release something. Now I know they’re still working on it, Keith Packard has spoken about it numerous times and there’s an upcoming talk at linux.conf.au that claims it will provide a working demonstration, but the fact remains that its not here yet. The one thing preventing me from running out and buying a cheap nVidia card right now is the fact that the Intel implementation will be open source.

This brings me around to another issue, standards. Whilst XvMC for MPEG2 was a bit of a mess and never worked the same way twice, at least it was a standard for everyone to converge on. Now it appears as though each of the vendors will have their own way of doing MPEG4, each requiring different patches and doing different things. This is a real shame. After waiting 2+ years, a period of time where any one of the vendors could’ve created a defacto standard simply by getting something out there, we’re now in a position where 3 different, and likely incompatible, solutions get released all around the same time. Sure, people are working on CUDA and Gallium stuff, but given the way nVidia have implemented PureVideo its clear to see that’s where things are heading.

So, in summary, YAY! Finally a sigh of relief for something that has been missing a LONG time. I hope that, if nothing else, its some motivation for Intel to get an open source solution out the door, but until then, a big THANKYOU to nVidia.

[UPDATE] I just noticed that Andy Ritger from nVidia posted a note to the MythTV dev mailing list with some further details: http://www.gossamer-threads.com/lists/mythtv/dev/357332