diff options
author | Teravus Ovares | 2008-12-20 01:20:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-12-20 01:20:40 +0000 |
commit | 4d26da545d8df85917b06cd603ffa6e92fd431e5 (patch) | |
tree | dec31f79c4a3d0736fd798442e090de7b951008f /OpenSim/Framework/OpenJpeg/openjpeg.cs | |
parent | Revert OpenId until we can come to grips with the mono 2 requirement (diff) | |
download | opensim-SC_OLD-4d26da545d8df85917b06cd603ffa6e92fd431e5.zip opensim-SC_OLD-4d26da545d8df85917b06cd603ffa6e92fd431e5.tar.gz opensim-SC_OLD-4d26da545d8df85917b06cd603ffa6e92fd431e5.tar.bz2 opensim-SC_OLD-4d26da545d8df85917b06cd603ffa6e92fd431e5.tar.xz |
* ReCommit the OpenID patch with a few less dependencies.
* Removes all references to ASP.NET (System.Web.UI,*)
* Removes all references to System.Web.Mobile
Diffstat (limited to 'OpenSim/Framework/OpenJpeg/openjpeg.cs')
-rw-r--r-- | OpenSim/Framework/OpenJpeg/openjpeg.cs | 358 |
1 files changed, 358 insertions, 0 deletions
diff --git a/OpenSim/Framework/OpenJpeg/openjpeg.cs b/OpenSim/Framework/OpenJpeg/openjpeg.cs new file mode 100644 index 0000000..2d5e4b5 --- /dev/null +++ b/OpenSim/Framework/OpenJpeg/openjpeg.cs | |||
@@ -0,0 +1,358 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Framework.OpenJpeg | ||
6 | { | ||
7 | public class openjpeg | ||
8 | { | ||
9 | public openjpeg() | ||
10 | { | ||
11 | |||
12 | |||
13 | } | ||
14 | } | ||
15 | |||
16 | public enum PROG_ORDER | ||
17 | { | ||
18 | PROG_UNKNOWN = -1, | ||
19 | LRCP = 0, | ||
20 | RLCP = 1, | ||
21 | RPCL = 2, | ||
22 | PCRL = 3, | ||
23 | CPRL = 4 | ||
24 | } | ||
25 | |||
26 | public enum RSIZ_CAPABILITIES | ||
27 | { | ||
28 | STD_RSIZ = 0, | ||
29 | CINEMA2K = 3, | ||
30 | CINEMA4K = 4 | ||
31 | } | ||
32 | |||
33 | public enum CINEMA_MODE | ||
34 | { | ||
35 | OFF = 0, | ||
36 | CINEMA2K_24 = 1, | ||
37 | CINEMA2K_48 = 2, | ||
38 | CINEMA4K_24 = 3 | ||
39 | } | ||
40 | |||
41 | public enum COLOR_SPACE | ||
42 | { | ||
43 | CLRSPC_UNKNOWN = -1, | ||
44 | CLRSPC_SRGB = 1, | ||
45 | CLRSPC_GRAY = 2, | ||
46 | CLRSPC_SYCC = 3 | ||
47 | } | ||
48 | |||
49 | public enum CODEC_FORMAT | ||
50 | { | ||
51 | CODEC_UNKNOWN = -1, | ||
52 | CODEC_J2K = 0, | ||
53 | CODEC_JPT = 1, | ||
54 | CODEC_JP2 = 2 | ||
55 | } | ||
56 | |||
57 | public enum LIMIT_DECODING | ||
58 | { | ||
59 | NO_LIMITATION = 0, | ||
60 | LIMIT_TO_MAIN_HEADER=1, | ||
61 | DECODE_ALL_BUT_PACKETS = 2 | ||
62 | } | ||
63 | |||
64 | public struct opj_poc | ||
65 | { | ||
66 | public int resno0, compno0; | ||
67 | public int layno1, resno1, compno1; | ||
68 | public int layno0, precno0, precno1; | ||
69 | public PROG_ORDER prg1, prg; | ||
70 | /// <summary> | ||
71 | /// Don't forget to initialize with 5 elements | ||
72 | /// </summary> | ||
73 | public sbyte[] progorder; | ||
74 | public int tile; | ||
75 | public int tx0, tx1, ty0, ty1; | ||
76 | public int layS, resS, copmS, prcS; | ||
77 | public int layE, resE, compE, prcE; | ||
78 | public int txS, txE, tyS, tyE, dx, dy; | ||
79 | public int lay_t, res_t, comp_t, prc_t, tx0_t, ty0_t; | ||
80 | } | ||
81 | |||
82 | public struct opj_cparameters | ||
83 | { | ||
84 | public bool tile_size_on; | ||
85 | public int cp_tx0; | ||
86 | public int cp_ty0; | ||
87 | public int cp_tdx; | ||
88 | public int cp_tdy; | ||
89 | public int cp_disto_alloc; | ||
90 | public int cp_fixed_alloc; | ||
91 | public int cp_fixed_wuality; | ||
92 | public int cp_matrice; | ||
93 | public sbyte cp_comment; | ||
94 | public int csty; | ||
95 | public PROG_ORDER prog_order; | ||
96 | |||
97 | /// <summary> | ||
98 | /// Don't forget to initialize 32 elements | ||
99 | /// </summary> | ||
100 | public opj_poc[] POC; | ||
101 | public int numpocs; | ||
102 | public int tcp_numlayers; | ||
103 | /// <summary> | ||
104 | /// Don't forget to intitialize 100 elements | ||
105 | /// </summary> | ||
106 | public float[] tcp_rates; | ||
107 | /// <summary> | ||
108 | /// Don't forget to initialize 100 elements | ||
109 | /// </summary> | ||
110 | public float[] tcp_distoratio; | ||
111 | public int numresolution; | ||
112 | public int cblockw_init; | ||
113 | public int cblockh_init; | ||
114 | public int mode; | ||
115 | public int irreversible; | ||
116 | public int roi_compno; | ||
117 | public int roi_shift; | ||
118 | public int res_spec; | ||
119 | |||
120 | /// <summary> | ||
121 | /// Don't forget to initialize 33 elements | ||
122 | /// </summary> | ||
123 | public int[] prc_init; | ||
124 | /// <summary> | ||
125 | /// Don't forget to initialize 33 elements | ||
126 | /// </summary> | ||
127 | public int[] prch_init; | ||
128 | |||
129 | public string infile; | ||
130 | public string outfile; | ||
131 | public int index_on; | ||
132 | public string index; | ||
133 | public int image_offset_x0; | ||
134 | public int image_offset_y0; | ||
135 | public int subsampling_dx; | ||
136 | public int subsampling_dy; | ||
137 | public int decod_format; | ||
138 | public int cod_format; | ||
139 | public bool jpwl_epc_on; | ||
140 | public int jpwl_hprot_MH; | ||
141 | /// <summary> | ||
142 | /// Don't forget to initialize 16 elements | ||
143 | /// </summary> | ||
144 | public int[] jpwl_hprot_TPH_tileno; | ||
145 | /// <summary> | ||
146 | /// Don't forget to initialize 16 elements | ||
147 | /// </summary> | ||
148 | public int[] jpwl_hprot_TPH; | ||
149 | |||
150 | /// <summary> | ||
151 | /// Don't forget to initialize 16 elements | ||
152 | /// </summary> | ||
153 | public int[] jpwl_pprot_tileno; | ||
154 | public int[] jpwl_pprot_packno; | ||
155 | public int[] jpwl_pprot; | ||
156 | public int jpwl_sens_size; | ||
157 | public int jpwl_sense_addr; | ||
158 | public int jpwl_sens_range; | ||
159 | public int jpwl_sens_MH; | ||
160 | |||
161 | /// <summary> | ||
162 | /// Don't forget to initialize 16 elements | ||
163 | /// </summary> | ||
164 | public int[] jpwl_sens_TPH_tileno; | ||
165 | |||
166 | /// <summary> | ||
167 | /// Don't forget to initialize 16 elements | ||
168 | /// </summary> | ||
169 | public int[] jpwl_sens_TPH; | ||
170 | public CINEMA_MODE cp_cinema; | ||
171 | public int max_comp_size; | ||
172 | public sbyte tp_on; | ||
173 | public sbyte tp_flag; | ||
174 | public sbyte tcp_mct; | ||
175 | } | ||
176 | |||
177 | public struct opj_dparameters | ||
178 | { | ||
179 | public int cp_reduce; | ||
180 | public int cp_layer; | ||
181 | public string infile; | ||
182 | public string outfile; | ||
183 | public int decod_format; | ||
184 | public int cod_format; | ||
185 | public bool jpwl_correct; | ||
186 | public int jpwl_exp_comps; | ||
187 | public int jpwl_max_tiles; | ||
188 | public LIMIT_DECODING cp_limit_decoding; | ||
189 | |||
190 | } | ||
191 | |||
192 | public struct opj_common_fields | ||
193 | { | ||
194 | public bool is_decompressor; | ||
195 | public CODEC_FORMAT codec_format; | ||
196 | } | ||
197 | |||
198 | public struct opj_common_struct | ||
199 | { | ||
200 | public opj_common_fields flds; | ||
201 | } | ||
202 | |||
203 | public struct opj_cinfo | ||
204 | { | ||
205 | public opj_common_fields flds; | ||
206 | } | ||
207 | public struct opj_dinfo | ||
208 | { | ||
209 | public opj_common_fields flds; | ||
210 | } | ||
211 | |||
212 | public struct opj_cio | ||
213 | { | ||
214 | public opj_common_struct cinfo; | ||
215 | public int openmode; | ||
216 | public byte buffer; | ||
217 | public int length; | ||
218 | public byte start; | ||
219 | public byte end; | ||
220 | public byte bp; | ||
221 | } | ||
222 | |||
223 | public struct opj_image_comp | ||
224 | { | ||
225 | public int dx; | ||
226 | public int dy; | ||
227 | public int w; | ||
228 | public int h; | ||
229 | public int x0; | ||
230 | public int y0; | ||
231 | public int prec; | ||
232 | public int bpp; | ||
233 | public int sgnd; | ||
234 | public int resno_decoded; | ||
235 | public int factor; | ||
236 | public int data; | ||
237 | } | ||
238 | |||
239 | public struct opj_image | ||
240 | { | ||
241 | public int x0; | ||
242 | public int y0; | ||
243 | public int x1; | ||
244 | public int y1; | ||
245 | public int numcomps; | ||
246 | public COLOR_SPACE color_space; | ||
247 | public opj_image_comp comps; | ||
248 | } | ||
249 | |||
250 | public struct opj_image_comptparm | ||
251 | { | ||
252 | public int dx; | ||
253 | public int dy; | ||
254 | public int w; | ||
255 | public int h; | ||
256 | public int x0; | ||
257 | public int y0; | ||
258 | public int prec; | ||
259 | public int bpp; | ||
260 | public int sgnd; | ||
261 | } | ||
262 | |||
263 | public struct opj_packet_info | ||
264 | { | ||
265 | public int start_pos; | ||
266 | public int end_ph_pos; | ||
267 | public int end_pos; | ||
268 | public double disto; | ||
269 | } | ||
270 | |||
271 | public struct opj_tp_info | ||
272 | { | ||
273 | public int tp_start_pos; | ||
274 | public int tp_end_header; | ||
275 | public int tp_end_pos; | ||
276 | public int tp_start_pack; | ||
277 | public int tp_numpacks; | ||
278 | } | ||
279 | |||
280 | public struct opj_tile_info | ||
281 | { | ||
282 | public double thresh; | ||
283 | public int tileno; | ||
284 | public int start_pos; | ||
285 | public int end_header; | ||
286 | public int end_pos; | ||
287 | /// <summary> | ||
288 | /// Don't forget to initialize 33 elements | ||
289 | /// </summary> | ||
290 | public int[] pw; | ||
291 | /// <summary> | ||
292 | /// Don't forget to initialize 33 elements | ||
293 | /// </summary> | ||
294 | public int[] ph; | ||
295 | /// <summary> | ||
296 | /// Don't forget to initialize 33 elements | ||
297 | /// </summary> | ||
298 | public int[] pdx; | ||
299 | /// <summary> | ||
300 | /// Don't forget to initialize 33 elements | ||
301 | /// </summary> | ||
302 | public int[] pdy; | ||
303 | |||
304 | public opj_packet_info packet; | ||
305 | public int numpix; | ||
306 | public double distotile; | ||
307 | public int num_tps; | ||
308 | public opj_tp_info tp; | ||
309 | } | ||
310 | |||
311 | public struct opj_marker_info_t | ||
312 | { | ||
313 | public ushort type; | ||
314 | public int pos; | ||
315 | public int len; | ||
316 | } | ||
317 | |||
318 | public struct opj_codestream_info | ||
319 | { | ||
320 | public double D_max; | ||
321 | public int packno; | ||
322 | public int index_write; | ||
323 | public int image_w; | ||
324 | public int image_h; | ||
325 | |||
326 | public PROG_ORDER prog; | ||
327 | |||
328 | public int tile_x; | ||
329 | public int tile_y; | ||
330 | public int tile_Ox; | ||
331 | public int tile_Oy; | ||
332 | public int tw; | ||
333 | public int numcomps; | ||
334 | public int numlayers; | ||
335 | public int numdecompos; | ||
336 | public int marknum; | ||
337 | public opj_marker_info_t marker; | ||
338 | public int maxmarknum; | ||
339 | public int main_head_start; | ||
340 | public int main_head_end; | ||
341 | public int codestream_size; | ||
342 | public opj_tile_info tile; | ||
343 | |||
344 | } | ||
345 | |||
346 | |||
347 | |||
348 | |||
349 | |||
350 | |||
351 | public static class opj_defines | ||
352 | { | ||
353 | public const int OPJ_STREAM_READ = 0x0001; | ||
354 | public const int OPJ_STREAM_WRITE = 0x0002; | ||
355 | |||
356 | } | ||
357 | |||
358 | } | ||