Files
reims-vgpu/docs/video
Anees Iqbal 9497aa621d 🐎 Take a kept NVDEC decoder for a smaller 4:2:0 picture size
A kept NVDEC decoder now serves a new decoder of its codec, chroma format
and bit depth whose size is no larger on either side, with surfaces
enough, for 4:2:0 at 8 and 10 bits; other formats take a kept decoder of
their own size alone, as before (docs/video/bugs.md, D32). One of the
asked size is taken first, then the smallest larger one, so a larger one
stays for a larger stream. A taken decoder is reconfigured to the asked
size before its first decode where it was last set to another, and its
pictures decode into its larger surfaces at that size. Where that
reconfiguration fails, the kept decoder is destroyed and one is made.

What changes for the guest: a first video session of a new, smaller size,
after a larger session of its codec, format and depth whose decoder has
surfaces enough, no longer pays cuvidCreateDecoder, 43.3 ms of a 400x258
HEVC session's first decode call on an RTX 3090 (m3-max-83275). A kept
1920x1088 decoder taken for 400x264, its reconfiguration included, took
0.08-0.09 ms, against 18-25 ms for one made in the same process
(m3-max-83382). The pictures are the same: the hardware tests decode
H.264, HEVC Main and Main 10 streams of NVENC's, VP9 profile 0 and 2 and
the size-changing VP9 stream, and AV1 Main streams on a kept larger
decoder, each against its own MD5s (m3-max-83425). Left at the larger size
and reconfigured only to map, a 400x258 H.264 stream read back other
pictures (m3-max-83368), hence the reconfiguration at the take.

It does not reach the x86-64 macOS 26.7.2 guest's Quick Look thumbnail of
that 400x258 movie: its first session asks for 8 surfaces, and the one
larger decoder of its format kept by then, the wallpaper's 1024x1024 HEVC
at 8 bits, has 5 (m3-max-83451).
2026-12-03 04:56:42 -08:00
..