ImageCompression.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:165k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       ImageCompression.h
  3.  
  4.      Contains:   QuickTime Interfaces.
  5.  
  6.      Version:    Technology: QuickTime 6.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1990-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __IMAGECOMPRESSION__
  18. #define __IMAGECOMPRESSION__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __QUICKDRAW__
  23. #include "Quickdraw.h"
  24. #endif
  25. #ifndef __QDOFFSCREEN__
  26. #include "QDOffscreen.h"
  27. #endif
  28. #ifndef __COMPONENTS__
  29. #include "Components.h"
  30. #endif
  31. #ifndef __STANDARDFILE__
  32. #include "StandardFile.h"
  33. #endif
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50. struct MatrixRecord {
  51.     Fixed                           matrix[3][3];
  52. };
  53. typedef struct MatrixRecord             MatrixRecord;
  54. typedef MatrixRecord *                  MatrixRecordPtr;
  55. enum {
  56.     kRawCodecType               = FOUR_CHAR_CODE('raw '),
  57.     kCinepakCodecType           = FOUR_CHAR_CODE('cvid'),
  58.     kGraphicsCodecType          = FOUR_CHAR_CODE('smc '),
  59.     kAnimationCodecType         = FOUR_CHAR_CODE('rle '),
  60.     kVideoCodecType             = FOUR_CHAR_CODE('rpza'),
  61.     kComponentVideoCodecType    = FOUR_CHAR_CODE('yuv2'),
  62.     kJPEGCodecType              = FOUR_CHAR_CODE('jpeg'),
  63.     kMotionJPEGACodecType       = FOUR_CHAR_CODE('mjpa'),
  64.     kMotionJPEGBCodecType       = FOUR_CHAR_CODE('mjpb'),
  65.     kSGICodecType               = FOUR_CHAR_CODE('.SGI'),
  66.     kPlanarRGBCodecType         = FOUR_CHAR_CODE('8BPS'),
  67.     kMacPaintCodecType          = FOUR_CHAR_CODE('PNTG'),
  68.     kGIFCodecType               = FOUR_CHAR_CODE('gif '),
  69.     kPhotoCDCodecType           = FOUR_CHAR_CODE('kpcd'),
  70.     kQuickDrawGXCodecType       = FOUR_CHAR_CODE('qdgx'),
  71.     kAVRJPEGCodecType           = FOUR_CHAR_CODE('avr '),
  72.     kOpenDMLJPEGCodecType       = FOUR_CHAR_CODE('dmb1'),
  73.     kBMPCodecType               = FOUR_CHAR_CODE('WRLE'),
  74.     kWindowsRawCodecType        = FOUR_CHAR_CODE('WRAW'),
  75.     kVectorCodecType            = FOUR_CHAR_CODE('path'),
  76.     kQuickDrawCodecType         = FOUR_CHAR_CODE('qdrw'),
  77.     kWaterRippleCodecType       = FOUR_CHAR_CODE('ripl'),
  78.     kFireCodecType              = FOUR_CHAR_CODE('fire'),
  79.     kCloudCodecType             = FOUR_CHAR_CODE('clou'),
  80.     kH261CodecType              = FOUR_CHAR_CODE('h261'),
  81.     kH263CodecType              = FOUR_CHAR_CODE('h263'),
  82.     kDVCNTSCCodecType           = FOUR_CHAR_CODE('dvc '),       /* DV - NTSC and DVCPRO NTSC (available in QuickTime 6.0 or later)*/
  83.                                                                 /* NOTE: kDVCProNTSCCodecType is deprecated.  */
  84.                                                                 /* Use kDVCNTSCCodecType instead -- as far as the codecs are concerned, */
  85.                                                                 /* the two data formats are identical.*/
  86.     kDVCPALCodecType            = FOUR_CHAR_CODE('dvcp'),
  87.     kDVCProPALCodecType         = FOUR_CHAR_CODE('dvpp'),       /* available in QuickTime 6.0 or later*/
  88.     kBaseCodecType              = FOUR_CHAR_CODE('base'),
  89.     kFLCCodecType               = FOUR_CHAR_CODE('flic'),
  90.     kTargaCodecType             = FOUR_CHAR_CODE('tga '),
  91.     kPNGCodecType               = FOUR_CHAR_CODE('png '),
  92.     kTIFFCodecType              = FOUR_CHAR_CODE('tiff'),       /* NOTE: despite what might seem obvious from the two constants*/
  93.                                                                 /* below and their names, they really are correct. 'yuvu' really */
  94.                                                                 /* does mean signed, and 'yuvs' really does mean unsigned. Really. */
  95.     kComponentVideoSigned       = FOUR_CHAR_CODE('yuvu'),
  96.     kComponentVideoUnsigned     = FOUR_CHAR_CODE('yuvs'),
  97.     kCMYKCodecType              = FOUR_CHAR_CODE('cmyk'),
  98.     kMicrosoftVideo1CodecType   = FOUR_CHAR_CODE('msvc'),
  99.     kSorensonCodecType          = FOUR_CHAR_CODE('SVQ1'),
  100.     kSorenson3CodecType         = FOUR_CHAR_CODE('SVQ3'),       /* available in QuickTime 5 and later*/
  101.     kIndeo4CodecType            = FOUR_CHAR_CODE('IV41'),
  102.     kMPEG4VisualCodecType       = FOUR_CHAR_CODE('mp4v'),
  103.     k64ARGBCodecType            = FOUR_CHAR_CODE('b64a'),
  104.     k48RGBCodecType             = FOUR_CHAR_CODE('b48r'),
  105.     k32AlphaGrayCodecType       = FOUR_CHAR_CODE('b32a'),
  106.     k16GrayCodecType            = FOUR_CHAR_CODE('b16g'),
  107.     kMpegYUV420CodecType        = FOUR_CHAR_CODE('myuv'),
  108.     kYUV420CodecType            = FOUR_CHAR_CODE('y420'),
  109.     kSorensonYUV9CodecType      = FOUR_CHAR_CODE('syv9'),
  110.     k422YpCbCr8CodecType        = FOUR_CHAR_CODE('2vuy'),       /* Component Y'CbCr 8-bit 4:2:2  */
  111.     k444YpCbCr8CodecType        = FOUR_CHAR_CODE('v308'),       /* Component Y'CbCr 8-bit 4:4:4  */
  112.     k4444YpCbCrA8CodecType      = FOUR_CHAR_CODE('v408'),       /* Component Y'CbCrA 8-bit 4:4:4:4 */
  113.     k422YpCbCr16CodecType       = FOUR_CHAR_CODE('v216'),       /* Component Y'CbCr 10,12,14,16-bit 4:2:2*/
  114.     k422YpCbCr10CodecType       = FOUR_CHAR_CODE('v210'),       /* Component Y'CbCr 10-bit 4:2:2 */
  115.     k444YpCbCr10CodecType       = FOUR_CHAR_CODE('v410'),       /* Component Y'CbCr 10-bit 4:4:4 */
  116.     k4444YpCbCrA8RCodecType     = FOUR_CHAR_CODE('r408')        /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv*/
  117. };
  118. /* one source effects */
  119. enum {
  120.     kBlurImageFilterType        = FOUR_CHAR_CODE('blur'),
  121.     kSharpenImageFilterType     = FOUR_CHAR_CODE('shrp'),
  122.     kEdgeDetectImageFilterType  = FOUR_CHAR_CODE('edge'),
  123.     kEmbossImageFilterType      = FOUR_CHAR_CODE('embs'),
  124.     kConvolveImageFilterType    = FOUR_CHAR_CODE('genk'),
  125.     kAlphaGainImageFilterType   = FOUR_CHAR_CODE('gain'),
  126.     kRGBColorBalanceImageFilterType = FOUR_CHAR_CODE('rgbb'),
  127.     kHSLColorBalanceImageFilterType = FOUR_CHAR_CODE('hslb'),
  128.     kColorSyncImageFilterType   = FOUR_CHAR_CODE('sync'),
  129.     kFilmNoiseImageFilterType   = FOUR_CHAR_CODE('fmns'),
  130.     kSolarizeImageFilterType    = FOUR_CHAR_CODE('solr'),
  131.     kColorTintImageFilterType   = FOUR_CHAR_CODE('tint'),
  132.     kLensFlareImageFilterType   = FOUR_CHAR_CODE('lens'),
  133.     kBrightnessContrastImageFilterType = FOUR_CHAR_CODE('brco')
  134. };
  135. /* two source effects */
  136. enum {
  137.     kAlphaCompositorTransitionType = FOUR_CHAR_CODE('blnd'),
  138.     kCrossFadeTransitionType    = FOUR_CHAR_CODE('dslv'),
  139.     kChannelCompositeEffectType = FOUR_CHAR_CODE('chan'),
  140.     kChromaKeyTransitionType    = FOUR_CHAR_CODE('ckey'),
  141.     kImplodeTransitionType      = FOUR_CHAR_CODE('mplo'),
  142.     kExplodeTransitionType      = FOUR_CHAR_CODE('xplo'),
  143.     kGradientTransitionType     = FOUR_CHAR_CODE('matt'),
  144.     kPushTransitionType         = FOUR_CHAR_CODE('push'),
  145.     kSlideTransitionType        = FOUR_CHAR_CODE('slid'),
  146.     kWipeTransitionType         = FOUR_CHAR_CODE('smpt'),
  147.     kIrisTransitionType         = FOUR_CHAR_CODE('smp2'),
  148.     kRadialTransitionType       = FOUR_CHAR_CODE('smp3'),
  149.     kMatrixTransitionType       = FOUR_CHAR_CODE('smp4'),
  150.     kZoomTransitionType         = FOUR_CHAR_CODE('zoom')
  151. };
  152. /* three source effects */
  153. enum {
  154.     kTravellingMatteEffectType  = FOUR_CHAR_CODE('trav')
  155. };
  156. /* Supported by QTNewGWorld in QuickTime 4.0 and later */
  157. enum {
  158.     kCMYKPixelFormat            = FOUR_CHAR_CODE('cmyk'),       /* CMYK, 8-bit */
  159.     k64ARGBPixelFormat          = FOUR_CHAR_CODE('b64a'),       /* ARGB, 16-bit big-endian samples */
  160.     k48RGBPixelFormat           = FOUR_CHAR_CODE('b48r'),       /* RGB, 16-bit big-endian samples */
  161.     k32AlphaGrayPixelFormat     = FOUR_CHAR_CODE('b32a'),       /* AlphaGray, 16-bit big-endian samples */
  162.     k16GrayPixelFormat          = FOUR_CHAR_CODE('b16g'),       /* Grayscale, 16-bit big-endian samples */
  163.     k422YpCbCr8PixelFormat      = FOUR_CHAR_CODE('2vuy')        /* Component Y'CbCr 8-bit 4:2:2, ordered Cb Y'0 Cr Y'1 */
  164. };
  165. /* Supported by QTNewGWorld in QuickTime 4.1.2 and later */
  166. enum {
  167.     k4444YpCbCrA8PixelFormat    = FOUR_CHAR_CODE('v408'),       /* Component Y'CbCrA 8-bit 4:4:4:4, ordered Cb Y' Cr A */
  168.     k4444YpCbCrA8RPixelFormat   = FOUR_CHAR_CODE('r408')        /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv, ordered A Y' Cb Cr */
  169. };
  170. /* Supported by QTNewGWorld in QuickTime 6.0 and later */
  171. enum {
  172.     kYUV420PixelFormat          = FOUR_CHAR_CODE('y420')        /* Planar Component Y'CbCr 8-bit 4:2:0.  PixMap baseAddr points to a big-endian PlanarPixmapInfoYUV420 struct; see ImageCodec.i. */
  173. };
  174. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  175. enum {
  176.     codecInfoDoes1              = (1L << 0),                    /* codec can work with 1-bit pixels */
  177.     codecInfoDoes2              = (1L << 1),                    /* codec can work with 2-bit pixels */
  178.     codecInfoDoes4              = (1L << 2),                    /* codec can work with 4-bit pixels */
  179.     codecInfoDoes8              = (1L << 3),                    /* codec can work with 8-bit pixels */
  180.     codecInfoDoes16             = (1L << 4),                    /* codec can work with 16-bit pixels */
  181.     codecInfoDoes32             = (1L << 5),                    /* codec can work with 32-bit pixels */
  182.     codecInfoDoesDither         = (1L << 6),                    /* codec can do ditherMode */
  183.     codecInfoDoesStretch        = (1L << 7),                    /* codec can stretch to arbitrary sizes */
  184.     codecInfoDoesShrink         = (1L << 8),                    /* codec can shrink to arbitrary sizes */
  185.     codecInfoDoesMask           = (1L << 9),                    /* codec can mask to clipping regions */
  186.     codecInfoDoesTemporal       = (1L << 10),                   /* codec can handle temporal redundancy */
  187.     codecInfoDoesDouble         = (1L << 11),                   /* codec can stretch to double size exactly */
  188.     codecInfoDoesQuad           = (1L << 12),                   /* codec can stretch to quadruple size exactly */
  189.     codecInfoDoesHalf           = (1L << 13),                   /* codec can shrink to half size */
  190.     codecInfoDoesQuarter        = (1L << 14),                   /* codec can shrink to quarter size */
  191.     codecInfoDoesRotate         = (1L << 15),                   /* codec can rotate on decompress */
  192.     codecInfoDoesHorizFlip      = (1L << 16),                   /* codec can flip horizontally on decompress */
  193.     codecInfoDoesVertFlip       = (1L << 17),                   /* codec can flip vertically on decompress */
  194.     codecInfoHasEffectParameterList = (1L << 18),               /* codec implements get effects parameter list call, once was codecInfoDoesSkew */
  195.     codecInfoDoesBlend          = (1L << 19),                   /* codec can blend on decompress */
  196.     codecInfoDoesWarp           = (1L << 20),                   /* codec can warp arbitrarily on decompress */
  197.     codecInfoDoesRecompress     = (1L << 21),                   /* codec can recompress image without accumulating errors */
  198.     codecInfoDoesSpool          = (1L << 22),                   /* codec can spool image data */
  199.     codecInfoDoesRateConstrain  = (1L << 23)                    /* codec can data rate constrain */
  200. };
  201. enum {
  202.     codecInfoDepth1             = (1L << 0),                    /* compressed data at 1 bpp depth available */
  203.     codecInfoDepth2             = (1L << 1),                    /* compressed data at 2 bpp depth available */
  204.     codecInfoDepth4             = (1L << 2),                    /* compressed data at 4 bpp depth available */
  205.     codecInfoDepth8             = (1L << 3),                    /* compressed data at 8 bpp depth available */
  206.     codecInfoDepth16            = (1L << 4),                    /* compressed data at 16 bpp depth available */
  207.     codecInfoDepth32            = (1L << 5),                    /* compressed data at 32 bpp depth available */
  208.     codecInfoDepth24            = (1L << 6),                    /* compressed data at 24 bpp depth available */
  209.     codecInfoDepth33            = (1L << 7),                    /* compressed data at 1 bpp monochrome depth  available */
  210.     codecInfoDepth34            = (1L << 8),                    /* compressed data at 2 bpp grayscale depth available */
  211.     codecInfoDepth36            = (1L << 9),                    /* compressed data at 4 bpp grayscale depth available */
  212.     codecInfoDepth40            = (1L << 10),                   /* compressed data at 8 bpp grayscale depth available */
  213.     codecInfoStoresClut         = (1L << 11),                   /* compressed data can have custom cluts */
  214.     codecInfoDoesLossless       = (1L << 12),                   /* compressed data can be stored in lossless format */
  215.     codecInfoSequenceSensitive  = (1L << 13)                    /* compressed data is sensitive to out of sequence decoding */
  216. };
  217. /* input sequence flags*/
  218. enum {
  219.     codecFlagUseImageBuffer     = (1L << 0),                    /* decompress*/
  220.     codecFlagUseScreenBuffer    = (1L << 1),                    /* decompress*/
  221.     codecFlagUpdatePrevious     = (1L << 2),                    /* compress*/
  222.     codecFlagNoScreenUpdate     = (1L << 3),                    /* decompress*/
  223.     codecFlagWasCompressed      = (1L << 4),                    /* compress*/
  224.     codecFlagDontOffscreen      = (1L << 5),                    /* decompress*/
  225.     codecFlagUpdatePreviousComp = (1L << 6),                    /* compress*/
  226.     codecFlagForceKeyFrame      = (1L << 7),                    /* compress*/
  227.     codecFlagOnlyScreenUpdate   = (1L << 8),                    /* decompress*/
  228.     codecFlagLiveGrab           = (1L << 9),                    /* compress*/
  229.     codecFlagDiffFrame          = (1L << 9),                    /* decompress*/
  230.     codecFlagDontUseNewImageBuffer = (1L << 10),                /* decompress*/
  231.     codecFlagInterlaceUpdate    = (1L << 11),                   /* decompress*/
  232.     codecFlagCatchUpDiff        = (1L << 12),                   /* decompress*/
  233.     codecFlagSupportDisable     = (1L << 13),                   /* decompress*/
  234.     codecFlagReenable           = (1L << 14)                    /* decompress*/
  235. };
  236. /* output sequence flags*/
  237. enum {
  238.     codecFlagOutUpdateOnNextIdle = (1L << 9),
  239.     codecFlagOutUpdateOnDataSourceChange = (1L << 10),
  240.     codecFlagSequenceSensitive  = (1L << 11),
  241.     codecFlagOutUpdateOnTimeChange = (1L << 12),
  242.     codecFlagImageBufferNotSourceImage = (1L << 13),
  243.     codecFlagUsedNewImageBuffer = (1L << 14),
  244.     codecFlagUsedImageBuffer    = (1L << 15)
  245. };
  246. enum {
  247.                                                                 /* The minimum data size for spooling in or out data */
  248.     codecMinimumDataSize        = 32768L
  249. };
  250. enum {
  251.     compressorComponentType     = FOUR_CHAR_CODE('imco'),       /* the type for "Components" which compress images */
  252.     decompressorComponentType   = FOUR_CHAR_CODE('imdc')        /* the type for "Components" which decompress images */
  253. };
  254. typedef Component                       CompressorComponent;
  255. typedef Component                       DecompressorComponent;
  256. typedef Component                       CodecComponent;
  257. #define anyCodec                ((CodecComponent)0)
  258. #define bestSpeedCodec          ((CodecComponent)-1)
  259. #define bestFidelityCodec       ((CodecComponent)-2)
  260. #define bestCompressionCodec    ((CodecComponent)-3)
  261. typedef OSType                          CodecType;
  262. typedef unsigned short                  CodecFlags;
  263. typedef unsigned long                   CodecQ;
  264. enum {
  265.     codecLosslessQuality        = 0x00000400,
  266.     codecMaxQuality             = 0x000003FF,
  267.     codecMinQuality             = 0x00000000,
  268.     codecLowQuality             = 0x00000100,
  269.     codecNormalQuality          = 0x00000200,
  270.     codecHighQuality            = 0x00000300
  271. };
  272. enum {
  273.     codecLockBitsShieldCursor   = (1 << 0)                      /* shield cursor */
  274. };
  275. enum {
  276.     codecCompletionSource       = (1 << 0),                     /* asynchronous codec is done with source data */
  277.     codecCompletionDest         = (1 << 1),                     /* asynchronous codec is done with destination data */
  278.     codecCompletionDontUnshield = (1 << 2),                     /* on dest complete don't unshield cursor */
  279.     codecCompletionWentOffscreen = (1 << 3),                    /* codec used offscreen buffer */
  280.     codecCompletionUnlockBits   = (1 << 4),                     /* on dest complete, call ICMSequenceUnlockBits */
  281.     codecCompletionForceChainFlush = (1 << 5),                  /* ICM needs to flush the whole chain */
  282.     codecCompletionDropped      = (1 << 6)                      /* codec decided to drop this frame */
  283. };
  284. enum {
  285.     codecProgressOpen           = 0,
  286.     codecProgressUpdatePercent  = 1,
  287.     codecProgressClose          = 2
  288. };
  289. typedef CALLBACK_API( OSErr , ICMDataProcPtr )(Ptr *dataP, long bytesNeeded, long refcon);
  290. typedef CALLBACK_API( OSErr , ICMFlushProcPtr )(Ptr data, long bytesAdded, long refcon);
  291. typedef CALLBACK_API( void , ICMCompletionProcPtr )(OSErr result, short flags, long refcon);
  292. typedef CALLBACK_API( OSErr , ICMProgressProcPtr )(short message, Fixed completeness, long refcon);
  293. typedef CALLBACK_API( void , StdPixProcPtr )(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  294. typedef CALLBACK_API( void , QDPixProcPtr )(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  295. typedef CALLBACK_API( void , ICMAlignmentProcPtr )(Rect *rp, long refcon);
  296. typedef CALLBACK_API( void , ICMCursorShieldedProcPtr )(const Rect *r, void *refcon, long flags);
  297. typedef CALLBACK_API( void , ICMMemoryDisposedProcPtr )(Ptr memoryBlock, void *refcon);
  298. typedef void *                          ICMCursorNotify;
  299. typedef CALLBACK_API( OSErr , ICMConvertDataFormatProcPtr )(void *refCon, long flags, Handle desiredFormat, Handle sourceDataFormat, void *srcData, long srcDataSize, void **dstData, long *dstDataSize);
  300. typedef STACK_UPP_TYPE(ICMDataProcPtr)                          ICMDataUPP;
  301. typedef STACK_UPP_TYPE(ICMFlushProcPtr)                         ICMFlushUPP;
  302. typedef STACK_UPP_TYPE(ICMCompletionProcPtr)                    ICMCompletionUPP;
  303. typedef STACK_UPP_TYPE(ICMProgressProcPtr)                      ICMProgressUPP;
  304. typedef STACK_UPP_TYPE(StdPixProcPtr)                           StdPixUPP;
  305. typedef STACK_UPP_TYPE(QDPixProcPtr)                            QDPixUPP;
  306. typedef STACK_UPP_TYPE(ICMAlignmentProcPtr)                     ICMAlignmentUPP;
  307. typedef STACK_UPP_TYPE(ICMCursorShieldedProcPtr)                ICMCursorShieldedUPP;
  308. typedef STACK_UPP_TYPE(ICMMemoryDisposedProcPtr)                ICMMemoryDisposedUPP;
  309. typedef STACK_UPP_TYPE(ICMConvertDataFormatProcPtr)             ICMConvertDataFormatUPP;
  310. typedef long                            ImageSequence;
  311. typedef long                            ImageSequenceDataSource;
  312. typedef long                            ImageTranscodeSequence;
  313. typedef long                            ImageFieldSequence;
  314. struct ICMProgressProcRecord {
  315.     ICMProgressUPP                  progressProc;
  316.     long                            progressRefCon;
  317. };
  318. typedef struct ICMProgressProcRecord    ICMProgressProcRecord;
  319. typedef ICMProgressProcRecord *         ICMProgressProcRecordPtr;
  320. struct ICMCompletionProcRecord {
  321.     ICMCompletionUPP                completionProc;
  322.     long                            completionRefCon;
  323. };
  324. typedef struct ICMCompletionProcRecord  ICMCompletionProcRecord;
  325. typedef ICMCompletionProcRecord *       ICMCompletionProcRecordPtr;
  326. struct ICMDataProcRecord {
  327.     ICMDataUPP                      dataProc;
  328.     long                            dataRefCon;
  329. };
  330. typedef struct ICMDataProcRecord        ICMDataProcRecord;
  331. typedef ICMDataProcRecord *             ICMDataProcRecordPtr;
  332. struct ICMFlushProcRecord {
  333.     ICMFlushUPP                     flushProc;
  334.     long                            flushRefCon;
  335. };
  336. typedef struct ICMFlushProcRecord       ICMFlushProcRecord;
  337. typedef ICMFlushProcRecord *            ICMFlushProcRecordPtr;
  338. struct ICMAlignmentProcRecord {
  339.     ICMAlignmentUPP                 alignmentProc;
  340.     long                            alignmentRefCon;
  341. };
  342. typedef struct ICMAlignmentProcRecord   ICMAlignmentProcRecord;
  343. typedef ICMAlignmentProcRecord *        ICMAlignmentProcRecordPtr;
  344. struct DataRateParams {
  345.     long                            dataRate;
  346.     long                            dataOverrun;
  347.     long                            frameDuration;
  348.     long                            keyFrameRate;
  349.     CodecQ                          minSpatialQuality;
  350.     CodecQ                          minTemporalQuality;
  351. };
  352. typedef struct DataRateParams           DataRateParams;
  353. typedef DataRateParams *                DataRateParamsPtr;
  354. struct ImageDescription {
  355.     long                            idSize;                     /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
  356.     CodecType                       cType;                      /* what kind of codec compressed this data */
  357.     long                            resvd1;                     /* reserved for Apple use */
  358.     short                           resvd2;                     /* reserved for Apple use */
  359.     short                           dataRefIndex;               /* set to zero  */
  360.     short                           version;                    /* which version is this data */
  361.     short                           revisionLevel;              /* what version of that codec did this */
  362.     long                            vendor;                     /* whose  codec compressed this data */
  363.     CodecQ                          temporalQuality;            /* what was the temporal quality factor  */
  364.     CodecQ                          spatialQuality;             /* what was the spatial quality factor */
  365.     short                           width;                      /* how many pixels wide is this data */
  366.     short                           height;                     /* how many pixels high is this data */
  367.     Fixed                           hRes;                       /* horizontal resolution */
  368.     Fixed                           vRes;                       /* vertical resolution */
  369.     long                            dataSize;                   /* if known, the size of data for this image descriptor */
  370.     short                           frameCount;                 /* number of frames this description applies to */
  371.     Str31                           name;                       /* name of codec ( in case not installed )  */
  372.     short                           depth;                      /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  373.     short                           clutID;                     /* clut id or if 0 clut follows  or -1 if no clut */
  374. };
  375. typedef struct ImageDescription         ImageDescription;
  376. typedef ImageDescription *              ImageDescriptionPtr;
  377. typedef ImageDescriptionPtr *           ImageDescriptionHandle;
  378. struct CodecInfo {
  379.     Str31                           typeName;                   /* name of the codec type i.e.: 'Apple Image Compression' */
  380.     short                           version;                    /* version of the codec data that this codec knows about */
  381.     short                           revisionLevel;              /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  382.     long                            vendor;                     /* Maker of this codec i.e: 'appl' */
  383.     long                            decompressFlags;            /* codecInfo flags for decompression capabilities */
  384.     long                            compressFlags;              /* codecInfo flags for compression capabilities */
  385.     long                            formatFlags;                /* codecInfo flags for compression format details */
  386.     UInt8                           compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  387.     UInt8                           decompressionAccuracy;      /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  388.     unsigned short                  compressionSpeed;           /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  389.     unsigned short                  decompressionSpeed;         /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  390.     UInt8                           compressionLevel;           /* measure (1-255) of compression level of this codec (0 if unknown)  */
  391.     UInt8                           resvd;                      /* pad */
  392.     short                           minimumHeight;              /* minimum height of image (block size) */
  393.     short                           minimumWidth;               /* minimum width of image (block size) */
  394.     short                           decompressPipelineLatency;  /* in milliseconds ( for asynchronous codecs ) */
  395.     short                           compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  396.     long                            privateData;
  397. };
  398. typedef struct CodecInfo                CodecInfo;
  399. struct CodecNameSpec {
  400.     CodecComponent                  codec;
  401.     CodecType                       cType;
  402.     Str31                           typeName;
  403.     Handle                          name;
  404. };
  405. typedef struct CodecNameSpec            CodecNameSpec;
  406. struct CodecNameSpecList {
  407.     short                           count;
  408.     CodecNameSpec                   list[1];
  409. };
  410. typedef struct CodecNameSpecList        CodecNameSpecList;
  411. typedef CodecNameSpecList *             CodecNameSpecListPtr;
  412. enum {
  413.     defaultDither               = 0,
  414.     forceDither                 = 1,
  415.     suppressDither              = 2,
  416.     useColorMatching            = 4
  417. };
  418. enum {
  419.     callStdBits                 = 1,
  420.     callOldBits                 = 2,
  421.     noDefaultOpcodes            = 4
  422. };
  423. enum {
  424.     graphicsModeStraightAlpha   = 256,
  425.     graphicsModePreWhiteAlpha   = 257,
  426.     graphicsModePreBlackAlpha   = 258,
  427.     graphicsModeComposition     = 259,
  428.     graphicsModeStraightAlphaBlend = 260,
  429.     graphicsModePreMulColorAlpha = 261
  430. };
  431. enum {
  432.     evenField1ToEvenFieldOut    = 1 << 0,
  433.     evenField1ToOddFieldOut     = 1 << 1,
  434.     oddField1ToEvenFieldOut     = 1 << 2,
  435.     oddField1ToOddFieldOut      = 1 << 3,
  436.     evenField2ToEvenFieldOut    = 1 << 4,
  437.     evenField2ToOddFieldOut     = 1 << 5,
  438.     oddField2ToEvenFieldOut     = 1 << 6,
  439.     oddField2ToOddFieldOut      = 1 << 7
  440. };
  441. enum {
  442.     icmFrameTimeHasVirtualStartTimeAndDuration = 1 << 0
  443. };
  444. struct ICMFrameTimeRecord {
  445.     wide                            value;                      /* frame time*/
  446.     long                            scale;                      /* timescale of value/duration fields*/
  447.     void *                          base;                       /* timebase*/
  448.     long                            duration;                   /* duration frame is to be displayed (0 if unknown)*/
  449.     Fixed                           rate;                       /* rate of timebase relative to wall-time*/
  450.     long                            recordSize;                 /* total number of bytes in ICMFrameTimeRecord*/
  451.     long                            frameNumber;                /* number of frame, zero if not known*/
  452.     long                            flags;
  453.     wide                            virtualStartTime;           /* conceptual start time*/
  454.     long                            virtualDuration;            /* conceptual duration*/
  455. };
  456. typedef struct ICMFrameTimeRecord       ICMFrameTimeRecord;
  457. typedef ICMFrameTimeRecord *            ICMFrameTimePtr;
  458. #ifndef __QTUUID__
  459. #define __QTUUID__ 1
  460. /* QuickTime flavor of universally unique identifier (uuid)*/
  461. struct QTUUID {
  462.     UInt32                          data1;
  463.     UInt16                          data2;
  464.     UInt16                          data3;
  465.     UInt8                           data4[8];
  466. };
  467. typedef struct QTUUID                   QTUUID;
  468. typedef QTUUID                          QTMediaContextID;
  469. #endif  /* !defined(__QTUUID__) */
  470. #if OPAQUE_UPP_TYPES
  471.     EXTERN_API(ICMDataUPP)
  472.     NewICMDataUPP                  (ICMDataProcPtr          userRoutine);
  473.     EXTERN_API(ICMFlushUPP)
  474.     NewICMFlushUPP                 (ICMFlushProcPtr         userRoutine);
  475.     EXTERN_API(ICMCompletionUPP)
  476.     NewICMCompletionUPP            (ICMCompletionProcPtr    userRoutine);
  477.     EXTERN_API(ICMProgressUPP)
  478.     NewICMProgressUPP              (ICMProgressProcPtr      userRoutine);
  479.     EXTERN_API(StdPixUPP)
  480.     NewStdPixUPP                   (StdPixProcPtr           userRoutine);
  481.     EXTERN_API(QDPixUPP)
  482.     NewQDPixUPP                    (QDPixProcPtr            userRoutine);
  483.     EXTERN_API(ICMAlignmentUPP)
  484.     NewICMAlignmentUPP             (ICMAlignmentProcPtr     userRoutine);
  485.     EXTERN_API(ICMCursorShieldedUPP)
  486.     NewICMCursorShieldedUPP        (ICMCursorShieldedProcPtr userRoutine);
  487.     EXTERN_API(ICMMemoryDisposedUPP)
  488.     NewICMMemoryDisposedUPP        (ICMMemoryDisposedProcPtr userRoutine);
  489.     EXTERN_API(ICMConvertDataFormatUPP)
  490.     NewICMConvertDataFormatUPP     (ICMConvertDataFormatProcPtr userRoutine);
  491.     EXTERN_API(void)
  492.     DisposeICMDataUPP              (ICMDataUPP              userUPP);
  493.     EXTERN_API(void)
  494.     DisposeICMFlushUPP             (ICMFlushUPP             userUPP);
  495.     EXTERN_API(void)
  496.     DisposeICMCompletionUPP        (ICMCompletionUPP        userUPP);
  497.     EXTERN_API(void)
  498.     DisposeICMProgressUPP          (ICMProgressUPP          userUPP);
  499.     EXTERN_API(void)
  500.     DisposeStdPixUPP               (StdPixUPP               userUPP);
  501.     EXTERN_API(void)
  502.     DisposeQDPixUPP                (QDPixUPP                userUPP);
  503.     EXTERN_API(void)
  504.     DisposeICMAlignmentUPP         (ICMAlignmentUPP         userUPP);
  505.     EXTERN_API(void)
  506.     DisposeICMCursorShieldedUPP    (ICMCursorShieldedUPP    userUPP);
  507.     EXTERN_API(void)
  508.     DisposeICMMemoryDisposedUPP    (ICMMemoryDisposedUPP    userUPP);
  509.     EXTERN_API(void)
  510.     DisposeICMConvertDataFormatUPP    (ICMConvertDataFormatUPP userUPP);
  511.     EXTERN_API(OSErr)
  512.     InvokeICMDataUPP               (Ptr *                   dataP,
  513.                                     long                    bytesNeeded,
  514.                                     long                    refcon,
  515.                                     ICMDataUPP              userUPP);
  516.     EXTERN_API(OSErr)
  517.     InvokeICMFlushUPP              (Ptr                     data,
  518.                                     long                    bytesAdded,
  519.                                     long                    refcon,
  520.                                     ICMFlushUPP             userUPP);
  521.     EXTERN_API(void)
  522.     InvokeICMCompletionUPP         (OSErr                   result,
  523.                                     short                   flags,
  524.                                     long                    refcon,
  525.                                     ICMCompletionUPP        userUPP);
  526.     EXTERN_API(OSErr)
  527.     InvokeICMProgressUPP           (short                   message,
  528.                                     Fixed                   completeness,
  529.                                     long                    refcon,
  530.                                     ICMProgressUPP          userUPP);
  531.     EXTERN_API(void)
  532.     InvokeStdPixUPP                (PixMap *                src,
  533.                                     Rect *                  srcRect,
  534.                                     MatrixRecord *          matrix,
  535.                                     short                   mode,
  536.                                     RgnHandle               mask,
  537.                                     PixMap *                matte,
  538.                                     Rect *                  matteRect,
  539.                                     short                   flags,
  540.                                     StdPixUPP               userUPP);
  541.     EXTERN_API(void)
  542.     InvokeQDPixUPP                 (PixMap *                src,
  543.                                     Rect *                  srcRect,
  544.                                     MatrixRecord *          matrix,
  545.                                     short                   mode,
  546.                                     RgnHandle               mask,
  547.                                     PixMap *                matte,
  548.                                     Rect *                  matteRect,
  549.                                     short                   flags,
  550.                                     QDPixUPP                userUPP);
  551.     EXTERN_API(void)
  552.     InvokeICMAlignmentUPP          (Rect *                  rp,
  553.                                     long                    refcon,
  554.                                     ICMAlignmentUPP         userUPP);
  555.     EXTERN_API(void)
  556.     InvokeICMCursorShieldedUPP     (const Rect *            r,
  557.                                     void *                  refcon,
  558.                                     long                    flags,
  559.                                     ICMCursorShieldedUPP    userUPP);
  560.     EXTERN_API(void)
  561.     InvokeICMMemoryDisposedUPP     (Ptr                     memoryBlock,
  562.                                     void *                  refcon,
  563.                                     ICMMemoryDisposedUPP    userUPP);
  564.     EXTERN_API(OSErr)
  565.     InvokeICMConvertDataFormatUPP    (void *                refCon,
  566.                                     long                    flags,
  567.                                     Handle                  desiredFormat,
  568.                                     Handle                  sourceDataFormat,
  569.                                     void *                  srcData,
  570.                                     long                    srcDataSize,
  571.                                     void **                 dstData,
  572.                                     long *                  dstDataSize,
  573.                                     ICMConvertDataFormatUPP userUPP);
  574. #else
  575.     enum { uppICMDataProcInfo = 0x00000FE0 };                       /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  576.     enum { uppICMFlushProcInfo = 0x00000FE0 };                      /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  577.     enum { uppICMCompletionProcInfo = 0x00000E80 };                 /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
  578.     enum { uppICMProgressProcInfo = 0x00000FA0 };                   /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  579.     enum { uppStdPixProcInfo = 0x002FEFC0 };                        /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  580.     enum { uppQDPixProcInfo = 0x002FEFC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  581.     enum { uppICMAlignmentProcInfo = 0x000003C0 };                  /* pascal no_return_value Func(4_bytes, 4_bytes) */
  582.     enum { uppICMCursorShieldedProcInfo = 0x00000FC0 };             /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  583.     enum { uppICMMemoryDisposedProcInfo = 0x000003C0 };             /* pascal no_return_value Func(4_bytes, 4_bytes) */
  584.     enum { uppICMConvertDataFormatProcInfo = 0x003FFFE0 };          /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  585.     #define NewICMDataUPP(userRoutine)                              (ICMDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  586.     #define NewICMFlushUPP(userRoutine)                             (ICMFlushUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  587.     #define NewICMCompletionUPP(userRoutine)                        (ICMCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  588.     #define NewICMProgressUPP(userRoutine)                          (ICMProgressUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  589.     #define NewStdPixUPP(userRoutine)                               (StdPixUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  590.     #define NewQDPixUPP(userRoutine)                                (QDPixUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPixProcInfo, GetCurrentArchitecture())
  591.     #define NewICMAlignmentUPP(userRoutine)                         (ICMAlignmentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  592.     #define NewICMCursorShieldedUPP(userRoutine)                    (ICMCursorShieldedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
  593.     #define NewICMMemoryDisposedUPP(userRoutine)                    (ICMMemoryDisposedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
  594.     #define NewICMConvertDataFormatUPP(userRoutine)                 (ICMConvertDataFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, GetCurrentArchitecture())
  595.     #define DisposeICMDataUPP(userUPP)                              DisposeRoutineDescriptor(userUPP)
  596.     #define DisposeICMFlushUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  597.     #define DisposeICMCompletionUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  598.     #define DisposeICMProgressUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
  599.     #define DisposeStdPixUPP(userUPP)                               DisposeRoutineDescriptor(userUPP)
  600.     #define DisposeQDPixUPP(userUPP)                                DisposeRoutineDescriptor(userUPP)
  601.     #define DisposeICMAlignmentUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  602.     #define DisposeICMCursorShieldedUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  603.     #define DisposeICMMemoryDisposedUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  604.     #define DisposeICMConvertDataFormatUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  605.     #define InvokeICMDataUPP(dataP, bytesNeeded, refcon, userUPP)   (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  606.     #define InvokeICMFlushUPP(data, bytesAdded, refcon, userUPP)    (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  607.     #define InvokeICMCompletionUPP(result, flags, refcon, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppICMCompletionProcInfo, (result), (flags), (refcon))
  608.     #define InvokeICMProgressUPP(message, completeness, refcon, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMProgressProcInfo, (message), (completeness), (refcon))
  609.     #define InvokeStdPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userUPP)  CALL_EIGHT_PARAMETER_UPP((userUPP), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  610.     #define InvokeQDPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userUPP)  CALL_EIGHT_PARAMETER_UPP((userUPP), uppQDPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  611.     #define InvokeICMAlignmentUPP(rp, refcon, userUPP)              CALL_TWO_PARAMETER_UPP((userUPP), uppICMAlignmentProcInfo, (rp), (refcon))
  612.     #define InvokeICMCursorShieldedUPP(r, refcon, flags, userUPP)   CALL_THREE_PARAMETER_UPP((userUPP), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
  613.     #define InvokeICMMemoryDisposedUPP(memoryBlock, refcon, userUPP)  CALL_TWO_PARAMETER_UPP((userUPP), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
  614.     #define InvokeICMConvertDataFormatUPP(refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize, userUPP)  (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppICMConvertDataFormatProcInfo, (refCon), (flags), (desiredFormat), (sourceDataFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  615. #endif
  616. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  617. #define NewICMDataProc(userRoutine)                             NewICMDataUPP(userRoutine)
  618. #define NewICMFlushProc(userRoutine)                            NewICMFlushUPP(userRoutine)
  619. #define NewICMCompletionProc(userRoutine)                       NewICMCompletionUPP(userRoutine)
  620. #define NewICMProgressProc(userRoutine)                         NewICMProgressUPP(userRoutine)
  621. #define NewStdPixProc(userRoutine)                              NewStdPixUPP(userRoutine)
  622. #define NewQDPixProc(userRoutine)                               NewQDPixUPP(userRoutine)
  623. #define NewICMAlignmentProc(userRoutine)                        NewICMAlignmentUPP(userRoutine)
  624. #define NewICMCursorShieldedProc(userRoutine)                   NewICMCursorShieldedUPP(userRoutine)
  625. #define NewICMMemoryDisposedProc(userRoutine)                   NewICMMemoryDisposedUPP(userRoutine)
  626. #define NewICMConvertDataFormatProc(userRoutine)                NewICMConvertDataFormatUPP(userRoutine)
  627. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon) InvokeICMDataUPP(dataP, bytesNeeded, refcon, userRoutine)
  628. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon) InvokeICMFlushUPP(data, bytesAdded, refcon, userRoutine)
  629. #define CallICMCompletionProc(userRoutine, result, flags, refcon) InvokeICMCompletionUPP(result, flags, refcon, userRoutine)
  630. #define CallICMProgressProc(userRoutine, message, completeness, refcon) InvokeICMProgressUPP(message, completeness, refcon, userRoutine)
  631. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags) InvokeStdPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userRoutine)
  632. #define CallQDPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags) InvokeQDPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userRoutine)
  633. #define CallICMAlignmentProc(userRoutine, rp, refcon)           InvokeICMAlignmentUPP(rp, refcon, userRoutine)
  634. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags) InvokeICMCursorShieldedUPP(r, refcon, flags, userRoutine)
  635. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon) InvokeICMMemoryDisposedUPP(memoryBlock, refcon, userRoutine)
  636. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize) InvokeICMConvertDataFormatUPP(refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize, userRoutine)
  637. EXTERN_API( OSErr )
  638. CodecManagerVersion             (long *                 version)                            TWOWORDINLINE(0x7000, 0xAAA3);
  639. EXTERN_API( OSErr )
  640. GetCodecNameList                (CodecNameSpecListPtr * list,
  641.                                  short                  showAll)                            TWOWORDINLINE(0x7001, 0xAAA3);
  642. EXTERN_API( OSErr )
  643. DisposeCodecNameList            (CodecNameSpecListPtr   list)                               TWOWORDINLINE(0x700F, 0xAAA3);
  644. EXTERN_API( OSErr )
  645. GetCodecInfo                    (CodecInfo *            info,
  646.                                  CodecType              cType,
  647.                                  CodecComponent         codec)                              TWOWORDINLINE(0x7003, 0xAAA3);
  648. EXTERN_API( OSErr )
  649. GetMaxCompressionSize           (PixMapHandle           src,
  650.                                  const Rect *           srcRect,
  651.                                  short                  colorDepth,
  652.                                  CodecQ                 quality,
  653.                                  CodecType              cType,
  654.                                  CompressorComponent    codec,
  655.                                  long *                 size)                               TWOWORDINLINE(0x7004, 0xAAA3);
  656. EXTERN_API( OSErr )
  657. GetCSequenceMaxCompressionSize  (ImageSequence          seqID,
  658.                                  PixMapHandle           src,
  659.                                  long *                 size)                               FOURWORDINLINE(0x203C, 0x000C, 0x0074, 0xAAA3);
  660. EXTERN_API( OSErr )
  661. GetCompressionTime              (PixMapHandle           src,
  662.                                  const Rect *           srcRect,
  663.                                  short                  colorDepth,
  664.                                  CodecType              cType,
  665.                                  CompressorComponent    codec,
  666.                                  CodecQ *               spatialQuality,
  667.                                  CodecQ *               temporalQuality,
  668.                                  unsigned long *        compressTime)                       TWOWORDINLINE(0x7005, 0xAAA3);
  669. EXTERN_API( OSErr )
  670. CompressImage                   (PixMapHandle           src,
  671.                                  const Rect *           srcRect,
  672.                                  CodecQ                 quality,
  673.                                  CodecType              cType,
  674.                                  ImageDescriptionHandle  desc,
  675.                                  Ptr                    data)                               TWOWORDINLINE(0x7006, 0xAAA3);
  676. EXTERN_API( OSErr )
  677. FCompressImage                  (PixMapHandle           src,
  678.                                  const Rect *           srcRect,
  679.                                  short                  colorDepth,
  680.                                  CodecQ                 quality,
  681.                                  CodecType              cType,
  682.                                  CompressorComponent    codec,
  683.                                  CTabHandle             ctable,
  684.                                  CodecFlags             flags,
  685.                                  long                   bufferSize,
  686.                                  ICMFlushProcRecordPtr  flushProc,
  687.                                  ICMProgressProcRecordPtr  progressProc,
  688.                                  ImageDescriptionHandle  desc,
  689.                                  Ptr                    data)                               TWOWORDINLINE(0x7007, 0xAAA3);
  690. EXTERN_API( OSErr )
  691. DecompressImage                 (Ptr                    data,
  692.                                  ImageDescriptionHandle  desc,
  693.                                  PixMapHandle           dst,
  694.                                  const Rect *           srcRect,
  695.                                  const Rect *           dstRect,
  696.                                  short                  mode,
  697.                                  RgnHandle              mask)                               TWOWORDINLINE(0x7008, 0xAAA3);
  698. EXTERN_API( OSErr )
  699. FDecompressImage                (Ptr                    data,
  700.                                  ImageDescriptionHandle  desc,
  701.                                  PixMapHandle           dst,
  702.                                  const Rect *           srcRect,
  703.                                  MatrixRecordPtr        matrix,
  704.                                  short                  mode,
  705.                                  RgnHandle              mask,
  706.                                  PixMapHandle           matte,
  707.                                  const Rect *           matteRect,
  708.                                  CodecQ                 accuracy,
  709.                                  DecompressorComponent  codec,
  710.                                  long                   bufferSize,
  711.                                  ICMDataProcRecordPtr   dataProc,
  712.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7009, 0xAAA3);
  713. EXTERN_API( OSErr )
  714. CompressSequenceBegin           (ImageSequence *        seqID,
  715.                                  PixMapHandle           src,
  716.                                  PixMapHandle           prev,
  717.                                  const Rect *           srcRect,
  718.                                  const Rect *           prevRect,
  719.                                  short                  colorDepth,
  720.                                  CodecType              cType,
  721.                                  CompressorComponent    codec,
  722.                                  CodecQ                 spatialQuality,
  723.                                  CodecQ                 temporalQuality,
  724.                                  long                   keyFrameRate,
  725.                                  CTabHandle             ctable,
  726.                                  CodecFlags             flags,
  727.                                  ImageDescriptionHandle  desc)                              TWOWORDINLINE(0x700A, 0xAAA3);
  728. EXTERN_API( OSErr )
  729. CompressSequenceFrame           (ImageSequence          seqID,
  730.                                  PixMapHandle           src,
  731.                                  const Rect *           srcRect,
  732.                                  CodecFlags             flags,
  733.                                  Ptr                    data,
  734.                                  long *                 dataSize,
  735.                                  UInt8 *                similarity,
  736.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)           TWOWORDINLINE(0x700B, 0xAAA3);
  737. EXTERN_API( OSErr )
  738. DecompressSequenceBegin         (ImageSequence *        seqID,
  739.                                  ImageDescriptionHandle  desc,
  740.                                  CGrafPtr               port,
  741.                                  GDHandle               gdh,
  742.                                  const Rect *           srcRect,
  743.                                  MatrixRecordPtr        matrix,
  744.                                  short                  mode,
  745.                                  RgnHandle              mask,
  746.                                  CodecFlags             flags,
  747.                                  CodecQ                 accuracy,
  748.                                  DecompressorComponent  codec)                              TWOWORDINLINE(0x700D, 0xAAA3);
  749. EXTERN_API( OSErr )
  750. DecompressSequenceBeginS        (ImageSequence *        seqID,
  751.                                  ImageDescriptionHandle  desc,
  752.                                  Ptr                    data,
  753.                                  long                   dataSize,
  754.                                  CGrafPtr               port,
  755.                                  GDHandle               gdh,
  756.                                  const Rect *           srcRect,
  757.                                  MatrixRecordPtr        matrix,
  758.                                  short                  mode,
  759.                                  RgnHandle              mask,
  760.                                  CodecFlags             flags,
  761.                                  CodecQ                 accuracy,
  762.                                  DecompressorComponent  codec)                              FOURWORDINLINE(0x203C, 0x0030, 0x005D, 0xAAA3);
  763. EXTERN_API( OSErr )
  764. DecompressSequenceFrame         (ImageSequence          seqID,
  765.                                  Ptr                    data,
  766.                                  CodecFlags             inFlags,
  767.                                  CodecFlags *           outFlags,
  768.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)           TWOWORDINLINE(0x700E, 0xAAA3);
  769. EXTERN_API( OSErr )
  770. DecompressSequenceFrameS        (ImageSequence          seqID,
  771.                                  Ptr                    data,
  772.                                  long                   dataSize,
  773.                                  CodecFlags             inFlags,
  774.                                  CodecFlags *           outFlags,
  775.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)           FOURWORDINLINE(0x203C, 0x0016, 0x0047, 0xAAA3);
  776. EXTERN_API( OSErr )
  777. DecompressSequenceFrameWhen     (ImageSequence          seqID,
  778.                                  Ptr                    data,
  779.                                  long                   dataSize,
  780.                                  CodecFlags             inFlags,
  781.                                  CodecFlags *           outFlags,
  782.                                  ICMCompletionProcRecordPtr  asyncCompletionProc,
  783.                                  const ICMFrameTimeRecord * frameTime)                      FOURWORDINLINE(0x203C, 0x001A, 0x005E, 0xAAA3);
  784. EXTERN_API( OSErr )
  785. CDSequenceFlush                 (ImageSequence          seqID)                              FOURWORDINLINE(0x203C, 0x0004, 0x005F, 0xAAA3);
  786. EXTERN_API( OSErr )
  787. SetDSequenceMatrix              (ImageSequence          seqID,
  788.                                  MatrixRecordPtr        matrix)                             TWOWORDINLINE(0x7010, 0xAAA3);
  789. EXTERN_API( OSErr )
  790. GetDSequenceMatrix              (ImageSequence          seqID,
  791.                                  MatrixRecordPtr        matrix)                             FOURWORDINLINE(0x203C, 0x0008, 0x0091, 0xAAA3);
  792. EXTERN_API( OSErr )
  793. SetDSequenceMatte               (ImageSequence          seqID,
  794.                                  PixMapHandle           matte,
  795.                                  const Rect *           matteRect)                          TWOWORDINLINE(0x7011, 0xAAA3);
  796. EXTERN_API( OSErr )
  797. SetDSequenceMask                (ImageSequence          seqID,
  798.                                  RgnHandle              mask)                               TWOWORDINLINE(0x7012, 0xAAA3);
  799. EXTERN_API( OSErr )
  800. SetDSequenceTransferMode        (ImageSequence          seqID,
  801.                                  short                  mode,
  802.                                  const RGBColor *       opColor)                            TWOWORDINLINE(0x7013, 0xAAA3);
  803. EXTERN_API( OSErr )
  804. SetDSequenceDataProc            (ImageSequence          seqID,
  805.                                  ICMDataProcRecordPtr   dataProc,
  806.                                  long                   bufferSize)                         TWOWORDINLINE(0x7014, 0xAAA3);
  807. EXTERN_API( OSErr )
  808. SetDSequenceAccuracy            (ImageSequence          seqID,
  809.                                  CodecQ                 accuracy)                           TWOWORDINLINE(0x7034, 0xAAA3);
  810. EXTERN_API( OSErr )
  811. SetDSequenceSrcRect             (ImageSequence          seqID,
  812.                                  const Rect *           srcRect)                            TWOWORDINLINE(0x7035, 0xAAA3);
  813. EXTERN_API( OSErr )
  814. SetDSequenceFlags               (ImageSequence          seqID,
  815.                                  long                   flags,
  816.                                  long                   flagsMask)                          FOURWORDINLINE(0x203C, 0x000C, 0x0057, 0xAAA3);
  817. enum {
  818.     codecDSequenceDisableOverlaySurface = (1L << 5),
  819.     codecDSequenceSingleField   = (1L << 6),
  820.     codecDSequenceBidirectionalPrediction = (1L << 7),
  821.     codecDSequenceFlushInsteadOfDirtying = (1L << 8),
  822.     codecDSequenceEnableSubPixelPositioning = (1L << 9)
  823. };
  824. typedef CodecComponent *                CodecComponentPtr;
  825. typedef CodecComponentPtr *             CodecComponentHandle;
  826. /* selectors for ICMSequenceGet/SetInfo*/
  827. enum {
  828.     kICMSequenceTaskWeight      = FOUR_CHAR_CODE('twei'),       /* data is pointer to UInt32*/
  829.     kICMSequenceTaskName        = FOUR_CHAR_CODE('tnam'),       /* data is pointer to OSType*/
  830.     kICMSequenceUserPreferredCodecs = FOUR_CHAR_CODE('punt')    /* data is pointer to CodecComponentHandle*/
  831. };
  832. EXTERN_API( OSErr )
  833. ICMSequenceGetInfo              (ImageSequence          seqID,
  834.                                  OSType                 which,
  835.                                  void *                 data)                               FOURWORDINLINE(0x203C, 0x000C, 0x0089, 0xAAA3);
  836. EXTERN_API( OSErr )
  837. ICMSequenceSetInfo              (ImageSequence          seqID,
  838.                                  OSType                 which,
  839.                                  void *                 data,
  840.                                  Size                   dataSize)                           FOURWORDINLINE(0x203C, 0x0010, 0x009D, 0xAAA3);
  841. EXTERN_API( OSErr )
  842. GetDSequenceImageBuffer         (ImageSequence          seqID,
  843.                                  GWorldPtr *            gworld)                             TWOWORDINLINE(0x7015, 0xAAA3);
  844. EXTERN_API( OSErr )
  845. GetDSequenceScreenBuffer        (ImageSequence          seqID,
  846.                                  GWorldPtr *            gworld)                             TWOWORDINLINE(0x7016, 0xAAA3);
  847. EXTERN_API( OSErr )
  848. SetCSequenceQuality             (ImageSequence          seqID,
  849.                                  CodecQ                 spatialQuality,
  850.                                  CodecQ                 temporalQuality)                    TWOWORDINLINE(0x7017, 0xAAA3);
  851. EXTERN_API( OSErr )
  852. SetCSequencePrev                (ImageSequence          seqID,
  853.                                  PixMapHandle           prev,
  854.                                  const Rect *           prevRect)                           TWOWORDINLINE(0x7018, 0xAAA3);
  855. EXTERN_API( OSErr )
  856. SetCSequenceFlushProc           (ImageSequence          seqID,
  857.                                  ICMFlushProcRecordPtr  flushProc,
  858.                                  long                   bufferSize)                         TWOWORDINLINE(0x7033, 0xAAA3);
  859. EXTERN_API( OSErr )
  860. SetCSequenceKeyFrameRate        (ImageSequence          seqID,
  861.                                  long                   keyFrameRate)                       TWOWORDINLINE(0x7036, 0xAAA3);
  862. EXTERN_API( OSErr )
  863. GetCSequenceKeyFrameRate        (ImageSequence          seqID,
  864.                                  long *                 keyFrameRate)                       FOURWORDINLINE(0x203C, 0x0008, 0x004B, 0xAAA3);
  865. EXTERN_API( OSErr )
  866. GetCSequencePrevBuffer          (ImageSequence          seqID,
  867.                                  GWorldPtr *            gworld)                             TWOWORDINLINE(0x7019, 0xAAA3);
  868. EXTERN_API( OSErr )
  869. CDSequenceBusy                  (ImageSequence          seqID)                              TWOWORDINLINE(0x701A, 0xAAA3);
  870. EXTERN_API( OSErr )
  871. CDSequenceEnd                   (ImageSequence          seqID)                              TWOWORDINLINE(0x701B, 0xAAA3);
  872. EXTERN_API( OSErr )
  873. CDSequenceEquivalentImageDescription (ImageSequence     seqID,
  874.                                  ImageDescriptionHandle  newDesc,
  875.                                  Boolean *              equivalent)                         FOURWORDINLINE(0x203C, 0x000C, 0x0065, 0xAAA3);
  876. EXTERN_API( OSErr )
  877. CDSequenceEquivalentImageDescriptionS (ImageSequence    seqID,
  878.                                  ImageDescriptionHandle  newDesc,
  879.                                  Boolean *              equivalent,
  880.                                  Boolean *              canSwitch)                          FOURWORDINLINE(0x203C, 0x0010, 0x009F, 0xAAA3);
  881. EXTERN_API( OSErr )
  882. ReplaceDSequenceImageDescription (ImageSequence         seqID,
  883.                                  ImageDescriptionHandle  newDesc)                           FOURWORDINLINE(0x203C, 0x0008, 0x00A0, 0xAAA3);
  884. EXTERN_API( OSErr )
  885. GetCompressedImageSize          (ImageDescriptionHandle  desc,
  886.                                  Ptr                    data,
  887.                                  long                   bufferSize,
  888.                                  ICMDataProcRecordPtr   dataProc,
  889.                                  long *                 dataSize)                           TWOWORDINLINE(0x701C, 0xAAA3);
  890. EXTERN_API( OSErr )
  891. GetSimilarity                   (PixMapHandle           src,
  892.                                  const Rect *           srcRect,
  893.                                  ImageDescriptionHandle  desc,
  894.                                  Ptr                    data,
  895.                                  Fixed *                similarity)                         TWOWORDINLINE(0x701D, 0xAAA3);
  896. enum {
  897.     kImageDescriptionSampleFormat = FOUR_CHAR_CODE('idfm'),     /* image description extension describing sample format*/
  898.     kImageDescriptionClassicAtomFormat = FOUR_CHAR_CODE('atom'), /* sample contains classic atom structure (ie, GX codec and Curve codec)*/
  899.     kImageDescriptionQTAtomFormat = FOUR_CHAR_CODE('qtat'),     /* sample contains QT atom structure*/
  900.     kImageDescriptionEffectDataFormat = FOUR_CHAR_CODE('fxat'), /* sample describes an effect (as QTAtoms)*/
  901.     kImageDescriptionPrivateDataFormat = FOUR_CHAR_CODE('priv'), /* sample is in a private codec specific format*/
  902.     kImageDescriptionAlternateCodec = FOUR_CHAR_CODE('subs'),   /* image description extension containing the OSType of a substitute codec should the main codec not be available*/
  903.     kImageDescriptionColorSpace = FOUR_CHAR_CODE('cspc')        /* image description extension containing an OSType naming the native pixel format of an image (only used for pixel formats not supported by classic Color QuickDraw)*/
  904. };
  905. EXTERN_API( OSErr )
  906. GetImageDescriptionCTable       (ImageDescriptionHandle  desc,
  907.                                  CTabHandle *           ctable)                             TWOWORDINLINE(0x701E, 0xAAA3);
  908. EXTERN_API( OSErr )
  909. SetImageDescriptionCTable       (ImageDescriptionHandle  desc,
  910.                                  CTabHandle             ctable)                             TWOWORDINLINE(0x701F, 0xAAA3);
  911. EXTERN_API( OSErr )
  912. GetImageDescriptionExtension    (ImageDescriptionHandle  desc,
  913.                                  Handle *               extension,
  914.                                  long                   idType,
  915.                                  long                   index)                              TWOWORDINLINE(0x7020, 0xAAA3);
  916. EXTERN_API( OSErr )
  917. AddImageDescriptionExtension    (ImageDescriptionHandle  desc,
  918.                                  Handle                 extension,
  919.                                  long                   idType)                             TWOWORDINLINE(0x7021, 0xAAA3);
  920. EXTERN_API( OSErr )
  921. RemoveImageDescriptionExtension (ImageDescriptionHandle  desc,
  922.                                  long                   idType,
  923.                                  long                   index)                              FOURWORDINLINE(0x203C, 0x000C, 0x003A, 0xAAA3);
  924. EXTERN_API( OSErr )
  925. CountImageDescriptionExtensionType (ImageDescriptionHandle  desc,
  926.                                  long                   idType,
  927.                                  long *                 count)                              FOURWORDINLINE(0x203C, 0x000C, 0x003B, 0xAAA3);
  928. EXTERN_API( OSErr )
  929. GetNextImageDescriptionExtensionType (ImageDescriptionHandle  desc,
  930.                                  long *                 idType)                             FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xAAA3);
  931. EXTERN_API( OSErr )
  932. FindCodec                       (CodecType              cType,
  933.                                  CodecComponent         specCodec,
  934.                                  CompressorComponent *  compressor,
  935.                                  DecompressorComponent * decompressor)                      TWOWORDINLINE(0x7023, 0xAAA3);
  936. EXTERN_API( OSErr )
  937. CompressPicture                 (PicHandle              srcPicture,
  938.                                  PicHandle              dstPicture,
  939.                                  CodecQ                 quality,
  940.                                  CodecType              cType)                              TWOWORDINLINE(0x7024, 0xAAA3);
  941. EXTERN_API( OSErr )
  942. FCompressPicture                (PicHandle              srcPicture,
  943.                                  PicHandle              dstPicture,
  944.                                  short                  colorDepth,
  945.                                  CTabHandle             ctable,
  946.                                  CodecQ                 quality,
  947.                                  short                  doDither,
  948.                                  short                  compressAgain,
  949.                                  ICMProgressProcRecordPtr  progressProc,
  950.                                  CodecType              cType,
  951.                                  CompressorComponent    codec)                              TWOWORDINLINE(0x7025, 0xAAA3);
  952. EXTERN_API( OSErr )
  953. CompressPictureFile             (short                  srcRefNum,
  954.                                  short                  dstRefNum,
  955.                                  CodecQ                 quality,
  956.                                  CodecType              cType)                              TWOWORDINLINE(0x7026, 0xAAA3);
  957. EXTERN_API( OSErr )
  958. FCompressPictureFile            (short                  srcRefNum,
  959.                                  short                  dstRefNum,
  960.                                  short                  colorDepth,
  961.                                  CTabHandle             ctable,
  962.                                  CodecQ                 quality,
  963.                                  short                  doDither,
  964.                                  short                  compressAgain,
  965.                                  ICMProgressProcRecordPtr  progressProc,
  966.                                  CodecType              cType,
  967.                                  CompressorComponent    codec)                              TWOWORDINLINE(0x7027, 0xAAA3);
  968. EXTERN_API( OSErr )
  969. GetPictureFileHeader            (short                  refNum,
  970.                                  Rect *                 frame,
  971.                                  OpenCPicParams *       header)                             TWOWORDINLINE(0x7028, 0xAAA3);
  972. EXTERN_API( OSErr )
  973. DrawPictureFile                 (short                  refNum,
  974.                                  const Rect *           frame,
  975.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7029, 0xAAA3);
  976. EXTERN_API( OSErr )
  977. DrawTrimmedPicture              (PicHandle              srcPicture,
  978.                                  const Rect *           frame,
  979.                                  RgnHandle              trimMask,
  980.                                  short                  doDither,
  981.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702E, 0xAAA3);
  982. EXTERN_API( OSErr )
  983. DrawTrimmedPictureFile          (short                  srcRefnum,
  984.                                  const Rect *           frame,
  985.                                  RgnHandle              trimMask,
  986.                                  short                  doDither,
  987.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702F, 0xAAA3);
  988. EXTERN_API( OSErr )
  989. MakeThumbnailFromPicture        (PicHandle              picture,
  990.                                  short                  colorDepth,
  991.                                  PicHandle              thumbnail,
  992.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702A, 0xAAA3);
  993. EXTERN_API( OSErr )
  994. MakeThumbnailFromPictureFile    (short                  refNum,
  995.                                  short                  colorDepth,
  996.                                  PicHandle              thumbnail,
  997.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702B, 0xAAA3);
  998. EXTERN_API( OSErr )
  999. MakeThumbnailFromPixMap         (PixMapHandle           src,
  1000.                                  const Rect *           srcRect,
  1001.                                  short                  colorDepth,
  1002.                                  PicHandle              thumbnail,
  1003.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702C, 0xAAA3);
  1004. EXTERN_API( OSErr )
  1005. TrimImage                       (ImageDescriptionHandle  desc,
  1006.                                  Ptr                    inData,
  1007.                                  long                   inBufferSize,
  1008.                                  ICMDataProcRecordPtr   dataProc,
  1009.                                  Ptr                    outData,
  1010.                                  long                   outBufferSize,
  1011.                                  ICMFlushProcRecordPtr  flushProc,
  1012.                                  Rect *                 trimRect,
  1013.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702D, 0xAAA3);
  1014. EXTERN_API( OSErr )
  1015. ConvertImage                    (ImageDescriptionHandle  srcDD,
  1016.                                  Ptr                    srcData,
  1017.                                  short                  colorDepth,
  1018.                                  CTabHandle             ctable,
  1019.                                  CodecQ                 accuracy,
  1020.                                  CodecQ                 quality,
  1021.                                  CodecType              cType,
  1022.                                  CodecComponent         codec,
  1023.                                  ImageDescriptionHandle  dstDD,
  1024.                                  Ptr                    dstData)                            TWOWORDINLINE(0x7030, 0xAAA3);
  1025. EXTERN_API( OSErr )
  1026. GetCompressedPixMapInfo         (PixMapPtr              pix,
  1027.                                  ImageDescriptionHandle * desc,
  1028.                                  Ptr *                  data,
  1029.                                  long *                 bufferSize,
  1030.                                  ICMDataProcRecord *    dataProc,
  1031.                                  ICMProgressProcRecord * progressProc)                      TWOWORDINLINE(0x7037, 0xAAA3);
  1032. EXTERN_API( OSErr )
  1033. SetCompressedPixMapInfo         (PixMapPtr              pix,
  1034.                                  ImageDescriptionHandle  desc,
  1035.                                  Ptr                    data,
  1036.                                  long                   bufferSize,
  1037.                                  ICMDataProcRecordPtr   dataProc,
  1038.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7038, 0xAAA3);
  1039. EXTERN_API( void )
  1040. StdPix                          (PixMapPtr              src,
  1041.                                  const Rect *           srcRect,
  1042.                                  MatrixRecordPtr        matrix,
  1043.                                  short                  mode,
  1044.                                  RgnHandle              mask,
  1045.                                  PixMapPtr              matte,
  1046.                                  const Rect *           matteRect,
  1047.                                  short                  flags)                              TWOWORDINLINE(0x700C, 0xAAA3);
  1048. EXTERN_API( OSErr )
  1049. TransformRgn                    (MatrixRecordPtr        matrix,
  1050.                                  RgnHandle              rgn)                                TWOWORDINLINE(0x7039, 0xAAA3);
  1051. /***********
  1052.     preview stuff
  1053. ***********/
  1054. EXTERN_API( void )
  1055. SFGetFilePreview                (Point                  where,
  1056.                                  ConstStr255Param       prompt,
  1057.                                  FileFilterUPP          fileFilter,
  1058.                                  short                  numTypes,
  1059.                                  ConstSFTypeListPtr     typeList,
  1060.                                  DlgHookUPP             dlgHook,
  1061.                                  SFReply *              reply)                              TWOWORDINLINE(0x7041, 0xAAA3);
  1062. EXTERN_API( void )
  1063. SFPGetFilePreview               (Point                  where,
  1064.                                  ConstStr255Param       prompt,
  1065.                                  FileFilterUPP          fileFilter,
  1066.                                  short                  numTypes,
  1067.                                  ConstSFTypeListPtr     typeList,
  1068.                                  DlgHookUPP             dlgHook,
  1069.                                  SFReply *              reply,
  1070.                                  short                  dlgID,
  1071.                                  ModalFilterUPP         filterProc)                         TWOWORDINLINE(0x7042, 0xAAA3);
  1072. EXTERN_API( void )
  1073. StandardGetFilePreview          (FileFilterUPP          fileFilter,
  1074.                                  short                  numTypes,
  1075.                                  ConstSFTypeListPtr     typeList,
  1076.                                  StandardFileReply *    reply)                              TWOWORDINLINE(0x7043, 0xAAA3);
  1077. EXTERN_API( void )
  1078. CustomGetFilePreview            (FileFilterYDUPP        fileFilter,
  1079.                                  short                  numTypes,
  1080.                                  ConstSFTypeListPtr     typeList,
  1081.                                  StandardFileReply *    reply,
  1082.                                  short                  dlgID,
  1083.                                  Point                  where,
  1084.                                  DlgHookYDUPP           dlgHook,
  1085.                                  ModalFilterYDUPP       filterProc,
  1086.                                  ActivationOrderListPtr  activeList,
  1087.                                  ActivateYDUPP          activateProc,
  1088.                                  void *                 yourDataPtr)                        TWOWORDINLINE(0x7044, 0xAAA3);
  1089. EXTERN_API( OSErr )
  1090. MakeFilePreview                 (short                  resRefNum,
  1091.                                  ICMProgressProcRecordPtr  progress)                        TWOWORDINLINE(0x7045, 0xAAA3);
  1092. EXTERN_API( OSErr )
  1093. AddFilePreview                  (short                  resRefNum,
  1094.                                  OSType                 previewType,
  1095.                                  Handle                 previewData)                        TWOWORDINLINE(0x7046, 0xAAA3);
  1096. enum {
  1097.     sfpItemPreviewAreaUser      = 11,
  1098.     sfpItemPreviewStaticText    = 12,
  1099.     sfpItemPreviewDividerUser   = 13,
  1100.     sfpItemCreatePreviewButton  = 14,
  1101.     sfpItemShowPreviewButton    = 15
  1102. };
  1103. struct PreviewResourceRecord {
  1104.     unsigned long                   modDate;
  1105.     short                           version;
  1106.     OSType                          resType;
  1107.     short                           resID;
  1108. };
  1109. typedef struct PreviewResourceRecord    PreviewResourceRecord;
  1110. typedef PreviewResourceRecord *         PreviewResourcePtr;
  1111. typedef PreviewResourcePtr *            PreviewResource;
  1112. EXTERN_API( void )
  1113. AlignScreenRect                 (Rect *                 rp,
  1114.                                  ICMAlignmentProcRecordPtr  alignmentProc)                  FOURWORDINLINE(0x203C, 0x0008, 0x004C, 0xAAA3);
  1115. EXTERN_API( void )
  1116. AlignWindow                     (WindowRef              wp,
  1117.                                  Boolean                front,
  1118.                                  const Rect *           alignmentRect,
  1119.                                  ICMAlignmentProcRecordPtr  alignmentProc)                  FOURWORDINLINE(0x203C, 0x000E, 0x004D, 0xAAA3);
  1120. EXTERN_API( void )
  1121. DragAlignedWindow               (WindowRef              wp,
  1122.                                  Point                  startPt,
  1123.                                  Rect *                 boundsRect,
  1124.                                  Rect *                 alignmentRect,
  1125.                                  ICMAlignmentProcRecordPtr  alignmentProc)                  FOURWORDINLINE(0x203C, 0x0014, 0x004E, 0xAAA3);
  1126. EXTERN_API( long )
  1127. DragAlignedGrayRgn              (RgnHandle              theRgn,
  1128.                                  Point                  startPt,
  1129.                                  Rect *                 boundsRect,
  1130.                                  Rect *                 slopRect,
  1131.                                  short                  axis,
  1132.                                  UniversalProcPtr       actionProc,
  1133.                                  Rect *                 alignmentRect,
  1134.                                  ICMAlignmentProcRecordPtr  alignmentProc)                  FOURWORDINLINE(0x203C, 0x001E, 0x004F, 0xAAA3);
  1135. EXTERN_API( OSErr )
  1136. SetCSequenceDataRateParams      (ImageSequence          seqID,
  1137.                                  DataRateParamsPtr      params)                             FOURWORDINLINE(0x203C, 0x0008, 0x0050, 0xAAA3);
  1138. EXTERN_API( OSErr )
  1139. SetCSequenceFrameNumber         (ImageSequence          seqID,
  1140.                                  long                   frameNumber)                        FOURWORDINLINE(0x203C, 0x0008, 0x0051, 0xAAA3);
  1141. EXTERN_API( OSErr )
  1142. SetCSequencePreferredPacketSize (ImageSequence          seqID,
  1143.                                  long                   preferredPacketSizeInBytes)         FOURWORDINLINE(0x203C, 0x0008, 0x0078, 0xAAA3);
  1144. EXTERN_API( OSErr )
  1145. NewImageGWorld                  (GWorldPtr *            gworld,
  1146.                                  ImageDescriptionHandle  idh,
  1147.                                  GWorldFlags            flags)                              FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xAAA3);
  1148. EXTERN_API( OSErr )
  1149. GetCSequenceDataRateParams      (ImageSequence          seqID,
  1150.                                  DataRateParamsPtr      params)                             FOURWORDINLINE(0x203C, 0x0008, 0x0053, 0xAAA3);
  1151. EXTERN_API( OSErr )
  1152. GetCSequenceFrameNumber         (ImageSequence          seqID,
  1153.                                  long *                 frameNumber)                        FOURWORDINLINE(0x203C, 0x0008, 0x0054, 0xAAA3);
  1154. EXTERN_API( OSErr )
  1155. GetBestDeviceRect               (GDHandle *             gdh,
  1156.                                  Rect *                 rp)                                 FOURWORDINLINE(0x203C, 0x0008, 0x0055, 0xAAA3);
  1157. EXTERN_API( OSErr )
  1158. SetSequenceProgressProc         (ImageSequence          seqID,
  1159.                                  ICMProgressProcRecord * progressProc)                      FOURWORDINLINE(0x203C, 0x0008, 0x0056, 0xAAA3);
  1160. EXTERN_API( OSErr )
  1161. GDHasScale                      (GDHandle               gdh,
  1162.                                  short                  depth,
  1163.                                  Fixed *                scale)                              FOURWORDINLINE(0x203C, 0x000A, 0x005A, 0xAAA3);
  1164. EXTERN_API( OSErr )
  1165. GDGetScale                      (GDHandle               gdh,
  1166.                                  Fixed *                scale,
  1167.                                  short *                flags)                              FOURWORDINLINE(0x203C, 0x000C, 0x005B, 0xAAA3);
  1168. EXTERN_API( OSErr )
  1169. GDSetScale                      (GDHandle               gdh,
  1170.                                  Fixed                  scale,
  1171.                                  short                  flags)                              FOURWORDINLINE(0x203C, 0x000A, 0x005C, 0xAAA3);
  1172. EXTERN_API( OSErr )
  1173. ICMShieldSequenceCursor         (ImageSequence          seqID)                              FOURWORDINLINE(0x203C, 0x0004, 0x0062, 0xAAA3);
  1174. EXTERN_API( void )
  1175. ICMDecompressComplete           (ImageSequence          seqID,
  1176.                                  OSErr                  err,
  1177.                                  short                  flag,
  1178.                                  ICMCompletionProcRecordPtr  completionRtn)                 FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xAAA3);
  1179. EXTERN_API( OSErr )
  1180. ICMDecompressCompleteS          (ImageSequence          seqID,
  1181.                                  OSErr                  err,
  1182.                                  short                  flag,
  1183.                                  ICMCompletionProcRecordPtr  completionRtn)                 FOURWORDINLINE(0x203C, 0x000C, 0x0082, 0xAAA3);
  1184. EXTERN_API( OSErr )
  1185. ICMSequenceLockBits             (ImageSequence          seqID,
  1186.                                  PixMapPtr              dst,
  1187.                                  long                   flags)                              FOURWORDINLINE(0x203C, 0x000C, 0x007C, 0xAAA3);
  1188. EXTERN_API( OSErr )
  1189. ICMSequenceUnlockBits           (ImageSequence          seqID,
  1190.                                  long                   flags)                              FOURWORDINLINE(0x203C, 0x0008, 0x007D, 0xAAA3);
  1191. enum {
  1192.     kICMPixelFormatIsPlanarMask = 0x0F,                         /* these bits in formatFlags indicate how many planes there are; they're 0 if chunky*/
  1193.     kICMPixelFormatIsIndexed    = (1L << 4),
  1194.     kICMPixelFormatIsSupportedByQD = (1L << 5),
  1195.     kICMPixelFormatIsMonochrome = (1L << 6),
  1196.     kICMPixelFormatHasAlphaChannel = (1L << 7)
  1197. };
  1198. struct ICMPixelFormatInfo {
  1199.     long                            size;                       /* caller MUST fill this in with sizeof(ICMPixelFormatInfo) before calling ICMGet/SetPixelFormatInfo*/
  1200.     unsigned long                   formatFlags;
  1201.     short                           bitsPerPixel[14];           /* list each plane's bits per pixel separately if planar*/
  1202.                                                                 /* new field for QuickTime 4.1*/
  1203.     Fixed                           defaultGammaLevel;
  1204.                                                                 /* new fields for QuickTime 6.0*/
  1205.     short                           horizontalSubsampling[14];  /* per plane; use 1 if plane is not subsampled*/
  1206.     short                           verticalSubsampling[14];    /* per plane; use 1 if plane is not subsampled*/
  1207. };
  1208. typedef struct ICMPixelFormatInfo       ICMPixelFormatInfo;
  1209. typedef ICMPixelFormatInfo *            ICMPixelFormatInfoPtr;
  1210. /* IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMGetPixelFormatInfo */
  1211. EXTERN_API( OSErr )
  1212. ICMGetPixelFormatInfo           (OSType                 PixelFormat,
  1213.                                  ICMPixelFormatInfoPtr  theInfo)                            FOURWORDINLINE(0x203C, 0x0008, 0x0083, 0xAAA3);
  1214. /* IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMSetPixelFormatInfo */
  1215. EXTERN_API( OSErr )
  1216. ICMSetPixelFormatInfo           (OSType                 PixelFormat,
  1217.                                  ICMPixelFormatInfoPtr  theInfo)                            FOURWORDINLINE(0x203C, 0x0008, 0x008A, 0xAAA3);
  1218. enum {
  1219.     kICMGetChainUltimateParent  = 0,
  1220.     kICMGetChainParent          = 1,
  1221.     kICMGetChainChild           = 2,
  1222.     kICMGetChainUltimateChild   = 3
  1223. };
  1224. EXTERN_API( OSErr )
  1225. ICMSequenceGetChainMember       (ImageSequence          seqID,
  1226.                                  ImageSequence *        retSeqID,
  1227.                                  long                   flags)                              FOURWORDINLINE(0x203C, 0x000C, 0x007E, 0xAAA3);
  1228. EXTERN_API( OSErr )
  1229. SetDSequenceTimeCode            (ImageSequence          seqID,
  1230.                                  void *                 timeCodeFormat,
  1231.                                  void *                 timeCodeTime)                       FOURWORDINLINE(0x203C, 0x000C, 0x0064, 0xAAA3);
  1232. EXTERN_API( OSErr )
  1233. CDSequenceNewMemory             (ImageSequence          seqID,
  1234.                                  Ptr *                  data,
  1235.                                  Size                   dataSize,
  1236.                                  long                   dataUse,
  1237.                                  ICMMemoryDisposedUPP   memoryGoneProc,
  1238.                                  void *                 refCon)                             FOURWORDINLINE(0x203C, 0x0018, 0x0066, 0xAAA3);
  1239. EXTERN_API( OSErr )
  1240. CDSequenceDisposeMemory         (ImageSequence          seqID,
  1241.                                  Ptr                    data)                               FOURWORDINLINE(0x203C, 0x0008, 0x0067, 0xAAA3);