GPU Accelerated H.264 Decode

Both AMD and NVIDIA have fully accelerated H.264 decode on their GPUs and chipsets with integrated graphics, something Intel just recently added with G45. Apple has historically done a terrible job of taking advantage of GPU accelerated video decode features in its OS, which is partly why it took us so long to get somewhat acceptable deinterlacing in Apple's DVD app, despite solid deinterlacing support by the GPU vendors.

Part of the problem is that unlike on the PC platforms, companies like ATI and NVIDIA don't write the entire driver for Mac OS X. The GPU vendors provide the hardware interface portion of the driver but Apple handles much of the rest. It's up to Apple to take advantage of the various features supported by the GPU, and most of them aren't high on Apple's priority list.

With Apple heavily pushing H.264 as the codec of choice and offering high bitrate HD H.264 movie trailers at www.apple.com, the move to NVIDIA's GeForce 9400M appeared to be the perfect time to take advantage of GPU accelerated H.264 decode. For the first time ever, Quicktime will use the GPU for the majority of the decode pipeline when playing back H.264 content.

To test the impact of the GPU offload I measured CPU utilization while playing back the 160MB 1080p trailer of The Spirit from Apple's movie trailers website:

  New MacBook Pro 15" Old MacBook Pro 15"
CPU Utilization 10% 30 - 50%

 

The old MacBook Pro saw 30 - 50% of its dual core Core 2 Duo 2.5GHz CPU used up to decode the trailer, while the new MacBook Pro only needed 10% as the rest was done on the GPU. The GPU is also a more efficient place to perform H.264 decoding so you'll actually see an increase in battery life when playing back hardware accelerated content.

As OS X still lacks any official Blu-ray support, the H.264 decode acceleration isn't very useful beyond playing these sorts of files, but it's a definite start. It's also unclear how easy it will be for 3rd party developers to tie into the GPU acceleration hooks or if Quicktime will be your only hope for that.

Performance Battery Life: Take Two Steps Forward, and Two Steps Back
Comments Locked

66 Comments

View All Comments

  • plonk420 - Thursday, October 23, 2008 - link

    could anyone test this with the new (and even old) Mac Book Pro to test for CPU usage?

    http://www.megaupload.com/?d=ADFYX083">http://www.megaupload.com/?d=ADFYX083

    h.264 high profile (QT supports this now, right?) level 4.1 720p60, fairlight/the black lotus's demo Only One Wish (2nd place at Intel's second demo compo) .. has some really handsome bitrate spikes :D ~mid 20s mbps spikes (but not as good as the 60mbit spikes in a 6 or 8mbit (average) encode of ASD's Antisize Matters)
  • michaelheath - Thursday, October 23, 2008 - link

    Having spoken to a few Apple developers I know, the reason for this oddity is Nvidia's software implementation for Mac OS 10.5. While the ideal situation was for them to be able to switch on the fly, the agreement between Apple and Nvidia to develop for the new MacBooks and MacBook Pros happened so quickly it left little time to create a proper application that would allow for this (think of how you had to restart your computer to turn SLI on or off: same slapdash type of programming).

    The hope is that quick-toggling between integrated and dedicated graphics will come with Mac OS 10.6 as it may be too large of an update to patch Mac OS 10.5. It also makes sense in this aspect as Mac OS 10.6 also includes OpenCL GPGPU algorithms, which Nvidia is already promoting and developing under their CUDA platform.
  • RDO CA - Thursday, October 23, 2008 - link

    On my Thinkpad T-400 with switchable graphics all that is needed to switch is to go to the taskbar icon and click switchable graphics and choose what you want and the screen goes dark for a second and thats it.
  • cliffa3 - Thursday, October 23, 2008 - link

    I'll test it sometime this week, but on my Lenovo T61 it seems like I get much more life out of Ubuntu than I do Vista 64-bit. Could be a windows thing in general, not just something that OS X does better.

    How was the battery life comparison between XP and Vista?
  • PilgrimShadow - Thursday, October 23, 2008 - link

    Anyone know if the 9400M and 9600M appear in Vista's Device Manager?
  • TallCoolOne - Thursday, October 23, 2008 - link

    I bought the new 2.0GHz MacBook last week as my first Mac and can say I'm not disappointed. The whole chassis feels as solid as, well, a block of aluminum! As Anand said, it feels like you get what you paid for. I actually like the multi-touch gestures, such as swiping with 3 fingers to flip pages and for back/forward when web browsing. I'd like to see iTunes also support that gesture. Two finger scolling is another great feature not mentioned in this article. What I don't like though is the stiffness of the mouse click. It takes far more pressure than any mouse and that required pressure is uneven in different areas of the trackpad. Pressing near the top requires more pressure than near the bottom. As for lack of standard SSD, Anand, perhaps you're a little too spoiled by that speed! I would not expect that as standard on even the fastest MacBook Pro at current prices. That is, unless you'd like to see the asking price for a MBP $500-600 more than it is now.
  • vlado08 - Thursday, October 23, 2008 - link

    It is interesting was vista side panel running during the test. Also was this fresh install of vista os. If it was fresh then was the indeing enabled.
  • vlado08 - Thursday, October 23, 2008 - link

    edit indeing - indexing
  • jmpt2 - Thursday, October 23, 2008 - link

    Very interesting to read your conclusions about better power management in MacOS vs Vista. This matches my experiences running Vista on the BootCamp partition of my Core Duo MacBook, and is the first time I've seen this discussed anywhere on the web. I found that with a main battery in quite poor condition after two years constant use, it became impossible to use Vista on battery power for more than a minute without the battery deciding it was empty and putting the machine into sleep mode. Under MacOSX the system could still be used for 30min+ (light use) before the same thing happened.

    I'd come to the conclusion that Apple were deliberately playing games with the ACPI tables to confuse Vista's power management code and make their own OS look better. This seemed to be supported by the fact that Vista is unable to correctly detect the charging state on my MacBook - running on battery power it would always report "Connected to mains, not charging". Does it still work that way on the latest MacBooks? In any case, your data does seems to suggest the problem is a more general issue with Vista. Sounds like you should investigate further...

  • BZDTemp - Thursday, October 23, 2008 - link

    I wonder if OS X lasting longer on a battery can be transfered to the world of none portable?

    In other words say I run OS X on my daily, none laptop, work machine doing surfing, writing and perhaps listening to music(FLAC prefered over MP3) or even watching an episode of The Daily Show. Will this draw less power from the wall with a PC running OS X than with the same machine running Windows (and is there a difference between Windows versions). Also Linux should be included in the test.

    Imagine the perspective - with the whole green computing movement this could really make a difference not just in the server rooms.

    Please do check this out - this is not only interesting for us geeks but could make Anandtech something referred to by none-tech news media.

Log in

Don't have an account? Sign up now