public static void readExtension(MemoryStream bb, SequenceHeader sh) { m_hasExtensions = true; BitReader inb = new BitReader(bb); int extType = inb.readNBit(4); switch (extType) { case Sequence_Extension: sh.sequenceExtension = SequenceExtension.read(inb); break; case Sequence_Scalable_Extension: sh.sequenceScalableExtension = SequenceScalableExtension.read(inb); break; case Sequence_Display_Extension: sh.sequenceDisplayExtension = SequenceDisplayExtension.read(inb); break; default: throw new Exception("Unsupported extension: " + extType); } }
public static SequenceDisplayExtension read(BitReader inv) { SequenceDisplayExtension sde = new SequenceDisplayExtension(); sde.video_format = inv.readNBit(3); if (inv.read1Bit() == 1) { sde.colorDescription = ColorDescription.read(inv); } sde.display_horizontal_size = inv.readNBit(14); inv.read1Bit(); sde.display_vertical_size = inv.readNBit(14); return(sde); }
public void copyExtensions(SequenceHeader sh) { sequenceExtension = sh.sequenceExtension; sequenceScalableExtension = sh.sequenceScalableExtension; sequenceDisplayExtension = sh.sequenceDisplayExtension; }