Previous: Structure of the packet stream
Up: Appendix 1: Packetization of H.261 video streams
Next: Usage of RTP parameters
Previous Page: Structure of the packet stream
Next Page: Usage of RTP parameters
The H.261 information are carried as data within the RTP protocol, using the following information:
_____________________________________________ | Ver | Protocol version (1). | |___________|________________________________| | Channel | Identifies one particular | | | video stream. | |___________|________________________________| | Content | H.261 encoded video (31). | |___________|________________________________| | Sequence | Identifies the packet within | | number | a stream | |___________|________________________________| | Sync | Set if the packet | | | includes the end of an image.| |___________|________________________________| | Timestamp | The date at which the | | | image was grabbed. | |___________|________________________________|
The very definition of this settings implies that the beginning of an image shall always be synchronized with a packet. The RTP sequence number can be used to detect missing packets. In this case, one shall ignore all incoming packets until the next synchronization mark is received ("S" bit set in the H.261 header). The "Sync" bit can be used as a flag to trigger display the new image on the screen. The H.261 data will follow the RTP options, as in:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . RTP header + RTP options (optional) . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | H.261 options | H.261 stream... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The H.261 options field is defined as following:
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |S|SBIT |E|EBIT |C|I|V|F|Q|SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
___________________________________________________________________ |S (1 bit) | Start of GOB. Set if the packet is a | | | start of GOB. | |______________|__________________________________________________| |SBIT (3 bits) | Start bit position number of bits | | | that should be ignored in the first data octet.| |______________|__________________________________________________| |E (1 bit) | End of GOB. Set if the packet is an | | | end of GOB. | |______________|__________________________________________________| |EBIT (3 bits) | End bit position number of bits | | | that should be ignored in the last data octet. | |______________|__________________________________________________| |C (1 bit) | Color flag. Set if color is encoded. | |______________|__________________________________________________| |I (1 bit) | Full Intra Image flag. Set if it is | | | the first packet of a full intra image. | |______________|__________________________________________________| |V (1 bit) | movement Vector flag. Set if movement | | | vectors are encoded. | |______________|__________________________________________________| |F (1 bit) | Feedback flag. Set if FIR and NACK | | | packets are enabled. | |______________|__________________________________________________| |Q | QoS feedback flag. Set if QoS packets are | | | requested. | |______________|__________________________________________________| |SIZE (3 bits) | Image format: | | | QCIF, CIF or number of CIF in SCIF. | |______________|__________________________________________________|
The image format (3 bits) is defined as following:
____________________________ | QCIF | 000| |____________________|______| | CIF | 001| |____________________|______| | SCIF 0 | | | upper left corner | 100| | CIF in SCIF image | | |____________________|______| | SCIF 1 | | | upper right corner | 101| | CIF in SCIF image | | |____________________|______| | SCIF 2 | | | lower left corner | 110| | CIF in SCIF image | | |____________________|______| | SCIF 3 | | | lower right corner | 111| | CIF in SCIF image | | |____________________|______|
With: