Information Technology Reference
In-Depth Information
Chapter 6: Program and transport streams
After compression, audio and video signals are simply data and only differ from generic data in that they relate to
real-time signals. MPEG bitstreams are basically means of transporting data whilst allowing the time axis of the
original signal to be re-created.
6.1 Introduction
There are two basic applications of MPEG bitstreams - recording and transmission - and these have quite different
requirements. In the multi- channel recording application the encoders and decoders can all share the same clock.
The transport speed can be altered so that the incoming bit rate can be slaved to a reference generated by the
decoder itself.
In the case of multichannel transmission the program sources are not necessarily synchronous. The source of
timing is the encoder and the decoder must synchronize or genlock to that. Thus the difference between a program
stream and a transport stream is that the latter must contain additional synchronizing information to lock the
encoder and decoder clocks together independently in each program.
6.2 Packets and time stamps
The video elementary stream is an endless bitstream representing pictures which are not necessarily in the correct
order and which take a variable length of time to transmit. Storage and transmission systems prefer discrete blocks
of data and so elementary streams are packetized to form a PES (packetized elementary stream). Audio
elementary streams are also packetized. A packet is shown in Figure 6.1 . It begins with a header containing an
unique packet start code and a code which identifies the type of data stream. Optionally the packet header also
may contain one or more time stamps which are used for synchronizing the video decoder to real time and for
obtaining lip-sync.
Figure 6.1: A PES packet structure is used to break up the continuous elementary stream.
Figure 6.2 shows that a time stamp is a sample of the state of a counter which is driven by a 90 kHz clock. This is
obtained by dividing down the master 27 MHz clock of MPEG-2. There are two types of time stamp: PTS and DTS.
These are abbreviations for presentation time stamp and decode time stamp. A presentation time stamp
determines when the associated picture should be displayed on the screen, whereas a decode time stamp
determines when it should be decoded. In bidirectional coding these times can be quite different.
Figure 6.2: Time stamps are the result of sampling a counter driven by the encoder clock.
Audio packets only have presentation time stamps. Clearly if lip-sync is to be obtained, the audio and the video
streams of a given program must have been locked to the same master 27 MHz clock and the time stamps must
have come from the same counter driven by that clock.
With reference to Figure 6.3 , the GOP begins with an I picture, and then P1 is sent out of sequence prior to the B
pictures. P1 has to be decoded before B1 and B2 can be decoded. As only one picture can be decoded at a time,
the I picture is decoded at time N , but not displayed until time N + 1. As the I picture is being displayed, P1 is being
decoded at N + 1. P1 will be stored in RAM. At time N + 2, B1 is decoded and displayed immediately. For this
reason B pictures need only PTS. At N + 3, B2 is decoded and displayed. At N + 4, P1 is displayed, hence the
large difference between PTS and DTS in P1 . Simultaneously P2 is decoded and stored ready for the decoding of
B3 and so on.
 
Search WWH ::




Custom Search