Пример #1
0
        public T GetVlc <T>(VlcTable <T> vlcTable)
        {
            Vlc vlc = vlcTable.GetVlc(ShowBits(vlcTable.MaxBits));

            if (vlc == null)
            {
                return(vlcTable.DefaultValue);
            }
            GetBits(vlc.Length);                // Flush the bits
            return(vlcTable[vlc]);
        }
Пример #2
0
        public CavlcSliceData(INalUnitReader reader, IState readerState)
        {
            _reader                  = reader;
            _readerState             = readerState;
            _sliceState              = reader.State.SliceState;
            _pictureState            = _sliceState.PictureState;
            _sequenceState           = _pictureState.SequenceState;
            _coeffTokenChromaDc      = (ChromaFormat == ChromaFormat.YCbCr420) ? CoeffTokenChromaDc420 : CoeffTokenChromaDc422;
            _lumaCodedCoefficients   = new CodedCoefficients(_sliceState, PicHeightInMbs, SubBlockPartition.Luma);
            _chromaCodedCoefficients = new CodedCoefficients[2];
            _subMbTypes              = new ISubMacroblockType[4];

            SubBlockPartition chromaSubBlockPartition = ChromaArrayTypeSubBlockPartitions[_sequenceState.ChromaFormat.ChromaFormatIdc];

            for (int i = 0; i < _chromaCodedCoefficients.Length; i++)
            {
                _chromaCodedCoefficients[i] = new CodedCoefficients(_sliceState, PicHeightInMbs, chromaSubBlockPartition);
            }

            MbToSliceGroupMap = _mbToSliceGroup.CreateMacroBlockToSliceGroupMap(_sliceState);
        }
Пример #3
0
 public void TestFixtureTearDown()
 {
     _mockTable = null;
     _inputFile = null;
 }
Пример #4
0
 public void TestFixtureSetUp()
 {
     _mockTable = new VlcTable<int>(MockVlcData, 0);
     _inputFile = MockRepository.GenerateStub<IInputFile>();
 }
Пример #5
0
 public T GetVlc <T>(VlcTable <T> vlcTable)
 {
     return(_dataReader.GetVlc(vlcTable));
 }