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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       CMAcceleration.h
  3.  
  4.      Contains:   ColorSync Acceleration Component API
  5.  
  6.      Version:    Technology: ColorSync 2.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1995-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 __CMACCELERATION__
  18. #define __CMACCELERATION__
  19. #ifndef __COMPONENTS__
  20. #include "Components.h"
  21. #endif
  22. #ifndef __CMAPPLICATION__
  23. #include "CMApplication.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. /* -------------------------------------- version info */
  42. enum {
  43.     cmAccelerationInterfaceVersion = 1
  44. };
  45. /* -------------------------------------- Component Type */
  46. enum {
  47.     cmAccelerationComponentType = FOUR_CHAR_CODE('csac')
  48. };
  49. /* -------------------------------------- Required Component function selectors */
  50. enum {
  51.     cmLoadTables                = 0,
  52.     cmCalculateData             = 1
  53. };
  54. /* -------------------------------------- table data for acceleration component */
  55. struct CMAccelerationTableData {
  56.     long                            inputLutEntryCount;         /* count of entries for input lut for one dimension*/
  57.     long                            inputLutWordSize;           /* count of bits of each entry ( e.g. 16 for WORD )*/
  58.     Handle                          inputLut;                   /* handle to input lut*/
  59.     long                            outputLutEntryCount;        /* count of entries for output lut for one dimension  */
  60.     long                            outputLutWordSize;          /* count of bits of each entry ( e.g. 8 for BYTE )*/
  61.     Handle                          outputLut;                  /* handle to output lut*/
  62.     long                            colorLutInDim;              /* input dimension  ( e.g. 3 for LAB ; 4 for CMYK )*/
  63.     long                            colorLutOutDim;             /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
  64.     long                            colorLutGridPoints;         /* count of gridpoints for color lut ( for one Dimension )    */
  65.     long                            colorLutWordSize;           /* count of bits of each entry ( e.g. 8 for BYTE )*/
  66.     Handle                          colorLut;                   /* handle to color lut*/
  67.     CMBitmapColorSpace              inputColorSpace;            /* packing info for input*/
  68.     CMBitmapColorSpace              outputColorSpace;           /* packing info for output*/
  69.     void *                          userData;
  70.     unsigned long                   reserved1;
  71.     unsigned long                   reserved2;
  72.     unsigned long                   reserved3;
  73.     unsigned long                   reserved4;
  74.     unsigned long                   reserved5;
  75. };
  76. typedef struct CMAccelerationTableData  CMAccelerationTableData;
  77. typedef CMAccelerationTableData *       CMAccelerationTableDataPtr;
  78. typedef CMAccelerationTableDataPtr *    CMAccelerationTableDataHdl;
  79. /* -------------------------------------- calc data for acceleration component */
  80. struct CMAccelerationCalcData {
  81.     long                            pixelCount;                 /* count of input pixels*/
  82.     Ptr                             inputData;                  /* input array*/
  83.     Ptr                             outputData;                 /* output array*/
  84.     unsigned long                   reserved1;
  85.     unsigned long                   reserved2;
  86. };
  87. typedef struct CMAccelerationCalcData   CMAccelerationCalcData;
  88. typedef CMAccelerationCalcData *        CMAccelerationCalcDataPtr;
  89. typedef CMAccelerationCalcDataPtr *     CMAccelerationCalcDataHdl;
  90. /*
  91.    ------------------------------------------------------------------------------------------------ 
  92.                 A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  93.    ------------------------------------------------------------------------------------------------ 
  94. */
  95. #if CALL_NOT_IN_CARBON
  96. EXTERN_API( CMError )
  97. CMAccelerationLoadTables        (ComponentInstance      CMSession,
  98.                                  CMAccelerationTableDataPtr  tableData)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  99. EXTERN_API( CMError )
  100. CMAccelerationCalculateData     (ComponentInstance      CMSession,
  101.                                  CMAccelerationCalcDataPtr  calcData)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  102. #endif  /* CALL_NOT_IN_CARBON */
  103. #if PRAGMA_STRUCT_ALIGN
  104.     #pragma options align=reset
  105. #elif PRAGMA_STRUCT_PACKPUSH
  106.     #pragma pack(pop)
  107. #elif PRAGMA_STRUCT_PACK
  108.     #pragma pack()
  109. #endif
  110. #ifdef PRAGMA_IMPORT_OFF
  111. #pragma import off
  112. #elif PRAGMA_IMPORT
  113. #pragma import reset
  114. #endif
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif /* __CMACCELERATION__ */