
Preparser
6-9
6.3 Preparser
For A/V PES and program streams, the Preparser strips the packets of
headers and writes the headers and packet data payloads into separate
buffer areas in the off-chip SDRAM memory. The host writes the start
and end addresses of each of the buffer areas into registers. The internal
microcontroller transfers these addresses to the Buffer Controller. The
Buffer Controller maintains current read and write pointers for each buffer
area defined. When the Preparser strips an item out of the bitstream, the
microcontroller gets the current write pointer to the buffer area for that
item and writes the item into the buffer. The microcontroller also writes
the LSB of the item’s address pointer to the appropriate register. If the
host reads the LSB, the Buffer Controller writes the next pointer address
byte and the MSB to the register. The Buffer Controller and the host
registers used to program these buffer areas are explained in detail in
Section 6.4, “Channel Buffer Controller,” page 6-27
.
6.3.1 Host Selection of Streams and Headers
The host has control over which streams are preparsed and if headers
are stored. The register bits that define the preparse operation are
discussed here. It is assumed in the Preparser descriptions that follow
that the particular stream and header has been selected or enabled.
The host selects the video stream to be decoded by setting the Video
Stream Select Enable bits in Register 145 and entering a 4-bit Video
Stream ID in the same register (
page 4-35
). The Video Stream Select
Enable codes are listed in
Table 6.2
.
Table 6.2
Video Stream Select Enable Bits
Video Stream
Select Enable
Description
0b00
Discard all video packets
0b01
MPEG ID selected
0b10
All Video Stream IDs stored
0b11
Discard all video packets