public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; for (int i = GetFrameCenterOffsets(reader); i > 0; i--) { reader.GetBits(16, Attribute.FrameCenterHorizontalOffset); reader.GetMarker(); reader.GetBits(16, Attribute.FrameCenterVerticalOffset); reader.GetMarker(); } }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.GetBits(10, Attribute.LowerLayerTemporalReference); reader.GetMarker(); reader.GetBits(15, Attribute.LowerLayerHorizontalOffset); reader.GetMarker(); reader.GetBits(15, Attribute.LowerLayerVerticalOffset); reader.State.Picture.SpatialScalability = true; reader.State.Picture.SpatialTemporalWeightCodeTableIndex = (byte)reader.GetBits(2, Attribute.SpatialTemporalWeightCodeTableIndex); reader.GetFlag(Attribute.LowerLayerProgressiveFrame); reader.GetFlag(Attribute.LowerLayerDeinterlacedFieldSelect); }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; if ((reader.State.LastHeaderName != SequenceHeader.Name)) { resultState.Invalidate(); return; // Invalid header sequence } ISequenceState sequenceState = reader.State.Sequence; reader.GetBits(8, Attribute.ProfileAndLevelIndication); sequenceState.Progressive = reader.GetFlag(Attribute.ProgressiveSequence); sequenceState.ChromaFormat = (ChromaFormat)reader.GetBits(2, Attribute.ChromaFormat); uint horizontalSizeExtension = reader.GetBits(2, Attribute.HorizontalSizeExtension); sequenceState.HorizontalSize = (ushort)((sequenceState.HorizontalSize & 0x0fff) | (horizontalSizeExtension << 12)); uint verticalSizeExtension = reader.GetBits(2, Attribute.VerticalSizeExtension); sequenceState.VerticalSize = (ushort)((sequenceState.VerticalSize & 0x0fff) | (verticalSizeExtension << 12)); reader.GetBits(12, Attribute.BitRateExtension); reader.GetMarker(); reader.GetBits(8, Attribute.VbvBufferSizeExtension); reader.GetBits(1, Attribute.LowDelay); reader.GetBits(2, Attribute.FrameRateExtensionN); reader.GetBits(5, Attribute.FrameRateExtensionD); }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.State.Picture.Reset(); reader.State.SeenGop = false; if ((reader.State.LastHeaderName != null) && (reader.State.LastHeaderName != Slice.Name)) { resultState.Invalidate(); return; // Invalid header sequence } ISequenceState sequenceState = reader.State.Sequence; sequenceState.Reset(); sequenceState.Initialized = true; sequenceState.HorizontalSize = (ushort)reader.GetBits(12, Attribute.HorizontalSizeValue); sequenceState.VerticalSize = (ushort)reader.GetBits(12, Attribute.VerticalSizeValue); reader.GetBits(4, Attribute.AspectRatioInformation, AspectRatioResultFormatter); reader.GetBits(4, Attribute.FrameRateCode, FrameRateResultFormatter); reader.GetBits(18, Attribute.BitRateValue); reader.GetMarker(); reader.GetBits(10, Attribute.VbvBufferSizeValue); reader.GetFlag(Attribute.ConstrainedParametersFlag); if (reader.GetFlag(Attribute.LoadIntraQuantiserMatrix)) { reader.GetData(Attribute.IntraQuantiserMatrix, 64); } if (reader.GetFlag(Attribute.LoadNonIntraQuantiserMatrix)) { reader.GetData(Attribute.NonIntraQuantiserMatrix, 64); } }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; ScalableMode scalableMode = (ScalableMode)reader.GetBits(2, Attribute.ScalableMode, _scalableModeResultFormatter); reader.State.Sequence.ScalableMode = scalableMode; reader.GetBits(4, Attribute.LayerID); if (scalableMode == ScalableMode.SpatialScalability) { reader.GetBits(14, Attribute.LowerLayerPredictionHorizontalSize); reader.GetMarker(); reader.GetBits(14, Attribute.LowerLayerPredictionVerticalSize); reader.GetBits(5, Attribute.HorizontalSubsamplingFactorM); reader.GetBits(5, Attribute.HorizontalSubsamplingFactorN); reader.GetBits(5, Attribute.VerticalSubsamplingFactorM); reader.GetBits(5, Attribute.VerticalSubsamplingFactorN); } if (scalableMode == ScalableMode.TemporalScalability) { if (reader.GetFlag(Attribute.PictureMuxEnable)) { reader.GetFlag(Attribute.MuxToProgressiveSequence); } reader.GetBits(3, Attribute.PictureMuxOrder); reader.GetBits(3, Attribute.PictureMuxFactor); } }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.GetBits(2, Attribute.ReferenceSelectCode); reader.GetBits(10, Attribute.ForwardTemporalReference); reader.GetMarker(); reader.GetBits(10, Attribute.BackwardTemporalReference); }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.GetFlag(Attribute.CopyrightFlag); reader.GetBits(8, Attribute.CopyrightIdentifier); reader.GetFlag(Attribute.OriginalOrCopy); // TODO: true = original, false = copy reader.GetReservedBits(7); reader.GetMarker(); reader.GetAttribute(_copyrightNumberAttribute); }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.GetBits(3, Attribute.VideoFormat, _videoFormatResultFormatter); if (reader.GetFlag(Attribute.ColourDescription)) { reader.GetBits(8, Attribute.ColourPrimaries); reader.GetBits(8, Attribute.TransferCharacteristics); reader.GetBits(8, Attribute.MatrixCoefficients); } reader.GetBits(14, Attribute.DisplayHorizontalSize); reader.GetMarker(); reader.GetBits(14, Attribute.DisplayVerticalSize); }
public void Parse(IMpeg2VideoReader reader, IResultNodeState resultState) { resultState.Name = Name; reader.GetReservedBits(1); reader.GetBits(7, Attribute.CameraID); reader.GetMarker(); reader.GetBits(22, Attribute.HeightOfImageDevice); reader.GetMarker(); reader.GetBits(22, Attribute.FNumber); reader.GetMarker(); reader.GetBits(22, Attribute.VerticalAngleOfView); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionXUpper); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionXLower); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionYUpper); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionYLower); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionZUpper); reader.GetMarker(); reader.GetBits(16, Attribute.CameraPositionZLower); reader.GetMarker(); reader.GetBits(22, Attribute.CameraDirectionX); reader.GetMarker(); reader.GetBits(22, Attribute.CameraDirectionY); reader.GetMarker(); reader.GetBits(22, Attribute.CameraDirectionZ); reader.GetMarker(); reader.GetBits(22, Attribute.ImagePlaneVerticalX); reader.GetMarker(); reader.GetBits(22, Attribute.ImagePlaneVerticalY); reader.GetMarker(); reader.GetBits(22, Attribute.ImagePlaneVerticalZ); reader.GetMarker(); reader.GetReservedBits(32); }