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