Files
reims-vgpu/docs/video
Anees Iqbal db84a87a85 🐛 Code frames a guest sends in coding order at their places
What changes for the guest: both Linux arms now answer
RGFX_VIDEO_ENCODE_CAP_REORDERED for H.264 and HEVC. A session whose
settings carry RGFX_VIDEO_ENCODE_REORDERED has each frame coded as it
comes, at its frame_index's place in display order. The arm makes a
frame an IDR picture at the stream's first frame, a forced keyframe, the
interval, or a place not past its IDR picture's. It makes a frame a
reference P picture where its place is past every place since its IDR
picture. Any other frame is a picture nothing predicts from: a B picture
between the references either side of it where the profile has B
slices, else a P picture. Each picture's order count is its place's
(twice it for H.264), and the SPS says one frame may come out of display
order, so a decoder shows the frames in their places. Before, every
frame was coded in the order it came, and the stream showed each frame
sent behind a later one after it.

The VA crate's encoder plans such frames with CodingOrder (gop.rs,
EncoderSettings::coding_order). NVENC's session plans them the same way
with its picture type decision off, and sets each picture's type, order
count and reference flag (EncodeParams::coding_order). Without the flag
nothing changes. The tests that held the caps answer (in place alone)
now expect the new flag too. Card tests cover both arms: on a radeonsi
XTX, 30 frames in AppleGVA's order (0 2 1 4 3 ...) decode back with
none out of order for H.264 Baseline, Main and High and HEVC Main and
Main 10, where development shows every pair swapped. On an RTX 3090
they cover H.264 High and HEVC, and HEVC coded again in place in coding
order.

NVENC codes H.264 Baseline at POC type 2, which cannot place such a
frame. No guest sends one, since Baseline has no B pictures; it is
docs/video/bugs.md B103. The VideoToolbox arm, which serves arm64
guests, answers no such cap and is unchanged.
2026-12-04 17:20:20 -08:00
..