aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/OpenJpeg/j2k.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/OpenJpeg/j2k.cs158
1 files changed, 158 insertions, 0 deletions
diff --git a/OpenSim/Framework/OpenJpeg/j2k.cs b/OpenSim/Framework/OpenJpeg/j2k.cs
new file mode 100644
index 0000000..f655364
--- /dev/null
+++ b/OpenSim/Framework/OpenJpeg/j2k.cs
@@ -0,0 +1,158 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.OpenJpeg
6{
7
8 public static class j2k
9 {
10 }
11
12 public enum J2K_STATUS
13 {
14 J2K_STATE_MHSOC = 0x0001, /**< a SOC marker is expected */
15 J2K_STATE_MHSIZ = 0x0002, /**< a SIZ marker is expected */
16 J2K_STATE_MH = 0x0004, /**< the decoding process is in the main header */
17 J2K_STATE_TPHSOT = 0x0008, /**< the decoding process is in a tile part header and expects a SOT marker */
18 J2K_STATE_TPH = 0x0010, /**< the decoding process is in a tile part header */
19 J2K_STATE_MT = 0x0020, /**< the EOC marker has just been read */
20 J2K_STATE_NEOC = 0x0040, /**< the decoding process must not expect a EOC marker because the codestream is truncated */
21 J2K_STATE_ERR = 0x0080 /**< the decoding process has encountered an error */
22 }
23
24 public enum J2K_T2_MODE
25 {
26 THRESH_CALC = 0, /** Function called in Rate allocation process*/
27 FINAL_PASS = 1 /** Function called in Tier 2 process*/
28 }
29
30 public struct opj_stepsize
31 {
32 public int expn;
33 public int mant;
34 }
35
36 public struct opj_tccp
37 {
38 public int csty;
39 public int numresolutions;
40 public int cblkw;
41 public int cblkh;
42 public int cblksty;
43 public int qmfbid;
44 public int qntsty;
45 /// <summary>
46 /// don't forget to initialize 97 elements
47 /// </summary>
48 public opj_stepsize[] stepsizes;
49 public int numgbits;
50 public int roishift;
51 /// <summary>
52 /// Don't forget to initialize 33 elements
53 /// </summary>
54 public int[] prcw;
55
56 }
57
58 public struct opj_tcp
59 {
60 public int first;
61 public int csty;
62 public PROG_ORDER prg;
63 public int numlayers;
64 public int mct;
65 /// <summary>
66 /// don't forget to initialize to 100
67 /// </summary>
68 public float[] rates;
69 public int numpocs;
70 public int POC;
71 /// <summary>
72 /// Don't forget to initialize to 32
73 /// </summary>
74 public opj_poc[] pocs;
75 public byte ppt_data;
76 public byte ppt_data_first;
77 public int ppt;
78 public int ppt_store;
79 public int ppt_len;
80 /// <summary>
81 /// Don't forget to initialize 100 elements
82 /// </summary>
83 public float[] distoratio;
84 public opj_tccp tccps;
85
86 }
87
88 public struct opj_cp
89 {
90 public CINEMA_MODE cinema;
91 public int max_comp_size;
92 public int img_size;
93 public RSIZ_CAPABILITIES rsiz;
94 public sbyte tp_on;
95 public sbyte tp_flag;
96 public int tp_pos;
97 public int distro_alloc;
98 public int fixed_alloc;
99 public int fixed_quality;
100 public int reduce;
101 public int layer;
102 public LIMIT_DECODING limit_decoding;
103 public int tx0;
104 public int ty0;
105 public int tdx;
106 public int tdy;
107 public sbyte? comment;
108 public int tw;
109 public int th;
110 public int? tileno;
111 public byte ppm_data;
112 public byte ppm_data_first;
113 public int ppm;
114 public int ppm_store;
115 public int ppm_previous;
116 public int ppm_len;
117 public opj_tcp tcps;
118 public int matrice;
119 }
120
121 public static class j2kdefines
122 {
123 public const uint J2K_CP_CSTY_PRT = 0x01;
124 public const uint J2K_CP_CSTY_SOP = 0x02;
125 public const uint J2K_CP_CSTY_EPH = 0x04;
126 public const uint J2K_CCP_CSTY_PRT = 0x01;
127 public const uint J2K_CCP_CBLKSTY_LAZY = 0x01;
128 public const uint J2K_CCP_CBLKSTY_RESET = 0x02;
129 public const uint J2K_CCP_CBLKSTY_TERMALL = 0x04;
130 public const uint J2K_CCP_CBLKSTY_VSC = 0x08;
131 public const uint J2K_CCP_CBLKSTY_PTERM =0x10;
132 public const uint J2K_CCP_CBLKSTY_SEGSYM = 0x20;
133 public const uint J2K_CCP_QNTSTY_NOQNT = 0;
134 public const uint J2K_CCP_QNTSTY_SIQNT = 1;
135 public const uint J2K_CCP_QNTSTY_SEQNT = 2;
136
137 public const uint J2K_MS_SOC = 0xff4f; /**< SOC marker value */
138 public const uint J2K_MS_SOT = 0xff90; /**< SOT marker value */
139 public const uint J2K_MS_SOD = 0xff93; /**< SOD marker value */
140 public const uint J2K_MS_EOC = 0xffd9; /**< EOC marker value */
141 public const uint J2K_MS_SIZ = 0xff51; /**< SIZ marker value */
142 public const uint J2K_MS_COD = 0xff52; /**< COD marker value */
143 public const uint J2K_MS_COC = 0xff53; /**< COC marker value */
144 public const uint J2K_MS_RGN = 0xff5e; /**< RGN marker value */
145 public const uint J2K_MS_QCD = 0xff5c; /**< QCD marker value */
146 public const uint J2K_MS_QCC = 0xff5d; /**< QCC marker value */
147 public const uint J2K_MS_POC = 0xff5f; /**< POC marker value */
148 public const uint J2K_MS_TLM = 0xff55; /**< TLM marker value */
149 public const uint J2K_MS_PLM = 0xff57; /**< PLM marker value */
150 public const uint J2K_MS_PLT = 0xff58; /**< PLT marker value */
151 public const uint J2K_MS_PPM = 0xff60; /**< PPM marker value */
152 public const uint J2K_MS_PPT = 0xff61; /**< PPT marker value */
153 public const uint J2K_MS_SOP = 0xff91; /**< SOP marker value */
154 public const uint J2K_MS_EPH = 0xff92; /**< EPH marker value */
155 public const uint J2K_MS_CRG = 0xff63; /**< CRG marker value */
156 public const uint J2K_MS_COM = 0xff64; /**< COM marker value */
157 }
158}