Mercurial > mplayer.hg
annotate loader/qtx/qtxsdk/components.h @ 15219:c931a567a395
Translation synced with 1.52
author | jheryan |
---|---|
date | Wed, 20 Apr 2005 07:41:24 +0000 |
parents | a9e2fda933be |
children | 6ac1ece1f9fe |
rev | line source |
---|---|
5253 | 1 // Basic types: |
2 | |
3 typedef char * Ptr; | |
4 typedef Ptr * Handle; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
5 typedef int32_t Size; |
5253 | 6 typedef unsigned char Boolean; |
7 typedef unsigned char Str31[32]; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
8 typedef int32_t Fixed; |
5253 | 9 |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
10 typedef int32_t OSErr; |
5253 | 11 typedef int OSType; |
12 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
13 typedef int32_t ComponentResult; |
5253 | 14 typedef unsigned char UInt8; |
15 typedef signed char SInt8; | |
16 typedef unsigned short UInt16; | |
17 typedef signed short SInt16; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
18 typedef uint32_t UInt32; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
19 typedef int32_t SInt32; |
5253 | 20 |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
21 #define FOUR_CHAR_CODE(a,b,c,d) ((uint32_t)(a)<<24 | (uint32_t)(b)<<16 | (uint32_t)(c)<<8 | (uint32_t)(d)) /* otherwise compiler will complain about values with high bit set */ |
2501 | 22 |
2797 | 23 // codec private shit: |
24 typedef void *GlobalsPtr; | |
25 typedef void **Globals; | |
26 | |
5253 | 27 //==================== COMPONENTS =========================== |
2797 | 28 |
8266 | 29 struct __attribute__((__packed__)) ComponentParameters { |
2797 | 30 UInt8 flags; /* call modifiers: sync/async, deferred, immed, etc */ |
31 UInt8 paramSize; /* size in bytes of actual parameters passed to this call */ | |
32 short what; /* routine selector, negative for Component management calls */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
33 int32_t params[1]; /* actual parameters for the indicated routine */ |
2797 | 34 }; |
35 typedef struct ComponentParameters ComponentParameters; | |
36 | |
37 | |
8266 | 38 struct __attribute__((__packed__)) ComponentDescription { |
2797 | 39 OSType componentType; /* A unique 4-byte code indentifying the command set */ |
40 OSType componentSubType; /* Particular flavor of this instance */ | |
41 OSType componentManufacturer; /* Vendor indentification */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
42 uint32_t componentFlags; /* 8 each for Component,Type,SubType,Manuf/revision */ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
43 uint32_t componentFlagsMask; /* Mask for specifying which flags to consider in search, zero during registration */ |
2797 | 44 }; |
45 typedef struct ComponentDescription ComponentDescription; | |
46 | |
47 | |
8266 | 48 struct __attribute__((__packed__)) ResourceSpec { |
2797 | 49 OSType resType; /* 4-byte code */ |
50 short resID; /* */ | |
51 }; | |
52 typedef struct ResourceSpec ResourceSpec; | |
53 | |
54 | |
8266 | 55 struct __attribute__((__packed__)) ComponentResource { |
2797 | 56 ComponentDescription cd; /* Registration parameters */ |
57 ResourceSpec component; /* resource where Component code is found */ | |
58 ResourceSpec componentName; /* name string resource */ | |
59 ResourceSpec componentInfo; /* info string resource */ | |
60 ResourceSpec componentIcon; /* icon resource */ | |
61 }; | |
62 typedef struct ComponentResource ComponentResource; | |
63 typedef ComponentResource * ComponentResourcePtr; | |
64 typedef ComponentResourcePtr * ComponentResourceHandle; | |
65 | |
66 | |
8266 | 67 struct __attribute__((__packed__)) ComponentRecord { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
68 int32_t data[1]; |
2797 | 69 }; |
70 typedef struct ComponentRecord ComponentRecord; | |
71 typedef ComponentRecord * Component; | |
72 | |
73 | |
8266 | 74 struct __attribute__((__packed__)) ComponentInstanceRecord { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
75 int32_t data[1]; |
2797 | 76 }; |
77 typedef struct ComponentInstanceRecord ComponentInstanceRecord; | |
78 | |
79 typedef ComponentInstanceRecord * ComponentInstance; | |
80 | |
5253 | 81 // ========================= QUICKDRAW ========================= |
82 | |
5334 | 83 struct __attribute__((__packed__)) Rect { |
5253 | 84 short top; |
85 short left; | |
86 short bottom; | |
87 short right; | |
88 }; | |
89 typedef struct Rect Rect; | |
90 typedef Rect * RectPtr; | |
91 | |
8266 | 92 struct __attribute__((__packed__)) RGBColor { |
5253 | 93 unsigned short red; /*magnitude of red component*/ |
94 unsigned short green; /*magnitude of green component*/ | |
95 unsigned short blue; /*magnitude of blue component*/ | |
96 }; | |
97 typedef struct RGBColor RGBColor; | |
98 typedef RGBColor * RGBColorPtr; | |
99 typedef RGBColorPtr * RGBColorHdl; | |
100 | |
8266 | 101 struct __attribute__((__packed__)) ColorSpec { |
5253 | 102 short value; /*index or other value*/ |
103 RGBColor rgb; /*true color*/ | |
104 }; | |
105 typedef struct ColorSpec ColorSpec; | |
106 typedef ColorSpec * ColorSpecPtr; | |
107 typedef ColorSpec CSpecArray[1]; | |
108 | |
8266 | 109 struct __attribute__((__packed__)) ColorTable { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
110 int32_t ctSeed; /*unique identifier for table*/ |
5253 | 111 short ctFlags; /*high bit: 0 = PixMap; 1 = device*/ |
112 short ctSize; /*number of entries in CTTable*/ | |
113 CSpecArray ctTable; /*array [0..0] of ColorSpec*/ | |
114 }; | |
115 typedef struct ColorTable ColorTable; | |
116 typedef ColorTable * CTabPtr; | |
117 typedef CTabPtr * CTabHandle; | |
118 | |
8266 | 119 struct __attribute__((__packed__)) MatrixRecord { |
5253 | 120 Fixed matrix[3][3]; |
121 }; | |
122 typedef struct MatrixRecord MatrixRecord; | |
123 typedef MatrixRecord * MatrixRecordPtr; | |
124 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
125 typedef int32_t ImageSequence; |
5253 | 126 typedef OSType CodecType; |
127 typedef unsigned short CodecFlags; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
128 typedef uint32_t CodecQ; |
5253 | 129 |
8266 | 130 struct __attribute__((__packed__)) ImageDescription { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
131 int32_t idSize; /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */ |
5253 | 132 CodecType cType; /* what kind of codec compressed this data */ |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
133 int32_t resvd1; /* reserved for Apple use */ |
5253 | 134 short resvd2; /* reserved for Apple use */ |
135 short dataRefIndex; /* set to zero */ | |
136 short version; /* which version is this data */ | |
137 short revisionLevel; /* what version of that codec did this */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
138 int32_t vendor; /* whose codec compressed this data */ |
5253 | 139 CodecQ temporalQuality; /* what was the temporal quality factor */ |
140 CodecQ spatialQuality; /* what was the spatial quality factor */ | |
141 short width; /* how many pixels wide is this data */ | |
142 short height; /* how many pixels high is this data */ | |
143 Fixed hRes; /* horizontal resolution */ | |
144 Fixed vRes; /* vertical resolution */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
145 int32_t dataSize; /* if known, the size of data for this image descriptor */ |
5253 | 146 short frameCount; /* number of frames this description applies to */ |
147 Str31 name; /* name of codec ( in case not installed ) */ | |
148 short depth; /* what depth is this data (1-32) or ( 33-40 grayscale ) */ | |
149 short clutID; /* clut id or if 0 clut follows or -1 if no clut */ | |
150 }; | |
151 typedef struct ImageDescription ImageDescription; | |
152 typedef ImageDescription * ImageDescriptionPtr; | |
153 typedef ImageDescriptionPtr * ImageDescriptionHandle; | |
154 | |
155 /* values for PixMap.pixelFormat*/ | |
156 enum { | |
11412 | 157 k16LE555PixelFormat = FOUR_CHAR_CODE('L','5','5','5'), /* 16 bit LE rgb 555 (PC)*/ |
158 k16LE5551PixelFormat = FOUR_CHAR_CODE('5','5','5','1'), /* 16 bit LE rgb 5551*/ | |
159 k16BE565PixelFormat = FOUR_CHAR_CODE('B','5','6','5'), /* 16 bit BE rgb 565*/ | |
160 k16LE565PixelFormat = FOUR_CHAR_CODE('L','5','6','5'), /* 16 bit LE rgb 565*/ | |
161 k24BGRPixelFormat = FOUR_CHAR_CODE('2','4','B','G'), /* 24 bit bgr */ | |
162 k32BGRAPixelFormat = FOUR_CHAR_CODE('B','G','R','A'), /* 32 bit bgra (Matrox)*/ | |
163 k32ABGRPixelFormat = FOUR_CHAR_CODE('A','B','G','R'), /* 32 bit abgr */ | |
164 k32RGBAPixelFormat = FOUR_CHAR_CODE('R','G','B','A'), /* 32 bit rgba */ | |
165 kYUVSPixelFormat = FOUR_CHAR_CODE('y','u','v','s'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/ | |
166 kYUVUPixelFormat = FOUR_CHAR_CODE('y','u','v','u'), /* YUV 4:2:2 byte ordering 16-signed*/ | |
167 kYVU9PixelFormat = FOUR_CHAR_CODE('Y','V','U','9'), /* YVU9 Planar 9*/ | |
168 kYUV411PixelFormat = FOUR_CHAR_CODE('Y','4','1','1'), /* YUV 4:1:1 Interleaved 16*/ | |
169 kYVYU422PixelFormat = FOUR_CHAR_CODE('Y','V','Y','U'), /* YVYU 4:2:2 byte ordering 16*/ | |
170 kUYVY422PixelFormat = FOUR_CHAR_CODE('U','Y','V','Y'), /* UYVY 4:2:2 byte ordering 16*/ | |
171 kYUV211PixelFormat = FOUR_CHAR_CODE('Y','2','1','1'), /* YUV 2:1:1 Packed 8*/ | |
172 k2vuyPixelFormat = FOUR_CHAR_CODE('2','v','u','y') /* UYVY 4:2:2 byte ordering 16*/ | |
5253 | 173 }; |
174 | |
8266 | 175 struct __attribute__((__packed__)) PixMapExtension { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
176 int32_t extSize; /*size of struct, duh!*/ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
177 uint32_t pmBits; /*pixmap attributes bitfield*/ |
5253 | 178 void * pmGD; /*this is a GDHandle*/ |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
179 int32_t pmSeed; |
5253 | 180 Fixed gammaLevel; /*pixmap gammalevel*/ |
181 Fixed requestedGammaLevel; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
182 uint32_t reserved2; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
183 int32_t longRowBytes; /*used when rowBytes > 16382*/ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
184 uint32_t signature; |
5253 | 185 Handle baseAddrHandle; |
186 }; | |
187 typedef struct PixMapExtension PixMapExtension; | |
188 | |
189 typedef PixMapExtension * PixMapExtPtr; | |
190 typedef PixMapExtPtr * PixMapExtHandle; | |
191 | |
192 | |
8266 | 193 struct __attribute__((__packed__)) PixMap { |
5253 | 194 Ptr baseAddr; /*pointer to pixels*/ |
195 short rowBytes; /*offset to next line*/ | |
196 Rect bounds; /*encloses bitmap*/ | |
197 short pmVersion; /*pixMap version number*/ | |
198 short packType; /*defines packing format*/ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
199 int32_t packSize; /*length of pixel data*/ |
5253 | 200 Fixed hRes; /*horiz. resolution (ppi)*/ |
201 Fixed vRes; /*vert. resolution (ppi)*/ | |
202 short pixelType; /*defines pixel type*/ | |
203 short pixelSize; /*# bits in pixel*/ | |
204 short cmpCount; /*# components in pixel*/ | |
205 short cmpSize; /*# bits per component*/ | |
206 OSType pixelFormat; /*fourCharCode representation*/ | |
207 CTabHandle pmTable; /*color map for this pixMap*/ | |
208 PixMapExtHandle pmExt; /*Handle to pixMap extension*/ | |
209 }; | |
210 typedef struct PixMap PixMap; | |
211 typedef PixMap * PixMapPtr; | |
212 typedef PixMapPtr * PixMapHandle; | |
213 | |
214 | |
8266 | 215 struct __attribute__((__packed__)) BitMap { |
5253 | 216 Ptr baseAddr; |
217 short rowBytes; | |
218 Rect bounds; | |
219 }; | |
220 typedef struct BitMap BitMap; | |
221 typedef BitMap * BitMapPtr; | |
222 typedef BitMapPtr * BitMapHandle; | |
8266 | 223 typedef struct OpaqueRgnHandle* RgnHandle; |
224 | |
225 struct Pattern { | |
226 UInt8 pat[8]; | |
227 }; | |
228 typedef struct Pattern Pattern; | |
229 typedef unsigned char Style; | |
230 typedef Style StyleField; | |
231 struct __attribute__((__packed__)) Point { | |
232 short v; | |
233 short h; | |
234 }; | |
235 typedef struct Point Point; | |
236 struct __attribute__((__packed__)) GrafPort { | |
237 short device; | |
238 BitMap portBits; | |
239 Rect portRect; | |
240 RgnHandle visRgn; | |
241 RgnHandle clipRgn; | |
242 Pattern bkPat; | |
243 Pattern fillPat; | |
244 Point pnLoc; | |
245 Point pnSize; | |
246 short pnMode; | |
247 Pattern pnPat; | |
248 short pnVis; | |
249 short txFont; | |
250 StyleField txFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/ | |
251 UInt8 txFlags; /* QuickTime uses second 8 bits of StyleField for txFlags */ | |
252 short txMode; | |
253 short txSize; | |
254 Fixed spExtra; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
255 int32_t fgColor; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
256 int32_t bkColor; |
8266 | 257 short colrBit; |
258 short patStretch; | |
259 Handle picSave; | |
260 Handle rgnSave; | |
261 Handle polySave; | |
262 /*QDProcsPtr*/void* grafProcs; | |
263 }; | |
264 typedef struct GrafPort GrafPort; | |
265 typedef GrafPort *GWorldPtr; | |
266 typedef GWorldPtr *GWorldHandle; | |
267 #define anyCodec ((CodecComponent)0) | |
268 enum { | |
269 /* transfer modes */ | |
270 srcCopy = 0, /*the 16 transfer modes*/ | |
271 srcOr = 1, | |
272 srcXor = 2, | |
273 srcBic = 3, | |
274 notSrcCopy = 4, | |
275 notSrcOr = 5, | |
276 notSrcXor = 6, | |
277 notSrcBic = 7, | |
278 patCopy = 8, | |
279 patOr = 9, | |
280 patXor = 10, | |
281 patBic = 11, | |
282 notPatCopy = 12, | |
283 notPatOr = 13, | |
284 notPatXor = 14, | |
285 notPatBic = 15, /* Special Text Transfer Mode */ | |
286 grayishTextOr = 49, | |
287 hilitetransfermode = 50, | |
288 hilite = 50, /* Arithmetic transfer modes */ | |
289 blend = 32, | |
290 addPin = 33, | |
291 addOver = 34, | |
292 subPin = 35, | |
293 addMax = 37, | |
294 adMax = 37, | |
295 subOver = 38, | |
296 adMin = 39, | |
297 ditherCopy = 64, /* Transparent mode constant */ | |
298 transparent = 36 | |
299 }; | |
300 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
301 typedef uint32_t GWorldFlags; |
8266 | 302 |
303 | |
5253 | 304 |
305 // ============================== CODECS =========================== | |
306 | |
307 typedef Component CompressorComponent; | |
308 typedef Component DecompressorComponent; | |
309 typedef Component CodecComponent; | |
310 | |
8266 | 311 enum { |
312 codecLosslessQuality = 0x00000400, | |
313 codecMaxQuality = 0x000003FF, | |
314 codecMinQuality = 0x00000000, | |
315 codecLowQuality = 0x00000100, | |
316 codecNormalQuality = 0x00000200, | |
317 codecHighQuality = 0x00000300 | |
318 }; | |
319 | |
320 | |
321 | |
5253 | 322 // callbacks: |
323 typedef void* ImageCodecDrawBandCompleteUPP; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
324 typedef int64_t ICMProgressProcRecord; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
325 typedef int64_t ICMCompletionProcRecord; |
8470 | 326 typedef ICMCompletionProcRecord* ICMCompletionProcRecordPtr; |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
327 typedef int64_t ICMDataProcRecord; |
5253 | 328 typedef void* ICMFrameTimePtr; |
329 typedef void* CDSequenceDataSourcePtr; | |
330 typedef void* ICMFrameTimeInfoPtr; | |
331 | |
332 // graphics port | |
333 typedef struct OpaqueGrafPtr* GrafPtr; | |
334 typedef GrafPtr CGrafPtr; | |
335 | |
5334 | 336 |
337 /* codec capabilities flags */ | |
338 enum { | |
8470 | 339 codecCanScale = 1L << 0, // 1 |
340 codecCanMask = 1L << 1, // 2 | |
341 codecCanMatte = 1L << 2, // 4 | |
342 codecCanTransform = 1L << 3, // 8 | |
343 codecCanTransferMode = 1L << 4, // 10 | |
344 codecCanCopyPrev = 1L << 5, // 20 | |
345 codecCanSpool = 1L << 6, // 40 | |
346 codecCanClipVertical = 1L << 7, // 80 | |
347 codecCanClipRectangular = 1L << 8, // 100 | |
348 codecCanRemapColor = 1L << 9, // 200 | |
349 codecCanFastDither = 1L << 10, // 400 | |
350 codecCanSrcExtract = 1L << 11, // 800 | |
351 codecCanCopyPrevComp = 1L << 12, // 1000 | |
352 codecCanAsync = 1L << 13, // 2000 | |
353 codecCanMakeMask = 1L << 14, // 4000 | |
354 codecCanShift = 1L << 15, // 8000 | |
355 codecCanAsyncWhen = 1L << 16, // 10000 | |
356 codecCanShieldCursor = 1L << 17, // 20000 | |
357 codecCanManagePrevBuffer = 1L << 18, // 40000 | |
5334 | 358 codecHasVolatileBuffer = 1L << 19, // 80000 /* codec requires redraw after window movement */ |
8470 | 359 codecWantsRegionMask = 1L << 20, // 100000 |
5334 | 360 codecImageBufferIsOnScreen = 1L << 21, // 200000 /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */ |
8470 | 361 codecWantsDestinationPixels = 1L << 22, // 400000 |
362 codecWantsSpecialScaling = 1L << 23, // 800000 | |
363 codecHandlesInputs = 1L << 24, // 1000000 | |
5334 | 364 codecCanDoIndirectSurface = 1L << 25, /* codec can handle indirect surface (GDI) */ |
365 codecIsSequenceSensitive = 1L << 26, | |
366 codecRequiresOffscreen = 1L << 27, | |
367 codecRequiresMaskBits = 1L << 28, | |
368 codecCanRemapResolution = 1L << 29, | |
369 codecIsDirectToScreenOnly = 1L << 30, /* codec can only decompress data to the screen */ | |
370 codecCanLockSurface = 1L << 31 /* codec can lock destination surface, icm doesn't lock for you */ | |
371 }; | |
372 | |
373 /* codec capabilities flags2 */ | |
374 enum { | |
375 codecUsesOverlaySurface = 1L << 0, /* codec uses overlay surface */ | |
376 codecImageBufferIsOverlaySurface = 1L << 1, /* codec image buffer is overlay surface, the bits in the buffer are on the screen */ | |
377 codecSrcMustBeImageBuffer = 1L << 2, /* codec can only source data from an image buffer */ | |
378 codecImageBufferIsInAGPMemory = 1L << 4, /* codec image buffer is in AGP space, byte writes are OK */ | |
379 codecImageBufferIsInPCIMemory = 1L << 5 /* codec image buffer is across a PCI bus; byte writes are bad */ | |
380 }; | |
381 | |
382 /* codec condition flags */ | |
383 // FFD = 13 = 8+4+1 | |
384 enum { | |
8470 | 385 codecConditionFirstBand = 1L << 0, // 1 |
386 codecConditionLastBand = 1L << 1, // 2 | |
387 codecConditionFirstFrame = 1L << 2, // 4 | |
388 codecConditionNewDepth = 1L << 3, // 8 | |
389 codecConditionNewTransform = 1L << 4, // 10 | |
390 codecConditionNewSrcRect = 1L << 5, // 20 | |
391 codecConditionNewMask = 1L << 6, // 40 | |
392 codecConditionNewMatte = 1L << 7, // 80 | |
393 codecConditionNewTransferMode = 1L << 8, // 100 | |
394 codecConditionNewClut = 1L << 9, // 200 | |
395 codecConditionNewAccuracy = 1L << 10, // 400 | |
396 codecConditionNewDestination = 1L << 11, // 800 | |
397 codecConditionFirstScreen = 1L << 12, // 1000 | |
398 codecConditionDoCursor = 1L << 13, // 2000 | |
399 codecConditionCatchUpDiff = 1L << 14, // 4000 | |
400 codecConditionMaskMayBeChanged = 1L << 15, // 8000 | |
401 codecConditionToBuffer = 1L << 16, // 10000 | |
402 codecConditionCodecChangedMask = 1L << 31 // 20000 | |
5334 | 403 }; |
404 | |
405 | |
406 | |
8266 | 407 struct __attribute__((__packed__)) CodecCapabilities { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
408 int32_t flags; |
5253 | 409 short wantedPixelSize; |
410 short extendWidth; | |
411 short extendHeight; | |
412 short bandMin; | |
413 short bandInc; | |
414 short pad; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
415 uint32_t time; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
416 int32_t flags2; /* field new in QuickTime 4.0 */ |
5253 | 417 }; |
418 typedef struct CodecCapabilities CodecCapabilities; | |
419 | |
420 struct __attribute__((__packed__)) CodecDecompressParams { | |
421 ImageSequence sequenceID; /* predecompress,banddecompress */ | |
422 ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */ | |
423 Ptr data; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
424 int32_t bufferSize; |
5253 | 425 |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
426 int32_t frameNumber; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
427 int32_t startLine; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
428 int32_t stopLine; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
429 int32_t conditionFlags; |
5253 | 430 |
8470 | 431 CodecFlags callerFlags; // short |
5253 | 432 CodecCapabilities * capabilities; /* predecompress,banddecompress */ |
433 ICMProgressProcRecord progressProcRecord; | |
434 ICMCompletionProcRecord completionProcRecord; | |
435 | |
436 ICMDataProcRecord dataProcRecord; | |
437 CGrafPtr port; /* predecompress,banddecompress */ | |
438 PixMap dstPixMap; /* predecompress,banddecompress */ | |
439 BitMapPtr maskBits; | |
440 PixMapPtr mattePixMap; | |
441 Rect srcRect; /* predecompress,banddecompress */ | |
442 MatrixRecord * matrix; /* predecompress,banddecompress */ | |
443 CodecQ accuracy; /* predecompress,banddecompress */ | |
444 short transferMode; /* predecompress,banddecompress */ | |
445 ICMFrameTimePtr frameTime; /* banddecompress */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
446 int32_t reserved[1]; |
5253 | 447 |
448 /* The following fields only exist for QuickTime 2.0 and greater */ | |
449 SInt8 matrixFlags; /* high bit set if 2x resize */ | |
450 SInt8 matrixType; | |
451 Rect dstRect; /* only valid for simple transforms */ | |
452 | |
453 /* The following fields only exist for QuickTime 2.1 and greater */ | |
454 UInt16 majorSourceChangeSeed; | |
455 UInt16 minorSourceChangeSeed; | |
456 CDSequenceDataSourcePtr sourceData; | |
457 | |
458 RgnHandle maskRegion; | |
459 | |
460 /* The following fields only exist for QuickTime 2.5 and greater */ | |
461 OSType ** wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */ | |
462 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
463 int32_t screenFloodMethod; |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
464 int32_t screenFloodValue; |
5253 | 465 short preferredOffscreenPixelSize; |
466 | |
467 /* The following fields only exist for QuickTime 3.0 and greater */ | |
468 ICMFrameTimeInfoPtr syncFrameTime; /* banddecompress */ | |
469 Boolean needUpdateOnTimeChange; /* banddecompress */ | |
470 Boolean enableBlackLining; | |
471 Boolean needUpdateOnSourceChange; /* band decompress */ | |
472 Boolean pad; | |
473 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
474 int32_t unused; |
5253 | 475 |
476 CGrafPtr finalDestinationPort; | |
477 | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
478 int32_t requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
479 int32_t requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/ |
5253 | 480 |
481 /* The following fields only exist for QuickTime 4.0 and greater */ | |
482 Rect displayableAreaOfRequestedBuffer; /* set in predecompress*/ | |
483 Boolean requestedSingleField; | |
484 Boolean needUpdateOnNextIdle; | |
485 Boolean pad2[2]; | |
486 Fixed bufferGammaLevel; | |
487 | |
488 /* The following fields only exist for QuickTime 5.0 and greater */ | |
489 UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/ | |
490 OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/ | |
491 }; | |
492 typedef struct CodecDecompressParams CodecDecompressParams; | |
493 | |
494 | |
495 | |
8266 | 496 struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities { |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
497 int32_t recordSize; /* sizeof(ImageSubCodecDecompressCapabilities)*/ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
498 int32_t decompressRecordSize; /* size of your codec's decompress record*/ |
5253 | 499 Boolean canAsync; /* default true*/ |
500 UInt8 pad0; | |
501 | |
502 /* The following fields only exist for QuickTime 4.0 and greater */ | |
503 UInt16 suggestedQueueSize; | |
504 Boolean canProvideTrigger; | |
505 | |
506 /* The following fields only exist for QuickTime 5.0 and greater */ | |
507 Boolean subCodecFlushesScreen; /* only used on Mac OS X*/ | |
508 Boolean subCodecCallsDrawBandComplete; | |
509 UInt8 pad2[1]; | |
510 | |
511 /* The following fields only exist for QuickTime 5.1 and greater */ | |
512 Boolean isChildCodec; /* set by base codec before calling Initialize*/ | |
513 UInt8 pad3[3]; | |
514 }; | |
515 typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities; | |
516 | |
517 | |
8266 | 518 struct __attribute__((__packed__)) ImageSubCodecDecompressRecord { |
5253 | 519 Ptr baseAddr; |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
520 int32_t rowBytes; |
5253 | 521 Ptr codecData; |
522 ICMProgressProcRecord progressProcRecord; | |
523 ICMDataProcRecord dataProcRecord; | |
524 void * userDecompressRecord; /* pointer to codec-specific per-band data*/ | |
525 UInt8 frameType; | |
526 Boolean inhibitMP; /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.)*/ | |
527 UInt8 pad[2]; | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
528 int32_t priv[2]; |
5253 | 529 |
530 /* The following fields only exist for QuickTime 5.0 and greater */ | |
531 ImageCodecDrawBandCompleteUPP drawBandCompleteUPP; /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */ | |
532 void * drawBandCompleteRefCon; /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */ | |
533 }; | |
534 typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord; | |
535 | |
536 | |
537 /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */ | |
538 enum { | |
539 codecInfoDoes1 = (1L << 0), /* codec can work with 1-bit pixels */ | |
540 codecInfoDoes2 = (1L << 1), /* codec can work with 2-bit pixels */ | |
541 codecInfoDoes4 = (1L << 2), /* codec can work with 4-bit pixels */ | |
542 codecInfoDoes8 = (1L << 3), /* codec can work with 8-bit pixels */ | |
543 codecInfoDoes16 = (1L << 4), /* codec can work with 16-bit pixels */ | |
544 codecInfoDoes32 = (1L << 5), /* codec can work with 32-bit pixels */ | |
545 codecInfoDoesDither = (1L << 6), /* codec can do ditherMode */ | |
546 codecInfoDoesStretch = (1L << 7), /* codec can stretch to arbitrary sizes */ | |
547 codecInfoDoesShrink = (1L << 8), /* codec can shrink to arbitrary sizes */ | |
548 codecInfoDoesMask = (1L << 9), /* codec can mask to clipping regions */ | |
549 codecInfoDoesTemporal = (1L << 10), /* codec can handle temporal redundancy */ | |
550 codecInfoDoesDouble = (1L << 11), /* codec can stretch to double size exactly */ | |
551 codecInfoDoesQuad = (1L << 12), /* codec can stretch to quadruple size exactly */ | |
552 codecInfoDoesHalf = (1L << 13), /* codec can shrink to half size */ | |
553 codecInfoDoesQuarter = (1L << 14), /* codec can shrink to quarter size */ | |
554 codecInfoDoesRotate = (1L << 15), /* codec can rotate on decompress */ | |
555 codecInfoDoesHorizFlip = (1L << 16), /* codec can flip horizontally on decompress */ | |
556 codecInfoDoesVertFlip = (1L << 17), /* codec can flip vertically on decompress */ | |
557 codecInfoHasEffectParameterList = (1L << 18), /* codec implements get effects parameter list call, once was codecInfoDoesSkew */ | |
558 codecInfoDoesBlend = (1L << 19), /* codec can blend on decompress */ | |
559 codecInfoDoesWarp = (1L << 20), /* codec can warp arbitrarily on decompress */ | |
560 codecInfoDoesRecompress = (1L << 21), /* codec can recompress image without accumulating errors */ | |
561 codecInfoDoesSpool = (1L << 22), /* codec can spool image data */ | |
562 codecInfoDoesRateConstrain = (1L << 23) /* codec can data rate constrain */ | |
563 }; | |
564 | |
565 | |
566 enum { | |
567 codecInfoDepth1 = (1L << 0), /* compressed data at 1 bpp depth available */ | |
568 codecInfoDepth2 = (1L << 1), /* compressed data at 2 bpp depth available */ | |
569 codecInfoDepth4 = (1L << 2), /* compressed data at 4 bpp depth available */ | |
570 codecInfoDepth8 = (1L << 3), /* compressed data at 8 bpp depth available */ | |
571 codecInfoDepth16 = (1L << 4), /* compressed data at 16 bpp depth available */ | |
572 codecInfoDepth32 = (1L << 5), /* compressed data at 32 bpp depth available */ | |
573 codecInfoDepth24 = (1L << 6), /* compressed data at 24 bpp depth available */ | |
574 codecInfoDepth33 = (1L << 7), /* compressed data at 1 bpp monochrome depth available */ | |
575 codecInfoDepth34 = (1L << 8), /* compressed data at 2 bpp grayscale depth available */ | |
576 codecInfoDepth36 = (1L << 9), /* compressed data at 4 bpp grayscale depth available */ | |
577 codecInfoDepth40 = (1L << 10), /* compressed data at 8 bpp grayscale depth available */ | |
578 codecInfoStoresClut = (1L << 11), /* compressed data can have custom cluts */ | |
579 codecInfoDoesLossless = (1L << 12), /* compressed data can be stored in lossless format */ | |
580 codecInfoSequenceSensitive = (1L << 13) /* compressed data is sensitive to out of sequence decoding */ | |
581 }; | |
582 | |
8266 | 583 struct __attribute__((__packed__)) CodecInfo { |
5253 | 584 Str31 typeName; /* name of the codec type i.e.: 'Apple Image Compression' */ |
585 short version; /* version of the codec data that this codec knows about */ | |
586 short revisionLevel; /* revision level of this codec i.e: 0x00010001 (1.0.1) */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
587 int32_t vendor; /* Maker of this codec i.e: 'appl' */ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
588 int32_t decompressFlags; /* codecInfo flags for decompression capabilities */ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
589 int32_t compressFlags; /* codecInfo flags for compression capabilities */ |
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
590 int32_t formatFlags; /* codecInfo flags for compression format details */ |
5253 | 591 UInt8 compressionAccuracy; /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */ |
592 UInt8 decompressionAccuracy; /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */ | |
593 unsigned short compressionSpeed; /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */ | |
594 unsigned short decompressionSpeed; /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */ | |
595 UInt8 compressionLevel; /* measure (1-255) of compression level of this codec (0 if unknown) */ | |
596 UInt8 resvd; /* pad */ | |
597 short minimumHeight; /* minimum height of image (block size) */ | |
598 short minimumWidth; /* minimum width of image (block size) */ | |
599 short decompressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */ | |
600 short compressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */ | |
13809
a9e2fda933be
AMD64 fixes based on patch by Timo Ter¸«£s <timo.teras@iki.fi>
faust3
parents:
11412
diff
changeset
|
601 int32_t privateData; |
5253 | 602 }; |
603 typedef struct CodecInfo CodecInfo; | |
604 | |
8470 | 605 enum { |
606 codecFlagUseImageBuffer = (1L << 0), /* decompress*/ | |
607 codecFlagUseScreenBuffer = (1L << 1), /* decompress*/ | |
608 codecFlagUpdatePrevious = (1L << 2), /* compress*/ | |
609 codecFlagNoScreenUpdate = (1L << 3), /* decompress*/ | |
610 codecFlagWasCompressed = (1L << 4), /* compress*/ | |
611 codecFlagDontOffscreen = (1L << 5), /* decompress*/ | |
612 codecFlagUpdatePreviousComp = (1L << 6), /* compress*/ | |
613 codecFlagForceKeyFrame = (1L << 7), /* compress*/ | |
614 codecFlagOnlyScreenUpdate = (1L << 8), /* decompress*/ | |
615 codecFlagLiveGrab = (1L << 9), /* compress*/ | |
616 codecFlagDiffFrame = (1L << 9), /* decompress*/ | |
617 codecFlagDontUseNewImageBuffer = (1L << 10), /* decompress*/ | |
618 codecFlagInterlaceUpdate = (1L << 11), /* decompress*/ | |
619 codecFlagCatchUpDiff = (1L << 12), /* decompress*/ | |
620 codecFlagSupportDisable = (1L << 13), /* decompress*/ | |
621 codecFlagReenable = (1L << 14) /* decompress*/ | |
622 }; | |
623 | |
5334 | 624 static inline void dump_ImageDescription(void* xxx){ |
625 ImageDescription* id=(ImageDescription*)xxx; | |
626 unsigned char* x; | |
8266 | 627 int i; |
628 | |
629 for(i=0;i<id->idSize;i++){ | |
630 printf(" %02X",((unsigned char*)id)[i]); | |
631 if((i%16)==15) printf("\n"); | |
632 } | |
633 printf("\n"); | |
634 | |
635 | |
5334 | 636 printf("=============== ImageDescription at %p ==================\n",xxx); |
637 printf("idSize=0x%X fourcc=0x%08X\n",id->idSize,id->cType); | |
638 printf("ver=%d rev=%d vendor=0x%08X\n",id->version,id->revisionLevel,id->vendor); | |
639 printf("tempQ=%d spatQ=%d dim: %d x %d dpi: %d x %d depth: %d\n", | |
640 id->temporalQuality,id->spatialQuality, | |
641 id->width, id->height, | |
642 id->hRes, id->vRes, | |
643 id->depth); | |
644 printf("dataSize=%d frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID); | |
645 printf("name='%.*s'\n",((char*)(&id->name))[0],((char*)(&id->name))+1); | |
646 x=((char*)(&id->clutID))+2; | |
647 if(id->idSize>sizeof(ImageDescription)){ | |
648 printf("%02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X\n", | |
649 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]); | |
650 } | |
651 printf("=========================================================\n"); | |
652 } | |
5253 | 653 |
5334 | 654 static inline void dump_Rect(char* title,Rect *r){ |
655 printf("%s: %d;%d - %d;%d\n",title, | |
656 (int)r->top,(int)r->left,(int)r->bottom,(int)r->right); | |
657 } | |
658 | |
659 static inline void dump_MatrixRecord(char* title, MatrixRecord *m){ | |
660 printf("%s: [%d %d %d][%d %d %d][%d %d %d]\n",title, | |
661 m->matrix[0][0],m->matrix[0][1],m->matrix[0][2], | |
662 m->matrix[1][0],m->matrix[1][1],m->matrix[1][2], | |
663 m->matrix[2][0],m->matrix[2][1],m->matrix[2][2]); | |
664 } | |
665 | |
666 static inline void dump_PixMap(void* xxx){ | |
667 PixMap *p=xxx; | |
668 printf("=============== PixMap at %p ==================\n",xxx); | |
669 printf("base=%p stride=%d\n",p->baseAddr, p->rowBytes); | |
670 dump_Rect("bounds",&p->bounds); | |
671 printf("pmVersion=0x%X packType=0x%X\n packSize=0x%X\n", | |
672 p->pmVersion,p->packType, p->packSize); | |
673 printf("hRes=0x%X vRes=0x%X pixelType=0x%X pixelSize=0x%X\n", | |
674 p->hRes,p->vRes,p->pixelType,p->pixelSize); | |
675 printf("cmpCount=0x%X cmpSize=0x%X pixelFormat=0x%X\n", | |
676 p->cmpCount,p->cmpSize,p->pixelFormat); | |
677 printf("pmTable=%p pmExt=%p\n",p->pmTable,p->pmExt); | |
678 printf("=========================================================\n"); | |
679 } | |
680 | |
681 static inline void dump_CodecCapabilities(void* xxx){ | |
682 CodecCapabilities* cc=xxx; | |
683 if(!xxx) return; | |
684 printf("=============== CodecCapabilities at %p =================\n",xxx); | |
685 printf("flags=0x%X flags2=0x%X\n",cc->flags,cc->flags2); | |
686 printf("wantedPixelSize=%d extendWidth=%d extendHeight=%d band=%d+%d\n", | |
687 cc->wantedPixelSize,cc->extendWidth,cc->extendHeight, | |
688 cc->bandMin,cc->bandInc); | |
689 printf("pad=0x%X time=0x%X\n",cc->pad,cc->time); | |
690 printf("=========================================================\n"); | |
691 } | |
692 | |
693 static inline void dump_CodecDecompressParams(void* xxx){ | |
694 CodecDecompressParams* cd=xxx; | |
695 ImageDescription **idh; | |
8266 | 696 int i; |
5334 | 697 if(!xxx) return; |
698 printf("=============== CodecDecompressParams at %p ==================\n",xxx); | |
699 printf("sequenceID=%d\n",cd->sequenceID); | |
700 idh=cd->imageDescription; | |
701 if(idh && idh[0]) dump_ImageDescription(idh[0]); | |
8266 | 702 |
703 for(i=0;i<sizeof(CodecDecompressParams);i++){ | |
704 printf(" %02X",((unsigned char*)cd)[i]); | |
705 if((i%16)==15) printf("\n"); | |
706 } | |
707 printf("\n"); | |
708 | |
5334 | 709 printf("data=%p size=%d\n",cd->data,cd->bufferSize); |
710 printf("frameno=%d lines: %d .. %d condflags=0x%X callerflags=0x%X\n", | |
711 cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags); | |
712 // printf("maskBits=%p mattePixMap=%p\n", | |
713 // cd->maskBits,cd->mattePixMap); | |
8323 | 714 dump_PixMap(&cd->dstPixMap); |
5334 | 715 // if(cd->mattePixMap) dump_PixMap(cd->mattePixMap); |
8323 | 716 if(cd->matrix) dump_MatrixRecord("matrix",cd->matrix); |
717 if(cd->capabilities) dump_CodecCapabilities(cd->capabilities); | |
5334 | 718 printf("accuracy=%d transferMode=%d matrixFlags=0x%X matrixType=%d\n", |
719 (int)cd->accuracy, (int)cd->transferMode, (int)cd->matrixFlags, (int)cd->matrixType); | |
720 printf("srcrect: %d;%d - %d;%d\n",cd->srcRect.top,cd->srcRect.left,cd->srcRect.bottom,cd->srcRect.right); | |
721 printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right); | |
722 printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes); | |
8323 | 723 if(cd->wantedDestinationPixelTypes){ |
724 unsigned int* p=cd->wantedDestinationPixelTypes; | |
725 while(p[0]){ | |
726 printf(" 0x%08X %.4s\n",p[0],&p[0]); | |
727 ++p; | |
728 } | |
729 } | |
5334 | 730 printf("screenFloodMethod=%d value=%d preferredOffscreenPixelSize=%d\n", |
731 cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize); | |
732 printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n", | |
733 cd->progressProcRecord, cd->completionProcRecord, | |
734 cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime); | |
735 // printf("\n"); | |
736 | |
737 printf("=========================================================\n"); | |
738 | |
739 | |
740 } | |
741 |