/// <summary> Initialize all members with the given number of tiles and components. /// /// </summary> /// <param name="nt">Number of tiles /// /// </param> /// <param name="nc">Number of components /// /// </param> public DecoderSpecs(int nt, int nc) { // Quantization qts = new QuantTypeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); qsss = new QuantStepSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); gbs = new GuardBitsSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); // Wavelet transform wfs = new SynWTFilterSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); dls = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); // Component transformation cts = new CompTransfSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); // Entropy decoder ecopts = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); ers = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); cblks = new CBlkSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP); // Precinct partition pss = new PrecinctSizeSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE_COMP, dls); // Codestream nls = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); pos = new IntegerSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); pcs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); sops = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); ephs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); pphs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); iccs = new ModuleSpec(nt, nc, ModuleSpec.SPEC_TYPE_TILE); pphs.setDefault((System.Object)false); }
/// <summary> Constructs a new ForwCompTransf object that operates on the /// specified source of image data. /// /// </summary> /// <param name="imgSrc">The source from where to get the data to be /// transformed /// /// </param> /// <param name="decSpec">The decoder specifications /// /// </param> /// <param name="utdepth">The bit depth of the un-transformed components /// /// </param> /// <param name="pl">The command line optinons of the decoder /// /// </param> /// <seealso cref="BlkImgDataSrc"> /// /// </seealso> public InvCompTransf(BlkImgDataSrc imgSrc, DecoderSpecs decSpec, int[] utdepth, ParameterList pl) : base(imgSrc) { this.cts = decSpec.cts; this.wfs = decSpec.wfs; src = imgSrc; this.utdepth = utdepth; noCompTransf = !(pl.getBooleanParameter("comp_transf")); }
/// <summary> Initializes the source of compressed data. /// /// </summary> /// <param name="src">From where to obtain the quantized data. /// /// </param> /// <param name="rb">The number of "range bits" for each component (must be the /// "range bits" of the un-transformed components. For a definition of /// "range bits" see the getNomRangeBits() method. /// /// </param> /// <seealso cref="getNomRangeBits"> /// /// </seealso> public Dequantizer(CBlkQuantDataSrcDec src, int[] utrb, DecoderSpecs decSpec) : base(src) { if (utrb.Length != src.NumComps) { throw new System.ArgumentException(); } this.src = src; this.utrb = utrb; this.cts = decSpec.cts; this.wfs = decSpec.wfs; }