📝 Document VP9 profiles 1 and 3 on arm64 guests [ci skip]
The host now takes VP9's profiles 1 and 3 and profile 2 at 12 bits where the driver decodes them. devices.md gets a section on which hosts take which, how the pictures land, the Iris Xe's boots and the 1080p rate; vaapi.md the surfaces, iHD's lists and its 4:2:2 failure, and the new streams' card runs; nvidia.md, backends.md and design.md drop the refusal of profiles 1 and 3 they stated; known-issues.md names the formats each tested GPU decodes.
This commit is contained in:
1 parent
6816f76f9a
commit
40dadf7f77
6 files changed
+94
-28
No files matched your search
@@ -1970,13 +1970,16 @@ Stages:
|
||||
each superframe by its index and decodes every frame, after checking
|
||||
each size against the bytes it holds (`reims_vgpu_video::codec::vp9`).
|
||||
`dsta` refuses with `kVTVideoDecoderUnsupportedDataFormatErr` a
|
||||
stream of profile 1 or 3, of 12 bits, or one the arm declines (a
|
||||
profile or size its driver lacks), and arm64 macOS then has no VP9
|
||||
decoder for it (devices.md, "Which hardware"). The guest's
|
||||
VideoToolbox, on macOS 14.6.1 as on 26.6.2, lists the decoder once a
|
||||
process registers VP9, and hands it every VP9 stream, a Profile 1
|
||||
stream too, which the host then refuses at `dsta` (measured under
|
||||
TCG, 2026-11-27, potluck jobs m3-max-77373 and m3-max-77382).
|
||||
stream the arm declines (a profile, chroma format, depth or size its
|
||||
driver lacks) and one of 4:4:0 or VP9's RGB colour space, and arm64
|
||||
macOS then has no VP9 decoder for it (devices.md, "Which hardware").
|
||||
The guest's VideoToolbox, on macOS 14.6.1 as on 26.6.2, lists the
|
||||
decoder once a process registers VP9, and hands it every VP9 stream,
|
||||
though `dcap` names profiles 0 and 2 alone (measured under TCG,
|
||||
2026-11-27, potluck jobs m3-max-77373 and m3-max-77382). So a host
|
||||
whose driver decodes profiles 1 and 3, or 12 bits, takes them with
|
||||
no change to the wire (devices.md, "VP9's profiles 1 and 3 on arm64
|
||||
guests").
|
||||
- **The host offers `VT_MESSAGES` where its arm lands decodes in the
|
||||
guest's surfaces**: on VA-API and on NVDEC, each where it decodes
|
||||
H.264 or HEVC. The arm64e kext publishes the service on macOS 14
|
||||
|
||||
@@ -86,10 +86,12 @@ or has no player for them at all:
|
||||
hardware by name before they hand a photo or a Motion JPEG video to a GPU. Our virtual
|
||||
machines have neither, so they decode JPEG in software. Our virtual GPU decodes JPEG when
|
||||
asked directly, but no app's route asks it.
|
||||
- **VP9 at 4:2:2 or 4:4:4, or at 12 bits, on arm64 guests.** On a Linux host whose GPU decodes
|
||||
VP9, arm64 guests decode it there at 4:2:0 in 8 and 10 bits. macOS hands the other VP9 formats
|
||||
to our virtual GPU too, but our virtual GPU doesn't take them yet, and arm64 macOS has no VP9
|
||||
decoding of its own, so the guest has no player for them.
|
||||
- **Some VP9 formats on arm64 guests.** arm64 guests decode VP9 on the host's GPU in the formats
|
||||
its driver decodes. On an Intel Iris Xe that's 4:2:0 at 8, 10 and 12 bits and 4:4:4 at 8, 10
|
||||
and 12 bits, but no 4:2:2. On the AMD and NVIDIA GPUs we tested it's 4:2:0 at 8 and 10 bits.
|
||||
arm64 macOS has no VP9 decoding of its own, so a stream in a format the host's GPU doesn't
|
||||
decode has no player in the guest. Our virtual GPU doesn't take two formats on any host: 4:4:0,
|
||||
and VP9's RGB colour space.
|
||||
- **MPEG-1, MPEG-2, MPEG-4 Part 2, VC-1 and VP8 decoding, and VP9 and AV1 encoding.** We found no
|
||||
way in macOS for a GPU to take these.
|
||||
|
||||
|
||||
@@ -107,8 +107,10 @@ ignored hardware tests ([nvidia.md](nvidia.md)).
|
||||
|
||||
x264, x265, kvazaar and ffmpeg are test oracles alone: they write the test streams and the
|
||||
reference MD5s under `build/`, and nothing they write is committed. VP9 has no such suite: the
|
||||
codec module's VP9 tests carry two streams of their own, committed (`src/codec/vp9/tests`:
|
||||
ffmpeg's `testsrc2` encoded by libvpx at 640x360, profile 0 and profile 2, 60 and 56 KB), with
|
||||
codec module's VP9 tests carry streams of their own, committed (`src/codec/vp9/tests`:
|
||||
ffmpeg's `testsrc2` encoded by libvpx at 640x360, profile 0 and profile 2, 60 and 56 KB; and at
|
||||
352x288, 20 frames in two passes, each with two superframes, profile 2 at 12 bits, profile 1 at
|
||||
4:2:2 and 4:4:4, and profile 3 at 4:2:2 and 4:4:4 at 10 and 12 bits, 385 KB in all), with
|
||||
vpxdec's MD5 of each frame, which ffmpeg's own VP9 decoder matched frame for frame; each arm's
|
||||
ignored VP9 tests decode them against those MD5s ([vaapi.md](vaapi.md), "The VP9 decoder";
|
||||
[nvidia.md](nvidia.md), "Tests"). Each script runs in a potluck
|
||||
|
||||
+47
-7
@@ -65,13 +65,15 @@ none reaches the host; after it a session decodes on the host. arm64 macOS 26.6.
|
||||
decoder of its own, and the M3's macOS 27.0.1 none in software: a session that allows no hardware
|
||||
fails −12906 before and after (**measured** under TCG on an RX 7900 XTX host, and on the M3,
|
||||
2026-11-27, potluck jobs m3-max-77263 and m3-max-77262). So a VP9 stream the host does not decode,
|
||||
a Profile 1 or 3 stream or one at 12 bits, or any VP9 on a host whose driver lists none, is not
|
||||
decoded in the guest at all. The guest's VideoToolbox does hand such a stream to the host's
|
||||
decoder, though its profiles name 0 and 2 alone: an 8-bit 4:4:4 Profile 1 stream's session reached
|
||||
the host, whose `dsta` refused it (−12910, `kVTVideoDecoderUnsupportedDataFormatErr`, whether the
|
||||
session required hardware or allowed it), and a session that allowed no hardware failed −12906
|
||||
(**measured** on the Iris Xe host, whose driver lists profiles 1 and 3, 2026-11-27, potluck job
|
||||
m3-max-77382). Each sample, a frame or a superframe whole, is split into its frames on the host,
|
||||
or any VP9 on a host whose driver lists none, is not decoded in the guest at all. The guest's
|
||||
VideoToolbox hands a stream of every profile to the host's decoder, though the caps' profiles
|
||||
name 0 and 2 alone: before the host took profiles 1 and 3, an 8-bit 4:4:4 Profile 1 stream's
|
||||
session reached the host, whose `dsta` refused it (−12910,
|
||||
`kVTVideoDecoderUnsupportedDataFormatErr`, whether the session required hardware or allowed it),
|
||||
and a session that allowed no hardware failed −12906 (**measured** on the Iris Xe host, 2026-11-27,
|
||||
potluck job m3-max-77382). The host takes profiles 1 and 3, and profile 2 at 12 bits, where its
|
||||
driver decodes them, and refuses the rest at `dsta` so ("VP9's profiles 1 and 3 on arm64 guests",
|
||||
below). Each sample, a frame or a superframe whole, is split into its frames on the host,
|
||||
which decodes them all and lands the one it shows. The guest's pictures of our two libvpx streams
|
||||
equal vpxdec's, frame by frame, by the IVF route (the probe's own `vpcC`) and the MP4 route
|
||||
(AVFoundation's), in sessions that require hardware: on an RX 7900 XTX (radeonsi), an Iris Xe
|
||||
@@ -576,3 +578,41 @@ medians of the three, in seconds for the 30 pictures:
|
||||
Every hardware run was faster than every software run of its stream (hardware 0.361 to 0.660 s,
|
||||
software 1.883 to 5.315 s), and the run counted 450 pictures converted by the CPU, the five CPU
|
||||
rows' 90 each.
|
||||
|
||||
## VP9's profiles 1 and 3 on arm64 guests
|
||||
|
||||
VP9's profile 1 (4:2:2 and 4:4:4 at 8 bits), profile 3 (the same at 10 and 12 bits) and profile 2
|
||||
at 12 bits reach the host by the paravirtual route as profiles 0 and 2 do. The caps entry still
|
||||
lists profiles 0 and 2 alone, and the device's wire is unchanged: the host's `dsta` decides from
|
||||
the arm's own answers (`declines_vp9` in `graphics/vaapi.rs` and `graphics/nvidia.rs`), naming
|
||||
the stream and the reason in its warning where it refuses. VA-API takes a stream where the
|
||||
driver's decoder of its profile (`VAProfileVP9Profile1` to `3`) makes the render targets and
|
||||
lists the surfaces of its chroma format and depth, the ones HEVC's range extensions decode into:
|
||||
P012 for 4:2:0 at 12 bits, YUY2, Y210 and Y212 for 4:2:2, XYUV, Y410 and Y412 for 4:4:4
|
||||
([vaapi.md](vaapi.md), "The VP9 decoder"). Its pictures land as the range extensions' pictures
|
||||
of the same chroma format and depth do (the table in "HEVC's range extensions on arm64 guests",
|
||||
above): `tv20`, `422v`, `x422`, `tv22`, `444v`, `x444` and `tv44`. NVDEC takes profile 0 and
|
||||
profile 2 at 10 bits alone ([nvidia.md](nvidia.md)). 4:4:0 and VP9's RGB colour space are the
|
||||
codec's own refusals on every host.
|
||||
|
||||
| host | taken | refused |
|
||||
|---|---|---|
|
||||
| Iris Xe, iHD 26.3.5 | profile 1 at 4:4:4; profile 2 at 12 bits; profile 3 at 4:4:4, 10 and 12 bits | 4:2:2 at every depth: the decoders of profiles 1 and 3 make 4:2:2 render targets but list no 4:2:2 surfaces, as `VA-API's VP9Profile1 decoder writes [AYUV, XYUV], not YUY2`, and fail a 4:2:2 frame's decode into any surface (vaapi.md) |
|
||||
| RX 7900 XTX and Radeon 780M, radeonsi | none | profiles 1 and 3: `VA-API: the driver has no VP9Profile1 decoder`; profile 2 at 12 bits: no YUV420_12 render targets |
|
||||
| RTX 3090, NVDEC | none | `NVDEC does not decode VP9 profile 1 at 8 bits, chroma_format_idc 3`, and so on |
|
||||
|
||||
The guest's pictures of our libvpx streams of the formats past profile 0 and profile 2 at 10 bits
|
||||
(`src/codec/vp9/tests` of the video crate: 352x288, 20 frames, two superframes each) equal
|
||||
vpxdec's frame by frame, by the IVF route and the MP4 route, in sessions that require hardware, on
|
||||
the Iris Xe under arm64 macOS 26.6.2 and 14.6.1 under TCG: profile 1 at 4:4:4 into `444v`,
|
||||
profile 2 at 12 bits into `tv20`, and profile 3 at 4:4:4 into `x444` and `tv44`. The session of
|
||||
each 4:2:2 stream failed −12910 at its create, and the profile 0 and 2 streams decoded as before
|
||||
(**measured** 2026-11-27, potluck jobs m3-max-77567 and m3-max-77606). A profile 1 4:4:4 stream at
|
||||
1920x1080 (60 frames, profile 0's stream's frames) decodes at 85% and 87% of profile 0's rate on
|
||||
the same card, its pictures split by the GPU from XYUV into `444v`'s two planes (3.4 ms a picture
|
||||
on average, from the driver's write to the pass's end). Measured with the guest's CPU emulated
|
||||
(TCG, 4 CPUs), in sessions that require hardware taking turns with profile 0's, in frames a
|
||||
second: under macOS 26.6.2 (m3-max-77567), 77.9 and 82.1 against profile 0's 99.5, 82.0 and
|
||||
94.6, and HEVC's 92.1; under 14.6.1 (m3-max-77606), 81.2 and 77.9 against 91.0, 93.5 and 88.8,
|
||||
and HEVC's 84.9. The percentages are the means of profile 1's runs against the medians of
|
||||
profile 0's.
|
||||
@@ -337,8 +337,11 @@ DPB names it follows NVIDIA's parser, measured on 2026-10-24:
|
||||
and NVDEC names references by their surfaces, so a frame of another
|
||||
size than the frames it predicts from (a resize between key frames,
|
||||
which VP9 allows) does not decode, nor do the frames after it until an
|
||||
intra frame fills the slots ([bugs.md](bugs.md), B96). VP9's profiles 1
|
||||
and 3 and 12 bits, as unsupported, before NVDEC sees a frame.
|
||||
intra frame fills the slots ([bugs.md](bugs.md), B96). VP9 past profile 0
|
||||
and profile 2 at 10 bits, 4:2:0 (profiles 1 and 3, and 12 bits), as
|
||||
unsupported, at the decoder's configure, before NVDEC sees a frame; the
|
||||
arm's `dsta` refuses such a stream at its start
|
||||
([devices.md](devices.md), "VP9's profiles 1 and 3 on arm64 guests").
|
||||
- An HEVC picture with more than 8 pictures in one of its current
|
||||
reference sets, as unsupported: `CUVIDHEVCPICPARAMS` holds 8 a set
|
||||
(`current_set`, `src/nvidia/nvdec/hevc.rs`, "NVDEC takes 8"). The caps answer 8 current references
|
||||
|
||||
+22
-6
@@ -1308,14 +1308,26 @@ them. The map's prediction probabilities go as 255 where its update is not tempo
|
||||
|
||||
### Surfaces and what it refuses
|
||||
|
||||
- Profile 0 decodes into NV12 (`VAProfileVP9Profile0`), profile 2 at 10 bits into P010
|
||||
(`VAProfileVP9Profile2`, `VA_RT_FORMAT_YUV420_10`), where the driver's VLD config lists the
|
||||
format and the frame's size (`Vp9Decoder::supports`, which answers the guest's stream at its
|
||||
session's start).
|
||||
- A frame decodes on the VA profile of its VP9 profile (`VAProfileVP9Profile0` to `3`) into
|
||||
surfaces of its chroma format and depth, the ones HEVC's range extensions decode into
|
||||
("Surfaces, formats and readback"): 4:2:0 into NV12, P010 and P012 at 8, 10 and 12 bits,
|
||||
4:2:2 into YUY2, Y210 and Y212, and 4:4:4 into XYUV, Y410 and Y412 (`vp9_decoder`). It does so
|
||||
where the driver's VLD config of the profile makes their render targets, lists the surfaces
|
||||
(`vaQuerySurfaceAttributes`) and takes the frame's size (`Vp9Decoder::supports`, which answers
|
||||
the guest's stream at its session's start).
|
||||
- iHD 26.3.5 on the Iris Xe lists AYUV and XYUV surfaces for profile 1, P010, P012 and P016 for
|
||||
profile 2, and Y410, Y412 and Y416 for profile 3, though its profile 1 and 3 decoders make
|
||||
4:2:2 render targets. It decodes no 4:2:2 VP9: forced into YUY2, Y210, Y212, Y216, XYUV, AYUV,
|
||||
Y410, Y412 or Y416 surfaces, a 4:2:2 frame's `vaEndPicture` fails. It decodes 12-bit 4:2:0
|
||||
into P012 and P016 alike, and 4:4:4 at 12 bits into Y412 and Y416 alike (**measured**, potluck
|
||||
job m3-max-77586, 2026-11-27; the table is `src/vaapi/va/vp9.rs`'s module doc).
|
||||
- A context is made for each run of frames of one format and size; a frame's references stay
|
||||
the surfaces of the frames its slots hold, of whichever context.
|
||||
- Refused with `Error::Vp9Bitstream(vp9::Error::Unsupported(..))`, before anything reaches the
|
||||
driver: profiles 1 and 3 (4:4:4, 4:2:2 and 4:4:0) and 12 bits. A frame that predicts from an
|
||||
driver: 4:4:0, VP9's RGB colour space (a frame's `color_space` 7, or `vpcC`'s matrix
|
||||
coefficients 0 in profile 1 or 3), a chroma format the profile does not code (4:2:0 in
|
||||
profile 1 or 3, any other in profile 0 or 2), and a depth it does not (profiles 0 and 1 code
|
||||
8 bits, profiles 2 and 3 code 10 and 12). A frame that predicts from an
|
||||
empty slot, as a stream started after its key frame does, is a picture's error, until a key
|
||||
frame fills the slots.
|
||||
- Malformed superframe indexes and headers are refused as bad data, with nothing taken from a
|
||||
@@ -1325,7 +1337,11 @@ them. The map's prediction probabilities go as 255 where its update is not tempo
|
||||
The tree's two libvpx streams (`src/codec/vp9/tests`: 640x360, profile 0 and profile 2, three
|
||||
superframes each with a hidden altref frame) decode frame by frame equal to vpxdec's MD5s
|
||||
(the ignored `vaapi::va::vp9` tests): on the RX 7900 XTX's radeonsi (potluck job m3-max-77352)
|
||||
and the Iris Xe's iHD (potluck job m3-max-77387), 2026-11-27.
|
||||
and the Iris Xe's iHD (potluck job m3-max-77387), 2026-11-27. Its seven streams of the other
|
||||
formats (352x288, 20 frames, two superframes each: profile 2 at 12 bits, profile 1 at 4:2:2 and
|
||||
4:4:4, profile 3 at 4:2:2 and 4:4:4 at 10 and 12 bits) decode the same way where the driver
|
||||
lists their decoder and surfaces: on the Iris Xe the 12-bit 4:2:0 one and the three 4:4:4 ones,
|
||||
and on the RX 7900 XTX none (potluck jobs m3-max-77605 and m3-max-77604, 2026-11-27).
|
||||
|
||||
## The encoders
|
||||
|
||||
|
||||
Reference in new issue
Block a user