An arm64 guest's VideoToolbox paravirtual decoders now take HEVC's range
extensions, 4:2:0, 4:2:2 and 4:4:4 at 8, 10 and 12 bits, wherever the host
arm's own query lists a decoder of the stream. Until now they took 4:4:4 at
8 bits alone and refused the rest at the session's start.
What changes for the guest:
- dsta and dsts take a range extensions stream where VA-API lists the
decoder of its profile with the render targets and surfaces it needs.
iHD on an Iris Xe lists all six profiles, but its Main 12 has P012 and
P016 surfaces alone, so 4:2:0 at 8 and 10 bits stays refused there.
- They also take it where NVDEC's caps list its chroma format, depth and
size: 4:2:0 and 4:4:4 on an RTX 3090.
- Where nothing lists the stream, the refusal stays as before and names
the stream and the arm's reason. radeonsi lists no decoder of them.
- Each picture lands in the format the guest's own software decoder gives
the stream, which Dpba names: 420v/x420/tv20, 422v/x422/tv22,
444v/x444/tv44 and their full-range forms.
- NVDEC's 4:2:2 is not built: the 3090 lists none, and those streams stay
refused there.
- The x86-64 caps are unchanged.
The codec takes the range extensions at 4:2:0, 4:2:2 and 4:4:4 and at 8,
10 and 12 bits, with their tools. It still refuses extended precision and
high precision weighted prediction offsets past 8 bits. Its CPU tests
decode streams of each chroma format and depth, and an SPS cut at every
length or with any bit flipped is refused or decoded whole, with no panic.
VA-API decodes on the stream's range extensions profile into P012, YUY2,
Y210, Y212, XYUV, Y410 or Y412 surfaces. The CPU splits the packed ones
into the guest's two planes; the GPU still splits XYUV where its import
check passed. NVDEC's 4:2:0 lands as Main 10's, and the CPU interleaves
its 10 and 12-bit 4:4:4 planes. Each picture the CPU converts is counted
as video-pictures-cpu-converted.
CoreVideo has no format with the layout of Y210, Y212, Y410 or Y412, and
the Mac's decoders answer 422v, not yuvs, for 4:2:2 at 8 bits, so the
conversions stay. Under TCG on the Iris Xe, hardware sessions took 0.36
to 0.66 s for 30 pictures at 1080p of every listed profile, against 1.88
to 5.32 s for the guest's software decode (docs/video/devices.md). The
conformance suite decodes x265's streams of every listed profile.