
NXP Semiconductors
PNX15xx/952x Series
Volume 1 of 1
Chapter 21: MPEG-1 and MPEG-2 Variable Length Decoder
PNX15XX_PNX952X_SER_N_4
NXP B.V. 2007. All rights reserved.
Product data sheet
Rev. 4.0 — 03 December 2007
21-656
The CPU must wait for the VLD to halt before the next command can be issued. Note
that there are several ways in which a command may complete. Only a successful
completion is indicated by the command done bit in the status register. A command
may complete unsuccessfully if a start code or an error is encountered before the
Table 4: VLD Commands
Code Command
Flags Set
(after completion
of the command)
Description
0x1
Shift the bitstream
by ‘‘count’’ bits
Command Done
VLD shifts the number of bits in its internal shift register. The shift register
value is available in the VLD_SR register.
The ag is reset by issuing the new command.
0x2
Parse for a given
number of
macroblocks
Command Done
and/or Start Code
Detected
VLD parses for a given number of macroblocks; however, if VLD
encounters a start code, the parsing action will be terminated and VLD sets
only the start code detected ag. If VLD parses the given number of
macroblocks without encountering a start code, VLD will set the command
done ag.
The start code detected ag is reset by writing a ‘1’ value to the ag.
The command done ag is reset by issuing the new command
0x3
Search for the next
start code
Start Code
Detected and
Command Done
VLD search for a start code. The search code has 0x000001 prex and
additional 8-bit value; a 32-bit value with 0x000001 prex.
the start code detected ag is reset by writing a ‘1’ value to the ag.
The command done ag is reset by issuing the new command
0x4
Reset the Variable
Length Decoder
Command Done
0x5
Initialize the VLD
None
The bit count register is initialized to zero. The initialization action is
immediate without any delay.
0x6
Search for the
given start code
Start Code
Detected and
Command Done
VLD search for a start code with a given 8-bit lsb of the 32-bit start code.
The search code has 0x000001 prex and the additional 8-bit value is
given in the ‘count’ eld of the VLD_COMMAND register.
The start code detected ag is reset by writing a ‘1’ value to the ag.
The command done ag is reset by issuing the new command
0x7
Parse one row of
macroblocks
Start Code
Detected
This command instructs the VLD to parse one complete row of
macroblocks. If the row contains more than one slice, VLD parses the
intermediate slice headers without CPU intervention, provided these slice
headers have a 0 bit after the 5-bit quantizer_scale_code. If the VLD
encounters a start code different from the start code of the current slice, or
if the slice header has a 1 bit after the quantizer_scale_code, it sets the
Start-Code-Detected ag and ends the operation.
WARNING: The ‘Count’ eld of the VLD_COMMAND register is still in
effect as in the ‘Parse A Number Of Macroblocks’ Command: VLD stops
and sets the Command-Done ag after ‘Count’ macroblock headers are
parsed. ‘Count’ must be set to at least mb_width (number of macroblocks
per row in the picture) to guarantee the entire row is parsed before the VLD
stops.
0x8
Flush Write FIFOs Command Done
The VLD ushed the remaining macroblock header data and the remaining
run-level data to the main memory.
0x9
Parse Long
Command Done
This command instructs the VLD to parse and to continue as long as the
next start code ID is for the next slice. Any other start code ID will cause
the VLD to stop and interrupt with the ‘Command Done’ status bit set.
Note the count eld cannot be programmed to 0.