Files
reims-vgpu/docs
Anees Iqbal 156596754e 🐛 Feed AppleGVA's rate control the access unit's bits
An H.264 stream the guest encoded on the host came out at about 83% of the
average bitrate asked: 6.6 Mbit/s for 8 Mbit/s at 1080p, 25.9 for 30 at 2160p.
AppleGVA's rate control reads a word of the length record the driver fills,
at +0x3c, whose name nothing states; the driver wrote only the access unit's
length in bits at +0x6c, so with 0 there AppleGVA kept one QP a session.

The driver now writes the access unit's bits at +0x3c too. What the guest
sees: AppleGVA moves its QP each frame toward the session's average bitrate,
as on an AMD Mac. On a macOS 26.7.2 guest on an Iris Xe host (m3-max-37343):

  asked                    came out   per second over 10 s
  8 Mbit/s 1080p, 120 f    8.42
  4 Mbit/s 1080p, 120 f    4.22
  6 Mbit/s 1080p, 300 f    6.17       7.11, then 5.87 to 6.25
  30 Mbit/s 2160p, 300 f   30.44      35.37, then 29.07 to 30.24

A Radeon Pro 5300M Mac's streams came out at 100% to 104% of the asked. Of
each word from +0x04 to +0x68 written alone, only +0x3c moved the QP; of the
values tried there (the bits, the bytes, the QP, 1), the bits came closest to
the asked bitrate (m3-max-36997, m3-max-37146).

The driver's checks gain +0x3c's bits on a published frame and 0 on a failed
one.
2026-11-16 12:10:32 -08:00
..
2026-11-15 15:16:04 -08:00