aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-15 21:37:22 +0000
committerJustin Clarke Casey2009-01-15 21:37:22 +0000
commitd1456554f2fb3b3ca62d6500d41a09d50c37afa1 (patch)
treefa718600dab7b534f9f04c92724e409360cecaec
parent* add file I just missed out, nggggff (diff)
downloadopensim-SC_OLD-d1456554f2fb3b3ca62d6500d41a09d50c37afa1.zip
opensim-SC_OLD-d1456554f2fb3b3ca62d6500d41a09d50c37afa1.tar.gz
opensim-SC_OLD-d1456554f2fb3b3ca62d6500d41a09d50c37afa1.tar.bz2
opensim-SC_OLD-d1456554f2fb3b3ca62d6500d41a09d50c37afa1.tar.xz
* Delete OpenSim/Framework/OpenJpeg for now, with Teravus' permission ;)
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/OpenJpeg/bio.cs162
-rw-r--r--OpenSim/Framework/OpenJpeg/fix.cs43
-rw-r--r--OpenSim/Framework/OpenJpeg/int_.cs84
-rw-r--r--OpenSim/Framework/OpenJpeg/j2k.cs182
-rw-r--r--OpenSim/Framework/OpenJpeg/openjpeg.cs375
-rw-r--r--OpenSim/Framework/OpenJpeg/pi.cs71
6 files changed, 0 insertions, 917 deletions
diff --git a/OpenSim/Framework/OpenJpeg/bio.cs b/OpenSim/Framework/OpenJpeg/bio.cs
deleted file mode 100644
index 4a5b321..0000000
--- a/OpenSim/Framework/OpenJpeg/bio.cs
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public static class bio
35 {
36 public static opj_bio bio_create()
37 {
38 opj_bio bio = new opj_bio();
39 return bio;
40 }
41
42 public static void bio_destroy(opj_bio bio)
43 {
44 // not needed on C#
45 }
46
47 public static int bio_numbytes(opj_bio bio)
48 {
49 return (bio.bp - bio.start);
50 }
51
52 public static void bio_init_enc(opj_bio bio, sbyte bp, int len)
53 {
54 bio.start = (byte)bp;
55 bio.end = (byte)(bp + (byte)len);
56 bio.bp = (byte)bp;
57 bio.buf = 0;
58 bio.ct = 8;
59 }
60
61 public static void bio_init_dec(opj_bio bio, sbyte bp, int len)
62 {
63 bio.start = (byte)bp;
64 bio.end = (byte)(bp + len);
65 bio.bp = (byte)bp;
66 bio.buf = 0;
67 bio.ct = 0;
68 }
69
70 public static void bio_write(opj_bio bio, int v, int n)
71 {
72 for (int i = n - 1; i >= 0; i--)
73 bio_putbit(bio, (v >> i) & 1);
74 }
75
76 public static int bio_read(opj_bio bio, int n)
77 {
78 int v = 0;
79 for (int i = n - 1; i >= 0; i--)
80 v += bio_getbit(bio) << i;
81
82 return v;
83 }
84
85 public static int bio_flush(opj_bio bio)
86 {
87 bio.ct = 0;
88 if (bio_byteout(bio) != 0)
89 return 1;
90
91 if (bio.ct == 7)
92 {
93 bio.ct = 0;
94 if (bio_byteout(bio) != 0)
95 return 1;
96 }
97 return 0;
98 }
99
100 public static int bio_inalign(opj_bio bio)
101 {
102 bio.ct = 0;
103 if ((bio.buf & 0xff) == 0xff)
104 {
105 if (bio_bytein(bio) != 0)
106 return 1;
107 bio.ct = 0;
108 }
109 return 0;
110 }
111
112 private static int bio_bytein(opj_bio bio)
113 {
114 bio.buf = (bio.buf << 8) & 0xffff;
115 bio.ct = bio.buf == 0xff00 ? 7 : 8;
116 if (bio.bp >= bio.end)
117 return 1;
118 bio.buf |= bio.bp++;
119
120 return 0;
121 }
122
123 private static int bio_byteout(opj_bio bio)
124 {
125 bio.buf = (bio.buf << 8) & 0xffff;
126 bio.ct = bio.buf == 0xff00 ? 7 : 8;
127 if (bio.bp >= bio.end)
128 return 1;
129
130 bio.bp = (byte)(bio.buf >> 8);
131 bio.bp++;
132 return 0;
133 }
134
135 private static void bio_putbit(opj_bio bio, int b)
136 {
137 if (bio.ct == 0)
138 bio_byteout(bio);
139
140 bio.ct--;
141 bio.buf |= (byte)(b << bio.ct);
142 }
143
144 private static int bio_getbit(opj_bio bio)
145 {
146 if (bio.ct == 0)
147 bio_bytein(bio);
148 bio.ct--;
149
150 return (int)((bio.buf >> bio.ct) & 1);
151 }
152 }
153
154 public struct opj_bio
155 {
156 public byte start;
157 public byte end;
158 public byte bp;
159 public uint buf;
160 public int ct;
161 }
162}
diff --git a/OpenSim/Framework/OpenJpeg/fix.cs b/OpenSim/Framework/OpenJpeg/fix.cs
deleted file mode 100644
index 9de0041..0000000
--- a/OpenSim/Framework/OpenJpeg/fix.cs
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public static class fix
35 {
36 public static int fix_mul(int a, int b)
37 {
38 long temp = (long)a * (long)b;
39 temp += temp & 4096;
40 return (int)(temp >> 13);
41 }
42 }
43}
diff --git a/OpenSim/Framework/OpenJpeg/int_.cs b/OpenSim/Framework/OpenJpeg/int_.cs
deleted file mode 100644
index 07321b5..0000000
--- a/OpenSim/Framework/OpenJpeg/int_.cs
+++ /dev/null
@@ -1,84 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public static class int_
35 {
36 public static int int_min(int a, int b)
37 {
38 return a < b ? a : b;
39 }
40
41 public static int int_max(int a, int b)
42 {
43 return (a > b) ? a : b;
44 }
45
46 public static int int_clamp(int a, int min, int max)
47 {
48 if (a < min)
49 return min;
50 if (a > max)
51 return max;
52
53 return a;
54 }
55
56 public static int int_abs(int a)
57 {
58 return a < 0 ? -a : a;
59 }
60
61 public static int int_ceildiv(int a, int b)
62 {
63 return (a + b - 1) / b;
64 }
65
66 public static int int_ceildivpow2(int a, int b)
67 {
68 return (a + (1 << b) - 1) >> b;
69 }
70
71 public static int int_floordivpow2(int a, int b)
72 {
73 return a >> b;
74 }
75
76 public static int int_floorlog2(int a)
77 {
78 for (int l=0; a > 1; l++)
79 a >>= 1;
80
81 return 1;
82 }
83 }
84}
diff --git a/OpenSim/Framework/OpenJpeg/j2k.cs b/OpenSim/Framework/OpenJpeg/j2k.cs
deleted file mode 100644
index 8751792..0000000
--- a/OpenSim/Framework/OpenJpeg/j2k.cs
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public static class j2k
35 {
36 }
37
38 public enum J2K_STATUS
39 {
40 J2K_STATE_MHSOC = 0x0001, /**< a SOC marker is expected */
41 J2K_STATE_MHSIZ = 0x0002, /**< a SIZ marker is expected */
42 J2K_STATE_MH = 0x0004, /**< the decoding process is in the main header */
43 J2K_STATE_TPHSOT = 0x0008, /**< the decoding process is in a tile part header and expects a SOT marker */
44 J2K_STATE_TPH = 0x0010, /**< the decoding process is in a tile part header */
45 J2K_STATE_MT = 0x0020, /**< the EOC marker has just been read */
46 J2K_STATE_NEOC = 0x0040, /**< the decoding process must not expect a EOC marker because the codestream is truncated */
47 J2K_STATE_ERR = 0x0080 /**< the decoding process has encountered an error */
48 }
49
50 public enum J2K_T2_MODE
51 {
52 THRESH_CALC = 0, /** Function called in Rate allocation process*/
53 FINAL_PASS = 1 /** Function called in Tier 2 process*/
54 }
55
56 public struct opj_stepsize
57 {
58 public int expn;
59 public int mant;
60 }
61
62 public struct opj_tccp
63 {
64 public int csty;
65 public int numresolutions;
66 public int cblkw;
67 public int cblkh;
68 public int cblksty;
69 public int qmfbid;
70 public int qntsty;
71 /// <summary>
72 /// don't forget to initialize 97 elements
73 /// </summary>
74 public opj_stepsize[] stepsizes;
75 public int numgbits;
76 public int roishift;
77 /// <summary>
78 /// Don't forget to initialize 33 elements
79 /// </summary>
80 public int[] prcw;
81 }
82
83 public struct opj_tcp
84 {
85 public int first;
86 public int csty;
87 public PROG_ORDER prg;
88 public int numlayers;
89 public int mct;
90 /// <summary>
91 /// don't forget to initialize to 100
92 /// </summary>
93 public float[] rates;
94 public int numpocs;
95 public int POC;
96 /// <summary>
97 /// Don't forget to initialize to 32
98 /// </summary>
99 public opj_poc[] pocs;
100 public byte ppt_data;
101 public byte ppt_data_first;
102 public int ppt;
103 public int ppt_store;
104 public int ppt_len;
105 /// <summary>
106 /// Don't forget to initialize 100 elements
107 /// </summary>
108 public float[] distoratio;
109 public opj_tccp tccps;
110 }
111
112 public struct opj_cp
113 {
114 public CINEMA_MODE cinema;
115 public int max_comp_size;
116 public int img_size;
117 public RSIZ_CAPABILITIES rsiz;
118 public sbyte tp_on;
119 public sbyte tp_flag;
120 public int tp_pos;
121 public int distro_alloc;
122 public int fixed_alloc;
123 public int fixed_quality;
124 public int reduce;
125 public int layer;
126 public LIMIT_DECODING limit_decoding;
127 public int tx0;
128 public int ty0;
129 public int tdx;
130 public int tdy;
131 public sbyte? comment;
132 public int tw;
133 public int th;
134 public int? tileno;
135 public byte ppm_data;
136 public byte ppm_data_first;
137 public int ppm;
138 public int ppm_store;
139 public int ppm_previous;
140 public int ppm_len;
141 public opj_tcp tcps;
142 public int matrice;
143 }
144
145 public static class j2kdefines
146 {
147 public const uint J2K_CP_CSTY_PRT = 0x01;
148 public const uint J2K_CP_CSTY_SOP = 0x02;
149 public const uint J2K_CP_CSTY_EPH = 0x04;
150 public const uint J2K_CCP_CSTY_PRT = 0x01;
151 public const uint J2K_CCP_CBLKSTY_LAZY = 0x01;
152 public const uint J2K_CCP_CBLKSTY_RESET = 0x02;
153 public const uint J2K_CCP_CBLKSTY_TERMALL = 0x04;
154 public const uint J2K_CCP_CBLKSTY_VSC = 0x08;
155 public const uint J2K_CCP_CBLKSTY_PTERM =0x10;
156 public const uint J2K_CCP_CBLKSTY_SEGSYM = 0x20;
157 public const uint J2K_CCP_QNTSTY_NOQNT = 0;
158 public const uint J2K_CCP_QNTSTY_SIQNT = 1;
159 public const uint J2K_CCP_QNTSTY_SEQNT = 2;
160
161 public const uint J2K_MS_SOC = 0xff4f; /**< SOC marker value */
162 public const uint J2K_MS_SOT = 0xff90; /**< SOT marker value */
163 public const uint J2K_MS_SOD = 0xff93; /**< SOD marker value */
164 public const uint J2K_MS_EOC = 0xffd9; /**< EOC marker value */
165 public const uint J2K_MS_SIZ = 0xff51; /**< SIZ marker value */
166 public const uint J2K_MS_COD = 0xff52; /**< COD marker value */
167 public const uint J2K_MS_COC = 0xff53; /**< COC marker value */
168 public const uint J2K_MS_RGN = 0xff5e; /**< RGN marker value */
169 public const uint J2K_MS_QCD = 0xff5c; /**< QCD marker value */
170 public const uint J2K_MS_QCC = 0xff5d; /**< QCC marker value */
171 public const uint J2K_MS_POC = 0xff5f; /**< POC marker value */
172 public const uint J2K_MS_TLM = 0xff55; /**< TLM marker value */
173 public const uint J2K_MS_PLM = 0xff57; /**< PLM marker value */
174 public const uint J2K_MS_PLT = 0xff58; /**< PLT marker value */
175 public const uint J2K_MS_PPM = 0xff60; /**< PPM marker value */
176 public const uint J2K_MS_PPT = 0xff61; /**< PPT marker value */
177 public const uint J2K_MS_SOP = 0xff91; /**< SOP marker value */
178 public const uint J2K_MS_EPH = 0xff92; /**< EPH marker value */
179 public const uint J2K_MS_CRG = 0xff63; /**< CRG marker value */
180 public const uint J2K_MS_COM = 0xff64; /**< COM marker value */
181 }
182}
diff --git a/OpenSim/Framework/OpenJpeg/openjpeg.cs b/OpenSim/Framework/OpenJpeg/openjpeg.cs
deleted file mode 100644
index f0b2518..0000000
--- a/OpenSim/Framework/OpenJpeg/openjpeg.cs
+++ /dev/null
@@ -1,375 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public class openjpeg
35 {
36 public openjpeg()
37 {
38 }
39 }
40
41 public enum PROG_ORDER
42 {
43 PROG_UNKNOWN = -1,
44 LRCP = 0,
45 RLCP = 1,
46 RPCL = 2,
47 PCRL = 3,
48 CPRL = 4
49 }
50
51 public enum RSIZ_CAPABILITIES
52 {
53 STD_RSIZ = 0,
54 CINEMA2K = 3,
55 CINEMA4K = 4
56 }
57
58 public enum CINEMA_MODE
59 {
60 OFF = 0,
61 CINEMA2K_24 = 1,
62 CINEMA2K_48 = 2,
63 CINEMA4K_24 = 3
64 }
65
66 public enum COLOR_SPACE
67 {
68 CLRSPC_UNKNOWN = -1,
69 CLRSPC_SRGB = 1,
70 CLRSPC_GRAY = 2,
71 CLRSPC_SYCC = 3
72 }
73
74 public enum CODEC_FORMAT
75 {
76 CODEC_UNKNOWN = -1,
77 CODEC_J2K = 0,
78 CODEC_JPT = 1,
79 CODEC_JP2 = 2
80 }
81
82 public enum LIMIT_DECODING
83 {
84 NO_LIMITATION = 0,
85 LIMIT_TO_MAIN_HEADER=1,
86 DECODE_ALL_BUT_PACKETS = 2
87 }
88
89 public struct opj_poc
90 {
91 public int resno0, compno0;
92 public int layno1, resno1, compno1;
93 public int layno0, precno0, precno1;
94 public PROG_ORDER prg1, prg;
95 /// <summary>
96 /// Don't forget to initialize with 5 elements
97 /// </summary>
98 public sbyte[] progorder;
99 public int tile;
100 public int tx0, tx1, ty0, ty1;
101 public int layS, resS, copmS, prcS;
102 public int layE, resE, compE, prcE;
103 public int txS, txE, tyS, tyE, dx, dy;
104 public int lay_t, res_t, comp_t, prc_t, tx0_t, ty0_t;
105 }
106
107 public struct opj_cparameters
108 {
109 public bool tile_size_on;
110 public int cp_tx0;
111 public int cp_ty0;
112 public int cp_tdx;
113 public int cp_tdy;
114 public int cp_disto_alloc;
115 public int cp_fixed_alloc;
116 public int cp_fixed_wuality;
117 public int cp_matrice;
118 public sbyte cp_comment;
119 public int csty;
120 public PROG_ORDER prog_order;
121
122 /// <summary>
123 /// Don't forget to initialize 32 elements
124 /// </summary>
125 public opj_poc[] POC;
126 public int numpocs;
127 public int tcp_numlayers;
128 /// <summary>
129 /// Don't forget to intitialize 100 elements
130 /// </summary>
131 public float[] tcp_rates;
132 /// <summary>
133 /// Don't forget to initialize 100 elements
134 /// </summary>
135 public float[] tcp_distoratio;
136 public int numresolution;
137 public int cblockw_init;
138 public int cblockh_init;
139 public int mode;
140 public int irreversible;
141 public int roi_compno;
142 public int roi_shift;
143 public int res_spec;
144
145 /// <summary>
146 /// Don't forget to initialize 33 elements
147 /// </summary>
148 public int[] prc_init;
149 /// <summary>
150 /// Don't forget to initialize 33 elements
151 /// </summary>
152 public int[] prch_init;
153
154 public string infile;
155 public string outfile;
156 public int index_on;
157 public string index;
158 public int image_offset_x0;
159 public int image_offset_y0;
160 public int subsampling_dx;
161 public int subsampling_dy;
162 public int decod_format;
163 public int cod_format;
164 public bool jpwl_epc_on;
165 public int jpwl_hprot_MH;
166 /// <summary>
167 /// Don't forget to initialize 16 elements
168 /// </summary>
169 public int[] jpwl_hprot_TPH_tileno;
170 /// <summary>
171 /// Don't forget to initialize 16 elements
172 /// </summary>
173 public int[] jpwl_hprot_TPH;
174
175 /// <summary>
176 /// Don't forget to initialize 16 elements
177 /// </summary>
178 public int[] jpwl_pprot_tileno;
179 public int[] jpwl_pprot_packno;
180 public int[] jpwl_pprot;
181 public int jpwl_sens_size;
182 public int jpwl_sense_addr;
183 public int jpwl_sens_range;
184 public int jpwl_sens_MH;
185
186 /// <summary>
187 /// Don't forget to initialize 16 elements
188 /// </summary>
189 public int[] jpwl_sens_TPH_tileno;
190
191 /// <summary>
192 /// Don't forget to initialize 16 elements
193 /// </summary>
194 public int[] jpwl_sens_TPH;
195 public CINEMA_MODE cp_cinema;
196 public int max_comp_size;
197 public sbyte tp_on;
198 public sbyte tp_flag;
199 public sbyte tcp_mct;
200 }
201
202 public struct opj_dparameters
203 {
204 public int cp_reduce;
205 public int cp_layer;
206 public string infile;
207 public string outfile;
208 public int decod_format;
209 public int cod_format;
210 public bool jpwl_correct;
211 public int jpwl_exp_comps;
212 public int jpwl_max_tiles;
213 public LIMIT_DECODING cp_limit_decoding;
214 }
215
216 public struct opj_common_fields
217 {
218 public bool is_decompressor;
219 public CODEC_FORMAT codec_format;
220 }
221
222 public struct opj_common_struct
223 {
224 public opj_common_fields flds;
225 }
226
227 public struct opj_cinfo
228 {
229 public opj_common_fields flds;
230 }
231
232 public struct opj_dinfo
233 {
234 public opj_common_fields flds;
235 }
236
237 public struct opj_cio
238 {
239 public opj_common_struct cinfo;
240 public int openmode;
241 public byte buffer;
242 public int length;
243 public byte start;
244 public byte end;
245 public byte bp;
246 }
247
248 public struct opj_image_comp
249 {
250 public int dx;
251 public int dy;
252 public int w;
253 public int h;
254 public int x0;
255 public int y0;
256 public int prec;
257 public int bpp;
258 public int sgnd;
259 public int resno_decoded;
260 public int factor;
261 public int data;
262 }
263
264 public struct opj_image
265 {
266 public int x0;
267 public int y0;
268 public int x1;
269 public int y1;
270 public int numcomps;
271 public COLOR_SPACE color_space;
272 public opj_image_comp comps;
273 }
274
275 public struct opj_image_comptparm
276 {
277 public int dx;
278 public int dy;
279 public int w;
280 public int h;
281 public int x0;
282 public int y0;
283 public int prec;
284 public int bpp;
285 public int sgnd;
286 }
287
288 public struct opj_packet_info
289 {
290 public int start_pos;
291 public int end_ph_pos;
292 public int end_pos;
293 public double disto;
294 }
295
296 public struct opj_tp_info
297 {
298 public int tp_start_pos;
299 public int tp_end_header;
300 public int tp_end_pos;
301 public int tp_start_pack;
302 public int tp_numpacks;
303 }
304
305 public struct opj_tile_info
306 {
307 public double thresh;
308 public int tileno;
309 public int start_pos;
310 public int end_header;
311 public int end_pos;
312 /// <summary>
313 /// Don't forget to initialize 33 elements
314 /// </summary>
315 public int[] pw;
316 /// <summary>
317 /// Don't forget to initialize 33 elements
318 /// </summary>
319 public int[] ph;
320 /// <summary>
321 /// Don't forget to initialize 33 elements
322 /// </summary>
323 public int[] pdx;
324 /// <summary>
325 /// Don't forget to initialize 33 elements
326 /// </summary>
327 public int[] pdy;
328
329 public opj_packet_info packet;
330 public int numpix;
331 public double distotile;
332 public int num_tps;
333 public opj_tp_info tp;
334 }
335
336 public struct opj_marker_info_t
337 {
338 public ushort type;
339 public int pos;
340 public int len;
341 }
342
343 public struct opj_codestream_info
344 {
345 public double D_max;
346 public int packno;
347 public int index_write;
348 public int image_w;
349 public int image_h;
350
351 public PROG_ORDER prog;
352
353 public int tile_x;
354 public int tile_y;
355 public int tile_Ox;
356 public int tile_Oy;
357 public int tw;
358 public int numcomps;
359 public int numlayers;
360 public int numdecompos;
361 public int marknum;
362 public opj_marker_info_t marker;
363 public int maxmarknum;
364 public int main_head_start;
365 public int main_head_end;
366 public int codestream_size;
367 public opj_tile_info tile;
368 }
369
370 public static class opj_defines
371 {
372 public const int OPJ_STREAM_READ = 0x0001;
373 public const int OPJ_STREAM_WRITE = 0x0002;
374 }
375}
diff --git a/OpenSim/Framework/OpenJpeg/pi.cs b/OpenSim/Framework/OpenJpeg/pi.cs
deleted file mode 100644
index 7da7d71..0000000
--- a/OpenSim/Framework/OpenJpeg/pi.cs
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.OpenJpeg
33{
34 public static class pi
35 {
36 }
37
38 public struct opj_pi_resolution
39 {
40 public int pdx, pdy;
41 public int pw, ph;
42 }
43
44 public struct opj_pi_comp
45 {
46 public int dx, dy;
47 public int numresolutions;
48 public opj_pi_resolution resolutions;
49 }
50
51 public struct obj_pi_iterator
52 {
53 public sbyte tp_on;
54 public short include;
55 public int step_l;
56 public int step_r;
57 public int step_c;
58 public int step_p;
59 public int compno;
60 public int resno;
61 public int precno;
62 public int layno;
63 public int first;
64 public opj_poc poc;
65 public int numcomps;
66 public opj_pi_comp comps;
67
68 public int tx0, ty0, tx1, ty1;
69 public int x, y, dx, dy;
70 }
71}