Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blitting directly to the screen...



In my real-time video processing app Isadora., a common situation is that the processing is done at 320x240, and then, blown up to 640x480 when it is displayed on the screen. I wasn't happy with the performance of either CopyBits or a Decompression Sequence, so I wrote an Altivec routine that doubles the pixels and blits the them right to the desitination pixel map. Works great on both the main and second screens on my Titanium Powerbook.

My question is: am I going to run into trouble with this on various platforms/hardware, etc? E.g., will it work on desktop systems with external video cards?

Assuming you don't care about G3s and older Macs, probably your worst case scenario is on a 32bit 33Mhz PCI card on G4s that don't have write combining (which I think are the 2X AGP ones and the G4 PCI graphics), you will get about 90MB/sec to the frame buffer. 640x480 32bpp at 30fps is going to need about 36MB/sec, so you are going to use up about 40% of the time on a CPU blitting.

If you need more performance on that hardware, you can use the 2nd processor on multi-processor machines to run your altivec blitting routine while you get on with decompressing and/or rendering the next frame, or look at working in YUV 4:2:2 pixels. Most cards will do accelerated scaling of YUV 4:2:2 pixel formats ('2vuy' and 'yuvs', sometimes other ones as well), and even if you are not scaling, the data rate is half as it is only 16bpp. You could also look at using OpenGL to do accelerated scaling of 32bpp ARGB pixels.

Glenn.
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Blitting directly to the screen... (From: Mark Coniglio <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.