[Ffmpeg-devel] MPEG-2 Acceleration Under Mac OS X - Can We Move This Forward?

galenz at zinkconsulting.com galenz
Tue Aug 29 04:08:08 CEST 2006


I hate to admit it, but I highly doubt I have immensely more skill  
than you do. John is the real talent behind this. I'm just  
passionate, tenacious and (sadly?) headed a slightly different  
direction with my professional work, so while I keep up with  
computers, I don't have enough time and (most importantly) "mental  
money" to get into new programming - at last not of the complexity  
required to really turn Accellent into a portable library or  
integrate it with a mainstream player all by myself.

What got this going back in January was that I started thinking about  
some tricks I could pull and I contrived a successful way to get DVD  
Player.app to render HD MPEG-2. Once I did that, John was able to get  
Accellent up and running under 10.4 in record time and actually  
improve it substantially. Now we have a fairly portable proof-of- 
concept application.

To give you an idea of the performance, I tested VLC (Intel build)  
versus Accellent running some 1920 x 1080 HD content: VLC used  
90-110% of the CPU on a 2 GHz Core Duo MacBook. On a dramatically  
slower 1.33 GHz PowerBook G4, the same clip played back using no more  
than 25% of the CPU. Now that's what I call a performance boost!

The challenge is going to be that this isn't just a library you feed  
the bits into as MPEG-2 and have them dumped out as a full  
resolution, uncompressed video. It actually basically takes the data,  
does some pre-processing, and then hands the data off to the Apple  
stuff (it's the handoff that's the tricky part) which then actually  
dumps it to the display. That's how you get such amazing performance.  
That's also why it's a bit tricky, you would almost certainly have to  
modify the display code in your player to get it working.

As for using it with other codecs, I think that would require another  
layer of reverse engineering, and I think that you wouldn't see such  
great performance gains. Despite being an "older" codec, MPEG-2 is  
the quality leader at high bitrates is part of the Blu-ray and HD-DVD  
spec, and is currently used for HDTV broadcast over the air in the US  
and many other countries. You can get TV tuners that plug into your  
machine via FireWire and dump an HD stream. The problem for slower  
machines is playing back the video. And even for fast machines, heat/ 
noise/power consumption/multi-tasking can be a problem.

I've also been in touch with a the VLC developers list (I vastly  
prefer VLC's OS X interface over MPlayer's) and there is a modicum of  
interest, but DJ would like to see more documentation about Accellent  
- which really needs to come from John. I've written John and we'll  
see if we can't get a bit more documentation out of him. If you feel  
inclined, drop John a friendly email expressing the value you would  
see in him providing a bit more documentation so this project can  
move forward - johnd at defyne.org


On Aug 28, 2006, at 5:58 PM, Robert Swain wrote:

> Hello,
> galenz at zinkconsulting.com wrote:
>> I'm tossing this out to you all, as ffmpeg developers, in hopes  
>> that somebody has some interest in working further on this. It  
>> would be interesting if the functionality could somehow be  
>> integrated into libavcodec, or perhaps just simply an effective  
>> player be put together. There are millions of users who could  
>> benefit!
> I'm interested in this as I have a MacBook and such things would be  
> useful. I doubt I have the same level of skills as yourself and  
> John but I might be able to offer some suggestions. My initial  
> thought was that you might try to make it into a library such that  
> it can be easily used by any project. MPlayerOSX or VLC might be  
> other points of interest if you don't want to make it into a  
> library. Also, is it possible to extend to functionality of the  
> code to allow decoding of other codecs than MPEG-2?
> Regards,
> Rob
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list