corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * CVS identifier:
3 *
4 * $Id: DecoderSpecs.java,v 1.25 2002/07/25 15:06:17 grosbois Exp $
5 *
6 * Class: DecoderSpecs
7 *
8 * Description: Hold all decoder specifications
9 *
10 *
11 *
12 * COPYRIGHT:
13 *
14 * This software module was originally developed by Raphaël Grosbois and
15 * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
16 * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
17 * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
18 * Centre France S.A) in the course of development of the JPEG2000
19 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
20 * software module is an implementation of a part of the JPEG 2000
21 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio
22 * Systems AB and Canon Research Centre France S.A (collectively JJ2000
23 * Partners) agree not to assert against ISO/IEC and users of the JPEG
24 * 2000 Standard (Users) any of their rights under the copyright, not
25 * including other intellectual property rights, for this software module
26 * with respect to the usage by ISO/IEC and Users of this software module
27 * or modifications thereof for use in hardware or software products
28 * claiming conformance to the JPEG 2000 Standard. Those intending to use
29 * this software module in hardware or software products are advised that
30 * their use may infringe existing patents. The original developers of
31 * this software module, JJ2000 Partners and ISO/IEC assume no liability
32 * for use of this software module or modifications thereof. No license
33 * or right to this software module is granted for non JPEG 2000 Standard
34 * conforming products. JJ2000 Partners have full right to use this
35 * software module for his/her own purpose, assign or donate this
36 * software module to any third party and to inhibit third parties from
37 * using this software module for non JPEG 2000 Standard conforming
38 * products. This copyright notice must be included in all copies or
39 * derivative works of this software module.
40 *
41 * Copyright (c) 1999/2000 JJ2000 Partners.
42 * */
43 using System;
44 using CSJ2K.j2k.codestream.reader;
45 using CSJ2K.j2k.wavelet.synthesis;
46 using CSJ2K.j2k.quantization;
47 using CSJ2K.j2k.entropy;
48 using CSJ2K.j2k.wavelet;
49 using CSJ2K.j2k.image;
50 using CSJ2K.j2k.util;
51 using CSJ2K.j2k.roi;
52 using CSJ2K.j2k;
53 namespace CSJ2K.j2k.decoder
54 {
55  
56 /// <summary> This class holds references to each module specifications used in the
57 /// decoding chain. This avoid big amount of arguments in method calls. A
58 /// specification contains values of each tile-component for one module. All
59 /// members must be instance of ModuleSpec class (or its children).
60 ///
61 /// </summary>
62 /// <seealso cref="ModuleSpec">
63 ///
64 /// </seealso>
65 public class DecoderSpecs : System.ICloneable
66 {
67 /// <summary> Returns a copy of the current object.
68 ///
69 /// </summary>
70 virtual public DecoderSpecs Copy
71 {
72 get
73 {
74 DecoderSpecs decSpec2;
75 try
76 {
77 decSpec2 = (DecoderSpecs) this.Clone();
78 }
79 //UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
80 catch (System.Exception)
81 {
82 throw new System.ApplicationException("Cannot clone the DecoderSpecs instance");
83 }
84 // Quantization
85 decSpec2.qts = (QuantTypeSpec) qts.Copy;
86 decSpec2.qsss = (QuantStepSizeSpec) qsss.Copy;
87 decSpec2.gbs = (GuardBitsSpec) gbs.Copy;
88 // Wavelet transform
89 decSpec2.wfs = (SynWTFilterSpec) wfs.Copy;
90 decSpec2.dls = (IntegerSpec) dls.Copy;
91 // Component transformation
92 decSpec2.cts = (CompTransfSpec) cts.Copy;
93 // ROI
94 if (rois != null)
95 {
96 decSpec2.rois = (MaxShiftSpec) rois.Copy;
97 }
98 return decSpec2;
99 }
100  
101 }
102  
103 /// <summary>ICC Profiling specifications </summary>
104 public ModuleSpec iccs;
105  
106 /// <summary>ROI maxshift value specifications </summary>
107 public MaxShiftSpec rois;
108  
109 /// <summary>Quantization type specifications </summary>
110 public QuantTypeSpec qts;
111  
112 /// <summary>Quantization normalized base step size specifications </summary>
113 public QuantStepSizeSpec qsss;
114  
115 /// <summary>Number of guard bits specifications </summary>
116 public GuardBitsSpec gbs;
117  
118 /// <summary>Analysis wavelet filters specifications </summary>
119 public SynWTFilterSpec wfs;
120  
121 /// <summary>Number of decomposition levels specifications </summary>
122 public IntegerSpec dls;
123  
124 /// <summary>Number of layers specifications </summary>
125 public IntegerSpec nls;
126  
127 /// <summary>Progression order specifications </summary>
128 public IntegerSpec pos;
129  
130 /// <summary>The Entropy decoder options specifications </summary>
131 public ModuleSpec ecopts;
132  
133 /// <summary>The component transformation specifications </summary>
134 public CompTransfSpec cts;
135  
136 /// <summary>The progression changes specifications </summary>
137 public ModuleSpec pcs;
138  
139 /// <summary>The error resilience specifications concerning the entropy
140 /// decoder
141 /// </summary>
142 public ModuleSpec ers;
143  
144 /// <summary>Precinct partition specifications </summary>
145 public PrecinctSizeSpec pss;
146  
147 /// <summary>The Start Of Packet (SOP) markers specifications </summary>
148 public ModuleSpec sops;
149  
150 /// <summary>The End of Packet Headers (EPH) markers specifications </summary>
151 public ModuleSpec ephs;
152  
153 /// <summary>Code-blocks sizes specification </summary>
154 public CBlkSizeSpec cblks;
155  
156 /// <summary>Packed packet header specifications </summary>
157 public ModuleSpec pphs;
158  
159 /// <summary> Initialize all members with the given number of tiles and components.
160 ///
161 /// </summary>
162 /// <param name="nt">Number of tiles
163 ///
164 /// </param>
165 /// <param name="nc">Number of components
166 ///
167 /// </param>
168 public DecoderSpecs(int nt, int nc)
169 {
170 // Quantization
171 qts = new QuantTypeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
172 qsss = new QuantStepSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
173 gbs = new GuardBitsSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
174  
175 // Wavelet transform
176 wfs = new SynWTFilterSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
177 dls = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
178  
179 // Component transformation
180 cts = new CompTransfSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
181  
182 // Entropy decoder
183 ecopts = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
184 ers = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
185 cblks = new CBlkSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP);
186  
187 // Precinct partition
188 pss = new PrecinctSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP, dls);
189  
190 // Codestream
191 nls = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
192 pos = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
193 pcs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
194 sops = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
195 ephs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
196 pphs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
197 iccs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE);
198 pphs.setDefault((System.Object) false);
199 }
200 //UPGRADE_TODO: The following method was automatically generated and it must be implemented in order to preserve the class logic. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1232'"
201 virtual public System.Object Clone()
202 {
203 return null;
204 }
205 }
206 }