Files
reims-vgpu/docs
Anees Iqbal 4b8d51d09e 🆕 Decode VP9 on VA-API and NVDEC
The hosts' drivers list VP9 decode (radeonsi, iHD and NVDEC at profiles 0
and 2), and the owner's order is to offer the guest what the host lists. This
is the host's half: the decoders. Nothing offers them to a guest yet, so no
guest sees a change.

The codec module (codec/vp9) does on the host what VP9's hardware APIs leave
to the caller: it splits a superframe into its frames, reads each frame's
uncompressed header and keeps what persists between frames (the colour
configuration, the loop filter's deltas, the segmentation's features and the
eight reference slots), derives the quantizer scales and filter levels, and
hands each frame whole to an accelerator that decodes the compressed header
and the tiles. It refuses profiles 1 and 3 and 12 bits before anything
reaches a driver, and a frame that predicts from an empty slot is a picture's
error, after which a key frame decodes. Every field is checked against the
bytes before it is used: the CPU tests feed it truncated and hostile streams
and superframe indexes (the fuzz targets vp9-streams and vp9-samples).

VA-API's arm (vaapi::va::vp9) fills VADecPictureParameterBufferVP9 and the
slice parameters per frame, with a context per run of one format and size.
NVDEC's (nvidia::nvdec::vp9) fills CUVIDVP9PICPARAMS, whose bit-fields are
held in words of our own naming and checked against NVIDIA's header with the
rest of the layout. NVDEC makes a decoder at a frame's exact size, and a
frame that predicts from one of another decoder, a resized stream's, is
refused as a picture's error (bugs.md B96).

Two streams libvpx made from a synthetic source (640x360, profile 0 and
profile 2 at 10 bits, three superframes each) and vpxdec's per-frame MD5s
are committed; the ignored card tests decode them bit-exact on the RX 7900
XTX's radeonsi, the Iris Xe's iHD and the RTX 3090's NVDEC.
2026-11-27 14:57:30 -08:00
..
2026-11-27 14:57:30 -08:00