ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q We are calling the DecompressImage() function from QuickTime in
native PowerPC code (QuickTime for PowerPC is installed). The graphics
compressor is very slow on the PowerPC. It seems that the graphics decompressor
may not be ported to the PowerPC and that emulated code is called from native
code. Is this true, and if so, what is the solution to this ? A It's possible that the QuickTime PowerPlug file, which is the CFM library that contains the native codecs, isn't installed in your extension folder. Use the following code to test for availability of this library: /* IsQuickTimeCFMInstalled IsQuickTimeInstalled is used to initialize the environment pascal Boolean IsQuickTimeCFMInstalled(void) DESCRIPTION IsQuickTimeCFMInstalled will test if the CFM QuickTime libraries are present (QuickTime PowerPlug, for instance), and if the libraries are still present (this because the libraries are registered once when Gestalt finds then during runtime, and the end user might delete these, or move them to another location later)(. */ pascal Boolean IsQuickTimeCFMInstalled(void) { OSErr anErr; long qtFeatures; // Test if the library is registered. anErr = Gestalt(gestaltQuickTimeFeatures, &qtFeatures); if (!( (anErr == noErr) && (qtFeatures & (1 << gestaltPPCQuickTimeLibPresent)) )) // not true return false; // Test if a function is available (the library is not moved from the // Extension folder), // this is the trick to be used concerning testing if a function // is available via CFM. if ( ! EnterMovies ) return false; else return true; } You should also be using the QuickTimeLib or QuickTime.xcoff files, which are needed to link together the native code that uses the CFM PowerPlug libraries. Since the component manager and core parts of QuickTime are not yet native, you will encounter context switches, sometimes frequently (these are usually 50 cycles in length). The gain from using native codecs decreases as the number of context switches increases. However, in the case of the CinePak codecs, we've observed a gain of four times or more during the compression stage. [May 01 1995] |
|