00001
00002
00003 typedef char * Ptr;
00004 typedef Ptr * Handle;
00005 typedef int32_t Size;
00006 typedef unsigned char Boolean;
00007 typedef unsigned char Str31[32];
00008 typedef int32_t Fixed;
00009
00010 typedef int32_t OSErr;
00011 typedef int OSType;
00012
00013 typedef int32_t ComponentResult;
00014 typedef unsigned char UInt8;
00015 typedef signed char SInt8;
00016 typedef unsigned short UInt16;
00017 typedef signed short SInt16;
00018 typedef uint32_t UInt32;
00019 typedef int32_t SInt32;
00020
00021 #define FOUR_CHAR_CODE(a,b,c,d) ((uint32_t)(a)<<24 | (uint32_t)(b)<<16 | (uint32_t)(c)<<8 | (uint32_t)(d))
00022
00023
00024 typedef void *GlobalsPtr;
00025 typedef void **Globals;
00026
00027
00028
00029 struct __attribute__((__packed__)) ComponentParameters {
00030 UInt8 flags;
00031 UInt8 paramSize;
00032 short what;
00033 int32_t params[1];
00034 };
00035 typedef struct ComponentParameters ComponentParameters;
00036
00037
00038 struct __attribute__((__packed__)) ComponentDescription {
00039 OSType componentType;
00040 OSType componentSubType;
00041 OSType componentManufacturer;
00042 uint32_t componentFlags;
00043 uint32_t componentFlagsMask;
00044 };
00045 typedef struct ComponentDescription ComponentDescription;
00046
00047
00048 struct __attribute__((__packed__)) ResourceSpec {
00049 OSType resType;
00050 short resID;
00051 };
00052 typedef struct ResourceSpec ResourceSpec;
00053
00054
00055 struct __attribute__((__packed__)) ComponentResource {
00056 ComponentDescription cd;
00057 ResourceSpec component;
00058 ResourceSpec componentName;
00059 ResourceSpec componentInfo;
00060 ResourceSpec componentIcon;
00061 };
00062 typedef struct ComponentResource ComponentResource;
00063 typedef ComponentResource * ComponentResourcePtr;
00064 typedef ComponentResourcePtr * ComponentResourceHandle;
00065
00066
00067 struct __attribute__((__packed__)) ComponentRecord {
00068 int32_t data[1];
00069 };
00070 typedef struct ComponentRecord ComponentRecord;
00071 typedef ComponentRecord * Component;
00072
00073
00074 struct __attribute__((__packed__)) ComponentInstanceRecord {
00075 int32_t data[1];
00076 };
00077 typedef struct ComponentInstanceRecord ComponentInstanceRecord;
00078
00079 typedef ComponentInstanceRecord * ComponentInstance;
00080
00081
00082
00083 struct __attribute__((__packed__)) Rect {
00084 short top;
00085 short left;
00086 short bottom;
00087 short right;
00088 };
00089 typedef struct Rect Rect;
00090 typedef Rect * RectPtr;
00091
00092 struct __attribute__((__packed__)) RGBColor {
00093 unsigned short red;
00094 unsigned short green;
00095 unsigned short blue;
00096 };
00097 typedef struct RGBColor RGBColor;
00098 typedef RGBColor * RGBColorPtr;
00099 typedef RGBColorPtr * RGBColorHdl;
00100
00101 struct __attribute__((__packed__)) ColorSpec {
00102 short value;
00103 RGBColor rgb;
00104 };
00105 typedef struct ColorSpec ColorSpec;
00106 typedef ColorSpec * ColorSpecPtr;
00107 typedef ColorSpec CSpecArray[1];
00108
00109 struct __attribute__((__packed__)) ColorTable {
00110 int32_t ctSeed;
00111 short ctFlags;
00112 short ctSize;
00113 CSpecArray ctTable;
00114 };
00115 typedef struct ColorTable ColorTable;
00116 typedef ColorTable * CTabPtr;
00117 typedef CTabPtr * CTabHandle;
00118
00119 struct __attribute__((__packed__)) MatrixRecord {
00120 Fixed matrix[3][3];
00121 };
00122 typedef struct MatrixRecord MatrixRecord;
00123 typedef MatrixRecord * MatrixRecordPtr;
00124
00125 typedef int32_t ImageSequence;
00126 typedef OSType CodecType;
00127 typedef unsigned short CodecFlags;
00128 typedef uint32_t CodecQ;
00129
00130 struct __attribute__((__packed__)) ImageDescription {
00131 int32_t idSize;
00132 CodecType cType;
00133 int32_t resvd1;
00134 short resvd2;
00135 short dataRefIndex;
00136 short version;
00137 short revisionLevel;
00138 int32_t vendor;
00139 CodecQ temporalQuality;
00140 CodecQ spatialQuality;
00141 short width;
00142 short height;
00143 Fixed hRes;
00144 Fixed vRes;
00145 int32_t dataSize;
00146 short frameCount;
00147 Str31 name;
00148 short depth;
00149 short clutID;
00150 };
00151 typedef struct ImageDescription ImageDescription;
00152 typedef ImageDescription * ImageDescriptionPtr;
00153 typedef ImageDescriptionPtr * ImageDescriptionHandle;
00154
00155
00156 enum {
00157 k16LE555PixelFormat = FOUR_CHAR_CODE('L','5','5','5'),
00158 k16LE5551PixelFormat = FOUR_CHAR_CODE('5','5','5','1'),
00159 k16BE565PixelFormat = FOUR_CHAR_CODE('B','5','6','5'),
00160 k16LE565PixelFormat = FOUR_CHAR_CODE('L','5','6','5'),
00161 k24BGRPixelFormat = FOUR_CHAR_CODE('2','4','B','G'),
00162 k32BGRAPixelFormat = FOUR_CHAR_CODE('B','G','R','A'),
00163 k32ABGRPixelFormat = FOUR_CHAR_CODE('A','B','G','R'),
00164 k32RGBAPixelFormat = FOUR_CHAR_CODE('R','G','B','A'),
00165 kYUVSPixelFormat = FOUR_CHAR_CODE('y','u','v','s'),
00166 kYUVUPixelFormat = FOUR_CHAR_CODE('y','u','v','u'),
00167 kYVU9PixelFormat = FOUR_CHAR_CODE('Y','V','U','9'),
00168 kYUV411PixelFormat = FOUR_CHAR_CODE('Y','4','1','1'),
00169 kYVYU422PixelFormat = FOUR_CHAR_CODE('Y','V','Y','U'),
00170 kUYVY422PixelFormat = FOUR_CHAR_CODE('U','Y','V','Y'),
00171 kYUV211PixelFormat = FOUR_CHAR_CODE('Y','2','1','1'),
00172 k2vuyPixelFormat = FOUR_CHAR_CODE('2','v','u','y')
00173 };
00174
00175 struct __attribute__((__packed__)) PixMapExtension {
00176 int32_t extSize;
00177 uint32_t pmBits;
00178 void * pmGD;
00179 int32_t pmSeed;
00180 Fixed gammaLevel;
00181 Fixed requestedGammaLevel;
00182 uint32_t reserved2;
00183 int32_t longRowBytes;
00184 uint32_t signature;
00185 Handle baseAddrHandle;
00186 };
00187 typedef struct PixMapExtension PixMapExtension;
00188
00189 typedef PixMapExtension * PixMapExtPtr;
00190 typedef PixMapExtPtr * PixMapExtHandle;
00191
00192
00193 struct __attribute__((__packed__)) PixMap {
00194 Ptr baseAddr;
00195 short rowBytes;
00196 Rect bounds;
00197 short pmVersion;
00198 short packType;
00199 int32_t packSize;
00200 Fixed hRes;
00201 Fixed vRes;
00202 short pixelType;
00203 short pixelSize;
00204 short cmpCount;
00205 short cmpSize;
00206 OSType pixelFormat;
00207 CTabHandle pmTable;
00208 PixMapExtHandle pmExt;
00209 };
00210 typedef struct PixMap PixMap;
00211 typedef PixMap * PixMapPtr;
00212 typedef PixMapPtr * PixMapHandle;
00213
00214
00215 struct __attribute__((__packed__)) BitMap {
00216 Ptr baseAddr;
00217 short rowBytes;
00218 Rect bounds;
00219 };
00220 typedef struct BitMap BitMap;
00221 typedef BitMap * BitMapPtr;
00222 typedef BitMapPtr * BitMapHandle;
00223 typedef struct OpaqueRgnHandle* RgnHandle;
00224
00225 struct Pattern {
00226 UInt8 pat[8];
00227 };
00228 typedef struct Pattern Pattern;
00229 typedef unsigned char Style;
00230 typedef Style StyleField;
00231 struct __attribute__((__packed__)) Point {
00232 short v;
00233 short h;
00234 };
00235 typedef struct Point Point;
00236 struct __attribute__((__packed__)) GrafPort {
00237 short device;
00238 BitMap portBits;
00239 Rect portRect;
00240 RgnHandle visRgn;
00241 RgnHandle clipRgn;
00242 Pattern bkPat;
00243 Pattern fillPat;
00244 Point pnLoc;
00245 Point pnSize;
00246 short pnMode;
00247 Pattern pnPat;
00248 short pnVis;
00249 short txFont;
00250 StyleField txFace;
00251 UInt8 txFlags;
00252 short txMode;
00253 short txSize;
00254 Fixed spExtra;
00255 int32_t fgColor;
00256 int32_t bkColor;
00257 short colrBit;
00258 short patStretch;
00259 Handle picSave;
00260 Handle rgnSave;
00261 Handle polySave;
00262 void* grafProcs;
00263 };
00264 typedef struct GrafPort GrafPort;
00265 typedef GrafPort *GWorldPtr;
00266 typedef GWorldPtr *GWorldHandle;
00267 #define anyCodec ((CodecComponent)0)
00268 enum {
00269
00270 srcCopy = 0,
00271 srcOr = 1,
00272 srcXor = 2,
00273 srcBic = 3,
00274 notSrcCopy = 4,
00275 notSrcOr = 5,
00276 notSrcXor = 6,
00277 notSrcBic = 7,
00278 patCopy = 8,
00279 patOr = 9,
00280 patXor = 10,
00281 patBic = 11,
00282 notPatCopy = 12,
00283 notPatOr = 13,
00284 notPatXor = 14,
00285 notPatBic = 15,
00286 grayishTextOr = 49,
00287 hilitetransfermode = 50,
00288 hilite = 50,
00289 blend = 32,
00290 addPin = 33,
00291 addOver = 34,
00292 subPin = 35,
00293 addMax = 37,
00294 adMax = 37,
00295 subOver = 38,
00296 adMin = 39,
00297 ditherCopy = 64,
00298 transparent = 36
00299 };
00300
00301 typedef uint32_t GWorldFlags;
00302
00303
00304
00305
00306
00307 typedef Component CompressorComponent;
00308 typedef Component DecompressorComponent;
00309 typedef Component CodecComponent;
00310
00311 enum {
00312 codecLosslessQuality = 0x00000400,
00313 codecMaxQuality = 0x000003FF,
00314 codecMinQuality = 0x00000000,
00315 codecLowQuality = 0x00000100,
00316 codecNormalQuality = 0x00000200,
00317 codecHighQuality = 0x00000300
00318 };
00319
00320
00321
00322
00323 typedef void* ImageCodecDrawBandCompleteUPP;
00324 typedef int64_t ICMProgressProcRecord;
00325 typedef int64_t ICMCompletionProcRecord;
00326 typedef ICMCompletionProcRecord* ICMCompletionProcRecordPtr;
00327 typedef int64_t ICMDataProcRecord;
00328 typedef void* ICMFrameTimePtr;
00329 typedef void* CDSequenceDataSourcePtr;
00330 typedef void* ICMFrameTimeInfoPtr;
00331
00332
00333 typedef struct OpaqueGrafPtr* GrafPtr;
00334 typedef GrafPtr CGrafPtr;
00335
00336
00337
00338 enum {
00339 codecCanScale = 1L << 0,
00340 codecCanMask = 1L << 1,
00341 codecCanMatte = 1L << 2,
00342 codecCanTransform = 1L << 3,
00343 codecCanTransferMode = 1L << 4,
00344 codecCanCopyPrev = 1L << 5,
00345 codecCanSpool = 1L << 6,
00346 codecCanClipVertical = 1L << 7,
00347 codecCanClipRectangular = 1L << 8,
00348 codecCanRemapColor = 1L << 9,
00349 codecCanFastDither = 1L << 10,
00350 codecCanSrcExtract = 1L << 11,
00351 codecCanCopyPrevComp = 1L << 12,
00352 codecCanAsync = 1L << 13,
00353 codecCanMakeMask = 1L << 14,
00354 codecCanShift = 1L << 15,
00355 codecCanAsyncWhen = 1L << 16,
00356 codecCanShieldCursor = 1L << 17,
00357 codecCanManagePrevBuffer = 1L << 18,
00358 codecHasVolatileBuffer = 1L << 19,
00359 codecWantsRegionMask = 1L << 20,
00360 codecImageBufferIsOnScreen = 1L << 21,
00361 codecWantsDestinationPixels = 1L << 22,
00362 codecWantsSpecialScaling = 1L << 23,
00363 codecHandlesInputs = 1L << 24,
00364 codecCanDoIndirectSurface = 1L << 25,
00365 codecIsSequenceSensitive = 1L << 26,
00366 codecRequiresOffscreen = 1L << 27,
00367 codecRequiresMaskBits = 1L << 28,
00368 codecCanRemapResolution = 1L << 29,
00369 codecIsDirectToScreenOnly = 1L << 30,
00370 codecCanLockSurface = 1L << 31
00371 };
00372
00373
00374 enum {
00375 codecUsesOverlaySurface = 1L << 0,
00376 codecImageBufferIsOverlaySurface = 1L << 1,
00377 codecSrcMustBeImageBuffer = 1L << 2,
00378 codecImageBufferIsInAGPMemory = 1L << 4,
00379 codecImageBufferIsInPCIMemory = 1L << 5
00380 };
00381
00382
00383
00384 enum {
00385 codecConditionFirstBand = 1L << 0,
00386 codecConditionLastBand = 1L << 1,
00387 codecConditionFirstFrame = 1L << 2,
00388 codecConditionNewDepth = 1L << 3,
00389 codecConditionNewTransform = 1L << 4,
00390 codecConditionNewSrcRect = 1L << 5,
00391 codecConditionNewMask = 1L << 6,
00392 codecConditionNewMatte = 1L << 7,
00393 codecConditionNewTransferMode = 1L << 8,
00394 codecConditionNewClut = 1L << 9,
00395 codecConditionNewAccuracy = 1L << 10,
00396 codecConditionNewDestination = 1L << 11,
00397 codecConditionFirstScreen = 1L << 12,
00398 codecConditionDoCursor = 1L << 13,
00399 codecConditionCatchUpDiff = 1L << 14,
00400 codecConditionMaskMayBeChanged = 1L << 15,
00401 codecConditionToBuffer = 1L << 16,
00402 codecConditionCodecChangedMask = 1L << 31
00403 };
00404
00405
00406
00407 struct __attribute__((__packed__)) CodecCapabilities {
00408 int32_t flags;
00409 short wantedPixelSize;
00410 short extendWidth;
00411 short extendHeight;
00412 short bandMin;
00413 short bandInc;
00414 short pad;
00415 uint32_t time;
00416 int32_t flags2;
00417 };
00418 typedef struct CodecCapabilities CodecCapabilities;
00419
00420 struct __attribute__((__packed__)) CodecDecompressParams {
00421 ImageSequence sequenceID;
00422 ImageDescriptionHandle imageDescription;
00423 Ptr data;
00424 int32_t bufferSize;
00425
00426 int32_t frameNumber;
00427 int32_t startLine;
00428 int32_t stopLine;
00429 int32_t conditionFlags;
00430
00431 CodecFlags callerFlags;
00432 CodecCapabilities * capabilities;
00433 ICMProgressProcRecord progressProcRecord;
00434 ICMCompletionProcRecord completionProcRecord;
00435
00436 ICMDataProcRecord dataProcRecord;
00437 CGrafPtr port;
00438 PixMap dstPixMap;
00439 BitMapPtr maskBits;
00440 PixMapPtr mattePixMap;
00441 Rect srcRect;
00442 MatrixRecord * matrix;
00443 CodecQ accuracy;
00444 short transferMode;
00445 ICMFrameTimePtr frameTime;
00446 int32_t reserved[1];
00447
00448
00449 SInt8 matrixFlags;
00450 SInt8 matrixType;
00451 Rect dstRect;
00452
00453
00454 UInt16 majorSourceChangeSeed;
00455 UInt16 minorSourceChangeSeed;
00456 CDSequenceDataSourcePtr sourceData;
00457
00458 RgnHandle maskRegion;
00459
00460
00461 OSType ** wantedDestinationPixelTypes;
00462
00463 int32_t screenFloodMethod;
00464 int32_t screenFloodValue;
00465 short preferredOffscreenPixelSize;
00466
00467
00468 ICMFrameTimeInfoPtr syncFrameTime;
00469 Boolean needUpdateOnTimeChange;
00470 Boolean enableBlackLining;
00471 Boolean needUpdateOnSourceChange;
00472 Boolean pad;
00473
00474 int32_t unused;
00475
00476 CGrafPtr finalDestinationPort;
00477
00478 int32_t requestedBufferWidth;
00479 int32_t requestedBufferHeight;
00480
00481
00482 Rect displayableAreaOfRequestedBuffer;
00483 Boolean requestedSingleField;
00484 Boolean needUpdateOnNextIdle;
00485 Boolean pad2[2];
00486 Fixed bufferGammaLevel;
00487
00488
00489 UInt32 taskWeight;
00490 OSType taskName;
00491 };
00492 typedef struct CodecDecompressParams CodecDecompressParams;
00493
00494
00495
00496 struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities {
00497 int32_t recordSize;
00498 int32_t decompressRecordSize;
00499 Boolean canAsync;
00500 UInt8 pad0;
00501
00502
00503 UInt16 suggestedQueueSize;
00504 Boolean canProvideTrigger;
00505
00506
00507 Boolean subCodecFlushesScreen;
00508 Boolean subCodecCallsDrawBandComplete;
00509 UInt8 pad2[1];
00510
00511
00512 Boolean isChildCodec;
00513 UInt8 pad3[3];
00514 };
00515 typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
00516
00517
00518 struct __attribute__((__packed__)) ImageSubCodecDecompressRecord {
00519 Ptr baseAddr;
00520 int32_t rowBytes;
00521 Ptr codecData;
00522 ICMProgressProcRecord progressProcRecord;
00523 ICMDataProcRecord dataProcRecord;
00524 void * userDecompressRecord;
00525 UInt8 frameType;
00526 Boolean inhibitMP;
00527 UInt8 pad[2];
00528 int32_t priv[2];
00529
00530
00531 ImageCodecDrawBandCompleteUPP drawBandCompleteUPP;
00532 void * drawBandCompleteRefCon;
00533 };
00534 typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
00535
00536
00537
00538 enum {
00539 codecInfoDoes1 = (1L << 0),
00540 codecInfoDoes2 = (1L << 1),
00541 codecInfoDoes4 = (1L << 2),
00542 codecInfoDoes8 = (1L << 3),
00543 codecInfoDoes16 = (1L << 4),
00544 codecInfoDoes32 = (1L << 5),
00545 codecInfoDoesDither = (1L << 6),
00546 codecInfoDoesStretch = (1L << 7),
00547 codecInfoDoesShrink = (1L << 8),
00548 codecInfoDoesMask = (1L << 9),
00549 codecInfoDoesTemporal = (1L << 10),
00550 codecInfoDoesDouble = (1L << 11),
00551 codecInfoDoesQuad = (1L << 12),
00552 codecInfoDoesHalf = (1L << 13),
00553 codecInfoDoesQuarter = (1L << 14),
00554 codecInfoDoesRotate = (1L << 15),
00555 codecInfoDoesHorizFlip = (1L << 16),
00556 codecInfoDoesVertFlip = (1L << 17),
00557 codecInfoHasEffectParameterList = (1L << 18),
00558 codecInfoDoesBlend = (1L << 19),
00559 codecInfoDoesWarp = (1L << 20),
00560 codecInfoDoesRecompress = (1L << 21),
00561 codecInfoDoesSpool = (1L << 22),
00562 codecInfoDoesRateConstrain = (1L << 23)
00563 };
00564
00565
00566 enum {
00567 codecInfoDepth1 = (1L << 0),
00568 codecInfoDepth2 = (1L << 1),
00569 codecInfoDepth4 = (1L << 2),
00570 codecInfoDepth8 = (1L << 3),
00571 codecInfoDepth16 = (1L << 4),
00572 codecInfoDepth32 = (1L << 5),
00573 codecInfoDepth24 = (1L << 6),
00574 codecInfoDepth33 = (1L << 7),
00575 codecInfoDepth34 = (1L << 8),
00576 codecInfoDepth36 = (1L << 9),
00577 codecInfoDepth40 = (1L << 10),
00578 codecInfoStoresClut = (1L << 11),
00579 codecInfoDoesLossless = (1L << 12),
00580 codecInfoSequenceSensitive = (1L << 13)
00581 };
00582
00583 struct __attribute__((__packed__)) CodecInfo {
00584 Str31 typeName;
00585 short version;
00586 short revisionLevel;
00587 int32_t vendor;
00588 int32_t decompressFlags;
00589 int32_t compressFlags;
00590 int32_t formatFlags;
00591 UInt8 compressionAccuracy;
00592 UInt8 decompressionAccuracy;
00593 unsigned short compressionSpeed;
00594 unsigned short decompressionSpeed;
00595 UInt8 compressionLevel;
00596 UInt8 resvd;
00597 short minimumHeight;
00598 short minimumWidth;
00599 short decompressPipelineLatency;
00600 short compressPipelineLatency;
00601 int32_t privateData;
00602 };
00603 typedef struct CodecInfo CodecInfo;
00604
00605 enum {
00606 codecFlagUseImageBuffer = (1L << 0),
00607 codecFlagUseScreenBuffer = (1L << 1),
00608 codecFlagUpdatePrevious = (1L << 2),
00609 codecFlagNoScreenUpdate = (1L << 3),
00610 codecFlagWasCompressed = (1L << 4),
00611 codecFlagDontOffscreen = (1L << 5),
00612 codecFlagUpdatePreviousComp = (1L << 6),
00613 codecFlagForceKeyFrame = (1L << 7),
00614 codecFlagOnlyScreenUpdate = (1L << 8),
00615 codecFlagLiveGrab = (1L << 9),
00616 codecFlagDiffFrame = (1L << 9),
00617 codecFlagDontUseNewImageBuffer = (1L << 10),
00618 codecFlagInterlaceUpdate = (1L << 11),
00619 codecFlagCatchUpDiff = (1L << 12),
00620 codecFlagSupportDisable = (1L << 13),
00621 codecFlagReenable = (1L << 14)
00622 };
00623
00624 static inline void dump_ImageDescription(void* xxx){
00625 ImageDescription* id=(ImageDescription*)xxx;
00626 unsigned char* x;
00627 int i;
00628
00629 for(i=0;i<id->idSize;i++){
00630 printf(" %02X",((unsigned char*)id)[i]);
00631 if((i%16)==15) printf("\n");
00632 }
00633 printf("\n");
00634
00635
00636 printf("=============== ImageDescription at %p ==================\n",xxx);
00637 printf("idSize=0x%X fourcc=0x%08X\n",id->idSize,id->cType);
00638 printf("ver=%d rev=%d vendor=0x%08X\n",id->version,id->revisionLevel,id->vendor);
00639 printf("tempQ=%d spatQ=%d dim: %d x %d dpi: %d x %d depth: %d\n",
00640 id->temporalQuality,id->spatialQuality,
00641 id->width, id->height,
00642 id->hRes, id->vRes,
00643 id->depth);
00644 printf("dataSize=%d frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
00645 printf("name='%.*s'\n",((char*)(&id->name))[0],((char*)(&id->name))+1);
00646 x=((char*)(&id->clutID))+2;
00647 if(id->idSize>sizeof(ImageDescription)){
00648 printf("%02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X\n",
00649 x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]);
00650 }
00651 printf("=========================================================\n");
00652 }
00653
00654 static inline void dump_Rect(char* title,Rect *r){
00655 printf("%s: %d;%d - %d;%d\n",title,
00656 (int)r->top,(int)r->left,(int)r->bottom,(int)r->right);
00657 }
00658
00659 static inline void dump_MatrixRecord(char* title, MatrixRecord *m){
00660 printf("%s: [%d %d %d][%d %d %d][%d %d %d]\n",title,
00661 m->matrix[0][0],m->matrix[0][1],m->matrix[0][2],
00662 m->matrix[1][0],m->matrix[1][1],m->matrix[1][2],
00663 m->matrix[2][0],m->matrix[2][1],m->matrix[2][2]);
00664 }
00665
00666 static inline void dump_PixMap(void* xxx){
00667 PixMap *p=xxx;
00668 printf("=============== PixMap at %p ==================\n",xxx);
00669 printf("base=%p stride=%d\n",p->baseAddr, p->rowBytes);
00670 dump_Rect("bounds",&p->bounds);
00671 printf("pmVersion=0x%X packType=0x%X\n packSize=0x%X\n",
00672 p->pmVersion,p->packType, p->packSize);
00673 printf("hRes=0x%X vRes=0x%X pixelType=0x%X pixelSize=0x%X\n",
00674 p->hRes,p->vRes,p->pixelType,p->pixelSize);
00675 printf("cmpCount=0x%X cmpSize=0x%X pixelFormat=0x%X\n",
00676 p->cmpCount,p->cmpSize,p->pixelFormat);
00677 printf("pmTable=%p pmExt=%p\n",p->pmTable,p->pmExt);
00678 printf("=========================================================\n");
00679 }
00680
00681 static inline void dump_CodecCapabilities(void* xxx){
00682 CodecCapabilities* cc=xxx;
00683 if(!xxx) return;
00684 printf("=============== CodecCapabilities at %p =================\n",xxx);
00685 printf("flags=0x%X flags2=0x%X\n",cc->flags,cc->flags2);
00686 printf("wantedPixelSize=%d extendWidth=%d extendHeight=%d band=%d+%d\n",
00687 cc->wantedPixelSize,cc->extendWidth,cc->extendHeight,
00688 cc->bandMin,cc->bandInc);
00689 printf("pad=0x%X time=0x%X\n",cc->pad,cc->time);
00690 printf("=========================================================\n");
00691 }
00692
00693 static inline void dump_CodecDecompressParams(void* xxx){
00694 CodecDecompressParams* cd=xxx;
00695 ImageDescription **idh;
00696 int i;
00697 if(!xxx) return;
00698 printf("=============== CodecDecompressParams at %p ==================\n",xxx);
00699 printf("sequenceID=%d\n",cd->sequenceID);
00700 idh=cd->imageDescription;
00701 if(idh && idh[0]) dump_ImageDescription(idh[0]);
00702
00703 for(i=0;i<sizeof(CodecDecompressParams);i++){
00704 printf(" %02X",((unsigned char*)cd)[i]);
00705 if((i%16)==15) printf("\n");
00706 }
00707 printf("\n");
00708
00709 printf("data=%p size=%d\n",cd->data,cd->bufferSize);
00710 printf("frameno=%d lines: %d .. %d condflags=0x%X callerflags=0x%X\n",
00711 cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags);
00712
00713
00714 dump_PixMap(&cd->dstPixMap);
00715
00716 if(cd->matrix) dump_MatrixRecord("matrix",cd->matrix);
00717 if(cd->capabilities) dump_CodecCapabilities(cd->capabilities);
00718 printf("accuracy=%d transferMode=%d matrixFlags=0x%X matrixType=%d\n",
00719 (int)cd->accuracy, (int)cd->transferMode, (int)cd->matrixFlags, (int)cd->matrixType);
00720 printf("srcrect: %d;%d - %d;%d\n",cd->srcRect.top,cd->srcRect.left,cd->srcRect.bottom,cd->srcRect.right);
00721 printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right);
00722 printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes);
00723 if(cd->wantedDestinationPixelTypes){
00724 unsigned int* p=cd->wantedDestinationPixelTypes;
00725 while(p[0]){
00726 printf(" 0x%08X %.4s\n",p[0],&p[0]);
00727 ++p;
00728 }
00729 }
00730 printf("screenFloodMethod=%d value=%d preferredOffscreenPixelSize=%d\n",
00731 cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize);
00732 printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n",
00733 cd->progressProcRecord, cd->completionProcRecord,
00734 cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime);
00735
00736
00737 printf("=========================================================\n");
00738
00739
00740 }
00741