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