-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpx_struct.ksy
299 lines (297 loc) · 7.42 KB
/
dpx_struct.ksy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
meta:
id: dpx
file-extension: dpx
seq:
- id: magic
size: 4
- id: body
type: body
types:
body:
meta:
endian:
switch-on: _root.magic
cases:
'[0x53, 0x44, 0x50, 0x58]': be
'[0x58, 0x50, 0x44, 0x53]': le
seq:
- id: file_header
type: file_header
size: 764
- id: image_header
type: image_header
size: 640
- id: orientation_header
type: orientation_header
size: 256
- id: film_information_header
type: film_information_header
size: 256
- id: television_information_header
type: television_information_header
size: 128
- id: user_defined_header
size: file_header.user_size
if: file_header.user_size != 0
- id: image_data
size: file_header.file_size - (file_header.generic_size+file_header.industry_size+file_header.user_size)
types:
image_header:
seq:
- id: orientation
type: u2
enum: orientation_enum
- id: number_elements
type: u2
- id: pixels_per_line
type: u4
- id: lines_per_element
type: u4
- id: image_element_array
type: image_element
repeat: expr
repeat-expr: 8
- id: reserved_image
size: 52
image_element:
seq:
- id: data_sign
type: u4
- id: low_data
type: u4
- id: low_quantity
type: f4
- id: high_data
type: u4
- id: high_quantity
type: f4
- id: descriptor
type: u1
enum: descriptor
- id: transfer
type: u1
enum: transfer_colorimetric
- id: colorimetric
type: u1
enum: transfer_colorimetric
- id: bit_size
type: u1
- id: packing
type: u2
- id: encoding
type: u2
- id: data_offset
type: u4
- id: end_of_line_padding
type: u4
- id: end_of_image_padding
type: u4
- id: description
type: str
encoding: ASCII
size: 32
orientation_header:
seq:
- id: x_offset
type: u4
- id: y_offset
type: u4
- id: x_center
type: f4
- id: y_center
type: f4
- id: x_original_size
type: u4
- id: y_original_size
type: u4
- id: file_name
type: str
encoding: ASCII
size: 100
- id: time_date
type: str
encoding: ASCII
size: 24
- id: input_name
type: str
encoding: ASCII
size: 32
- id: input_sn
type: str
encoding: ASCII
size: 32
- id: border
size: 8
- id: aspect_ratio
size: 8
- id: x_scanned_size
type: f4
- id: y_scanned_size
type: f4
- id: reserved_o
size: 20
file_header:
seq:
- id: image_offset
type: u4
- id: version
type: str
encoding: ASCII
size: 8
- id: file_size
type: u4
- id: ditto_key
size: 4
- id: generic_size
type: u4
- id: industry_size
type: u4
- id: user_size
type: u4
- id: filename
type: str
encoding: ASCII
size: 100
- id: timedate
type: str
encoding: ASCII
size: 24
- id: creator
type: str
encoding: ASCII
size: 100
- id: project
type: str
encoding: ASCII
size: 200
- id: copyright
type: str
encoding: ASCII
size: 200
- id: encryption_key
type: u4
- id: reserved
size: 104
television_information_header:
seq:
- id: time_code
type: u4
- id: user_bits
type: u4
- id: interlace
type: u1
- id: field_number
type: u1
- id: video_signal
type: u1
- id: padding
type: u1
- id: horz_sample_rate
type: f4
- id: vert_sample_rate
type: f4
- id: frame_rate
type: f4
- id: time_offset
type: f4
- id: gamma
type: f4
- id: black_level
type: f4
- id: black_gain
type: f4
- id: breakpoint
type: f4
- id: white_level
type: f4
- id: integration_times
type: f4
- id: reserved_t
size: 76
film_information_header:
seq:
- id: film_mfg_id
type: str
encoding: ASCII
size: 2
- id: film_type
type: str
encoding: ASCII
size: 2
- id: offset
type: str
encoding: ASCII
size: 2
- id: prefix
type: str
encoding: ASCII
size: 6
- id: count
type: str
encoding: ASCII
size: 4
- id: format
type: str
encoding: ASCII
size: 32
- id: frame_position
type: u4
- id: sequence_len
type: u4
- id: held_count
type: u4
- id: frame_rate
type: f4
- id: shutter_angle
type: f4
- id: frame_id
encoding: ASCII
type: str
size: 32
- id: slate_info
encoding: ASCII
type: str
size: 100
- id: reserved_f
size: 56
enums:
orientation_enum:
0: l2rt2b
1: r2lt2b
2: l2rb2t
3: r2lb2t
4: t2bl2r
5: t2br2f
6: b2tl2r
7: b2tr2l
descriptor:
0: user_defined
1: red
2: green
3: blue
4: alpha
6: luminance_y
7: chrominance_uv
8: depth
9: composite_video
50: rgb
51: rgba
52: abgr
100: cbycry
101: cbyacrya
102: cbycr
103: cbycra
transfer_colorimetric:
0: user_defined
1: printing_density
2: linear
3: logarithmic
4: unspecified_video
5: smpte_240m
6: ccir_709_1
7: ccir_601_2_system_b_or_g
8: ccir_601_2_system_m
9: ntsc_composite
10: pal_composite
11: z_linear
12: z_homogeneous