/// <summary>
        /// Method to create TS_RFX_CONTEXT.
        /// </summary>
        /// <param name="isImageMode">Indicates the operational mode.</param>
        /// <param name="entropy">Indicates the entropy algorithm.</param>
        public TS_RFX_CONTEXT CreateTsRfxContext(OperationalMode opMode, EntropyAlgorithm entropy)
        {
            TS_RFX_CONTEXT rfxContext = new TS_RFX_CONTEXT();
            rfxContext.CodecChannelT = new TS_RFX_CODEC_CHANNELT();
            rfxContext.CodecChannelT.blockType = blockType_Value.WBT_CONTEXT;
            rfxContext.CodecChannelT.blockLen = 13;
            rfxContext.CodecChannelT.codecId = 0x01;
            rfxContext.CodecChannelT.channelId = 0x00;
            rfxContext.ctxId = 0x00;
            rfxContext.tileSize = 0x0040;

            ushort flags = 0x0002;
            if (opMode == OperationalMode.VideoMode) flags = 0x0000;
            ushort cct = 0x0001;
            ushort xft = 0x0001;
            ushort et = 0x0001;
            if (entropy == EntropyAlgorithm.CLW_ENTROPY_RLGR3) et = 0x0004;
            ushort qt = 0x0001;
            ushort r = 0x0000;

            rfxContext.properties = 0x0000;
            rfxContext.properties |= flags;
            rfxContext.properties |= (ushort)(cct << 3);
            rfxContext.properties |= (ushort)(xft << 5);
            rfxContext.properties |= (ushort)(et << 9);
            rfxContext.properties |= (ushort)(qt << 13);
            rfxContext.properties |= (ushort)(r << 15);

            return rfxContext;
        }
示例#2
0
        /// <summary>
        /// Method to create TS_RFX_CONTEXT.
        /// </summary>
        /// <param name="isImageMode">Indicates the operational mode.</param>
        /// <param name="entropy">Indicates the entropy algorithm.</param>
        public TS_RFX_CONTEXT CreateTsRfxContext(OperationalMode opMode, EntropyAlgorithm entropy)
        {
            TS_RFX_CONTEXT rfxContext = new TS_RFX_CONTEXT();

            rfxContext.CodecChannelT           = new TS_RFX_CODEC_CHANNELT();
            rfxContext.CodecChannelT.blockType = blockType_Value.WBT_CONTEXT;
            rfxContext.CodecChannelT.blockLen  = 13;
            rfxContext.CodecChannelT.codecId   = 0x01;
            rfxContext.CodecChannelT.channelId = 0xFF;
            rfxContext.ctxId    = 0x00;
            rfxContext.tileSize = 0x0040;

            ushort flags = 0x0002;

            if (opMode == OperationalMode.VideoMode)
            {
                flags = 0x0000;
            }
            ushort cct = 0x0001;
            ushort xft = 0x0001;
            ushort et  = 0x0001;

            if (entropy == EntropyAlgorithm.CLW_ENTROPY_RLGR3)
            {
                et = 0x0004;
            }
            ushort qt = 0x0001;
            ushort r  = 0x0000;

            rfxContext.properties  = 0x0000;
            rfxContext.properties |= flags;
            rfxContext.properties |= (ushort)(cct << 3);
            rfxContext.properties |= (ushort)(xft << 5);
            rfxContext.properties |= (ushort)(et << 9);
            rfxContext.properties |= (ushort)(qt << 13);
            rfxContext.properties |= (ushort)(r << 15);

            return(rfxContext);
        }