示例#1
0
		/// <summary> Instantiates a new entropy decoder engine, with the specified source of
		/// data, nominal block width and height.
		/// 
		/// </summary>
		/// <param name="src">The source of data
		/// 
		/// </param>
		/// <param name="opt">The options to use for this encoder. It is a mix of the
		/// 'OPT_TERM_PASS', 'OPT_RESET_MQ', 'OPT_VERT_STR_CAUSAL', 'OPT_BYPASS'
		/// and 'OPT_SEG_SYMBOLS' option flags.
		/// 
		/// </param>
		/// <param name="doer">If true error detection will be performed, if any error
		/// detection features have been enabled.
		/// 
		/// </param>
		/// <param name="verber">This flag indicates if the entropy decoder should be
		/// verbose about bit stream errors that are detected and concealed.
		/// 
		/// </param>
		/// <param name="mQuit">the maximum number of bit planes to decode according to
		/// the m quit condition
		/// 
		/// </param>
		public StdEntropyDecoder(CodedCBlkDataSrcDec src, DecoderSpecs decSpec, bool doer, bool verber, int mQuit):base(src)
		{
			
			this.decSpec = decSpec;
			this.doer = doer;
			this.verber = verber;
			this.mQuit = mQuit;
			
			// If we do timing create necessary structures
#if DO_TIMING
			time = new long[src.NumComps];
			// If we are timing make sure that 'finalize' gets called.
			//UPGRADE_ISSUE: Method 'java.lang.System.runFinalizersOnExit' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangSystem'"
            // CONVERSION PROBLEM?
			//System_Renamed.runFinalizersOnExit(true);
#endif
			
			// Initialize internal variables
			state = new int[(decSpec.cblks.MaxCBlkWidth + 2) * ((decSpec.cblks.MaxCBlkHeight + 1) / 2 + 2)];
		}
示例#2
0
		/// <summary> Creates and returns the entropy decoder corresponding to the
		/// information read from the codestream header and with the special
		/// additional parameters from the parameter list.
		/// 
		/// </summary>
		/// <param name="src">The bit stream reader agent where to get code-block data
		/// from.
		/// 
		/// </param>
		/// <param name="pl">The parameter list containing parameters applicable to the
		/// entropy decoder (other parameters can also be present).
		/// 
		/// </param>
		/// <returns> The entropy decoder
		/// 
		/// </returns>
		public virtual EntropyDecoder createEntropyDecoder(CodedCBlkDataSrcDec src, ParameterList pl)
		{
			bool doer;
			bool verber;
			int mMax;
			
			// Check parameters
			pl.checkList(EntropyDecoder.OPT_PREFIX, ParameterList.toNameArray(EntropyDecoder.ParameterInfo));
			// Get error detection option
			doer = pl.getBooleanParameter("Cer");
			// Get verbose error detection option
			verber = pl.getBooleanParameter("Cverber");
			
			// Get maximum number of bit planes from m quit condition
			mMax = pl.getIntParameter("m_quit");
			return new StdEntropyDecoder(src, decSpec, doer, verber, mMax);
		}
示例#3
0
		/// <summary> Initializes the source of compressed data.
		/// 
		/// </summary>
		/// <param name="src">From where to obtain the compressed data.
		/// 
		/// </param>
		public EntropyDecoder(CodedCBlkDataSrcDec src):base(src)
		{
			this.src = src;
		}