[vlc-devel] Re: Mac OS X MPEG-2 Acceleration - It's Here, Let's Use It

Derk-Jan Hartman hartman at videolan.org
Mon Aug 28 16:28:45 CEST 2006

On 28-aug-2006, at 4:58, galenz at zinkconsulting.com wrote:
> I've been a little bit involved with an interesting project called  
> Accellent which is a libavcodec-based reverse-engineer of Mac OS  
> X's MPEG-2 hardware acceleration API. Apple refused to release any  
> data on this, so John decided to reverse engineer it. After a few  
> iterations and a bit of work, we now have a nice open source  
> application that works under Mac OS 10.4 and 10.3. Take a look at  
> it here: http://www.defyne.org/dvb/accellent.html
> The performance is great. Even on G4s, full resolution HDTV  
> decoding only consumes 15-35% of the CPU. On these same machines,  
> ffmpeg/libmpeg2/QuickTime based decoders don't even come close to  
> fluid playback - that's millions of Mac users who can't use their  
> machines for HD playback. There's no reason it won't work on G3s  
> with an acceptable graphics card as well. While newer machines are  
> capable of software-only decoding, low end G5s sometimes have  
> trouble with HD, and for any machine - why use the CPU, when you  
> could use the GPU? It means that you can multi-task better, reduce  
> power consumption (longer laptop battery life) and have a cooler  
> machine (less fan noise, cooler lap.)
> We've cracked open Apple's secret API, but the problem is that we  
> are stuck. The application is a great proof-of-concept using  
> libavcodec. But John's busy and the application isn't really useful  
> for any function: it's crude demuxer and a window that displays the  
> video. It only accepts MPEG program streams, but it would be far  
> more useful if it accepted MPEG transport streams. There are no  
> playback controls. It does not attempt to decode audio, but it  
> really needs to decode AC3 audio to be useful. The interactions  
> with libavcodec are a bit of a hack, so there's a bit more than  
> just dropping this into another player that uses libavcodec to have  
> it playing/
> Is it possible that this could be integrated into VLC as an option?  
> Is anybody associated with VLC working with this already? VLC under  
> OS X has a great interface and is an elegant player, it would be  
> great if it could be the best performing player, by far.
> Feel free to contact me off list if you prefer.

Ah, Accellent.
I looked at this several times already, but there are several problems
1: it's not really well documented
2: It requires preparsing the video, setting up the video window and  
then decoding with DVDVideo. In VLC decoding usually occurs before  
the display core is aware of anything. It would require adding a  
specific preparser to the avcodec decoder and opening up the window  
earlier in the proces (perhaps this can be avoided, but i'm not sure  
3: it uses libavcodec, whereas we usually use libmpeg2 because of  
it's superior speed and resilience. ( a special submodule with a  
higher score could take care of this)
4: we need a way to find out at the decoder level wether we are going  
to be streaming/transcoding, because then we need to disable the  
hardware decoding.

It's all possible, but at the moment #1 is a blocker for me. (besides  
lack of time :D )


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list