
8-4
System Stream Decoding and Synchronization
Final Rev F
Copyright 1996 by LSI Logic Corporation. All rights reserved.
tem Header data into the system channel buffer, and an interrupt indi-
cates that data is available.
A PES packet start code is identical to the MPEG-1 Packet Start code
and is detected in the same way. However, the syntax of the MPEG-2
PES packet is different from the MPEG-1 Packet, so the parser must take
a different action. The parser checks whether the packet contains audio
or video data, and whether the Stream Select eld matches the
requested stream (if enabled). If the parser does not nd a match, it dis-
cards the remainder of the packet. The parser uses the Packet Length
eld to determine where the packet ends. The parser must determine
where the packet ends to avoid mistakenly parsing the possible emula-
tion of restart codes in audio packet data.
To simplify implementation, the parser reads the PES Header Data
Length eld from the header and stores the indicated number of bytes in
the system channel buffer with an associated interrupt. The parser sam-
ples the write pointer for the audio or video elementary stream buffer and
stores its value in the system channel buffer.The parser then takes the
packet payload and moves it into the audio or video elementary stream
buffer as appropriate.
8.1.2
Parsing a
Transport
Stream
The L64005 accepts up to two interleaved PES streams (one video, one
audio) from a Transport Stream. The Transport Stream is different from
the Program Stream because in a Transport Stream, the PES streams
may split each other at non-PES boundaries. This means that there must
be duplicate states for parsing two PES streams and two PES header
buffers.
Transport packet payloads that contain PES data are presented over the
serial or parallel channel interface. The AVALID or VVALID strobe indi-
cates the type of the PES stream. Audio PES streams are parsed as
described in the MPEG-2 Program Stream case. The parser stores the
PES header in the audio system channel buffer, and an associated inter-
rupt occurs. The parser stores the audio elementary stream in the audio
channel buffer. Video PES are parsed as described in the MPEG-2 Pro-
gram Stream case. The parser stores the video PES header in the video
system channel buffer, and a corresponding interrupt occurs. The parser
stores the video elementary stream in the video channel buffer. As in the
MPEG-1 and MPEG-2 Program Stream cases, the parser samples the
write pointer for the respective audio and video elementary stream buff-