Off-Host VLD Bitstream Decoding Operation
When variable-length decoding of raw bitstream data is performed on the accelerator, the data sent by the host for the decoding of the picture is divided into the following buffer types.
Provides information about how to perform inverse-quantization of the bitstream data.
Provides information about the location of start codes and data within a corresponding bitstream data buffer.
Contains raw streams of data encoded according to a particular video coding specification.
Inverse-Quantization Matrix Buffers
An inverse-quantization matrix buffer is sent to initialize inverse-quantization matrices for off-host bitstream decoding. Inverse-quantization matrix buffers provide information about how to decode all current and subsequent video in the bitstream, until a new inverse-quantization matrix buffer is provided. (Thus, inverse-quantization matrices are persistent.) No more than one inverse-quantization matrix buffer can be sent from the host to the accelerator at a time. The DXVA_QmatrixData structure loads quantization matrix data for compressed video-picture decoding.
Slice-control buffers guide the operation of off-host VLD bitstream processing. The host software decoder determines the location of slice-level resynchronization points in the bitstream. A slice is defined to be a multimacroblock layer that includes a resynchronization point in the bitstream data. In H.261 bitstreams, an H.261 Group Of Blocks (GOB) is considered a slice. In H.263 bitstreams, a sequence of one or more H.263 GOBs starting with a GOB start code and containing no additional GOB start codes is considered a slice. The slice-control buffer contains an array of DXVA_SliceInfo slice-control structures, which apply to the contents of a corresponding bitstream data buffer.
If a bitstream buffer is used, the buffer simply contains raw bytes from a video bitstream. This type of buffer is used for off-host decoding, including low-level bitstream parsing with variable-length decoding.
Certain restrictions are imposed on the contents of bitstream buffers, in order that the data received by accelerators is in a recognizable and efficient form.
Except for MPEG-1 and MPEG-2, the first bitstream buffer for each picture must start with all data, if any, following the end of all data for any prior picture that precedes the first slice for the current picture in the bitstream (for example, the sequence header or picture header).
For MPEG-1 and MPEG-2, the first bitstream buffer for each picture must start with the slice start code of the first slice of the picture (for example, no sequence header or picture header), because all relevant data is provided in other parameters.
If the start of a slice of bitstream data is located within a particular bitstream buffer, the end of that slice must also be located within that same buffer unless the buffer that contains the start of the slice has reached its allocated size.
The decoder should manage the filling of the bitstream buffers to avoid placing the data for one slice into more than one buffer.