[MPlayer-dev-eng] [PATCH] YUV support for vo_quartz, at last

Camillo Lugaresi camillolugaresi at virgilio.it
Sat May 1 16:40:45 CEST 2004


At 8:40 -0400 1-05-2004, Nicolas Plourde wrote:
>Its vo_quartz and I will not change it.

OK, it was just a suggestion.

>Maybe now we can talk about something useful,
>like improving it.

Here are some ideas:
- Use QuickTime's image decompressor for all pixel formats, and 
remove all CoreGraphics code. CGImage is not meant for fast blitting, 
QuickTime is always going to be faster (even QuickDraw's CopyBits 
ought to be faster, in fact). And if you're using QuickTime with a 
Carbon window, there is no need to get CoreGraphics involved.

- Make sure all APIs are being called properly. I see NULL is being 
passed as the destination port to DecompressSequenceBeginS; the 
documentation does not say that passing NULL is supported, so it's 
better to use GetWindowPort (I see this is in the code, but 
commented... why?). Or point me at the docs that say you can pass 
NULL, I'd be glad to learn something new. :)

- Ensure you're letting QuickTime do its job in the fastest possible 
way. I see codecFlagUseImageBuffer is being used, why is that? If 
there are reasons to use it (even though it can slow things down), 
they should be stated as comments in the source, so readers aren't 
left wondering.

>vo_quartz is not the default vo driver on osx, maybe we can change that or
>at least make it the default if sdl is not there because right now its falling
>back to vo_null.

I'd place it before vo_null, but after vo_sdl. SDL has been working 
well enough; I wouldn't replace it as the default driver unless 
(until?) vo_quartz proves to have better performance (measurements 
are needed).

>Also if you disable sdl support in mplayer vo_quartz
>is not working properly. SDLMain override mplayer main() and start has
>a cocoa app, Im in the dark here any idea anyone?

With SDL support enabled, mplayer is a Cocoa application, so 
vo_quartz is running as Carbon-in-Cocoa. Without SDL, you'll need to 
do the standard Carbon initialization procedure. Apple has plenty of 
sample code for this.

There might also be issues with the event loop, but it's hard to tell 
without more information. How is vo_quartz "not working properly", 
exactly? Where is it failing?

Camillo Lugaresi




More information about the MPlayer-dev-eng mailing list