public H264OutputStream(Nalu nalu, SequenceParameterSet sps,PictureParameterSet pps)
        {
            this.Nalu = nalu;
            this.sps = sps;
            this.pps = pps;

            if (pps.EntropyCodingModeFlag)
            {
                //TODO : CABAC
                // entropyOutputStream = new CABAC();
            }
            else
            {
                entropyOutputStream = new Cavlc(this);
            }
        }
예제 #2
0
        public SliceHeader(Slice slice, Nalu nalu, SequenceParameterSet sps, PictureParameterSet pps)
        {
            this.slice = slice;

            // BEGIN: parameters from Nalu, Picture Par Set and Sequence Par Set
            picParameterSetId = pps.PicParameterSetId;
            log2MaxFrameNumMinus4 = sps.Log2MaxFrameNumMinus4;
            frameMbsOnlyFlag = sps.FrameMbsOnlyFlag;
            picOrderCntType = sps.PicOrderCntType;
            log2MaxPicOrderCntLsbMinus4 = sps.Log2MaxPicOrderCntLsbMinus4;
            picInitQpMinus26 = pps.PicInitQpMinus26;
            nalRefIdc = nalu.NalRefIdc;
            nalUnitType = nalu.NalUnitType;
            // END: parameters from Nalu, Picture Par Set and Sequence Par Set

            sliceType = slice.Picture.TypeOfSlice;
            firstMbInSlice = slice.Picture.CurrentMbNr;
            noOutputOfPriorPicsFlag = false;
            longTermReferenceFlag = false;
            sliceQpDelta = (slice.Qp - 26 - picInitQpMinus26);
        }