media-nvdrv (2026-10-27, batch b3): Vorbis OOB headers, nvdisp-disp0, nvdrv rows, DecoderBackend ABI 1¶
Branch claude/media-nvdrv-2026-10-27 (Linux cloud session; base 06a0205 = origin/orchestrate/2026-10-27-b3). Tested on Linux, unbuilt on macOS, not verified with a real title.
Architecture: runtime-services.md, "media-nvdrv". Hand-off: integrators/claude-media-nvdrv-2026-10-27.md.
What changed¶
- Vorbis out-of-band headers.
vorbispcm_set_headers_csdaccepts the three header packets ascsd-0..2in any Android layout (Xiph bundle / identification + setup / three packets); the comment header is synthesised when missing; a rejected header rolls back.movie.creads the keys in Configure (find_csd, same FindBuffer symbols as the H.264 path) and the decoder is ready before the first packet. Vorbis is now on by default;NAPPLE_MOVIE_VORBIS=0turns it off.movie.cwas reformatted with clang-format (it was 54 lines off). /dev/nvdisp-disp0/1: portablenvdisp_*core (mode, vblank counter from a passed-in clock, WAIT_VBLANK that never repeats, vblank syncpoint 26/27, status) wired asDEV_DISPinnvdrv.c. The ioctl numbers are a proposed ABI (nothing public documents one).- nvdrv rows:
IPC_STUB7 -> 1 (see the table in runtime-services.md); command 13 stays a stub on purpose. - DecoderBackend contract frozen (ABI 1):
configure/abiadded,decoder_backend_installvalidates and returns int, full call-sequence/ownership/synchronous-output rules documented indecoder_backend.h. NVDEC hands H.264 SPS+PPS (found in the stream) and VP9 key-frame configs toconfigure()once per change; null backend implements it. - Codec headers for vt_h264:
h264_find_param_sets,h264_parse_avcc,h264_param_sets_annexb/avcc,h264_parse_pps, SPS/PPS writers (h264_build_sps/pps,h264_sps_fields_default), VP9 colour config (range, subsampling) inVp9Header,vp9_build_vpcc,vp9_level_for.vt_h264.[ch]untouched.
Tests (Linux gcc, also clean under ASAN+UBSAN)¶
| Test | Checks | New |
|---|---|---|
test_svc_movie_audio.c |
37 (was 21) | csd bundle / ident+setup / three packets / ident-only plus in-band rest, stereo, malformed bundle, setup without identification, no blobs |
test_svc_nvdrv_media.c |
115 (was 52) | nvdisp core + through the ioctl handler, command table depth, param-set finder / avcC round trip / truncation, SPS+PPS writer round trips (7 sizes, baseline interlaced, High 4:2:2 10-bit, PPS with extension), vpcC, configure hand-off (once per change, reset first, refusal stops decode, VP9, null backend), install validation |
Decisions¶
- Vorbis default flipped to on because the header path is now covered by a synthetic SDK-style container (headers only in the format, bare audio packets as inputs); the Mac check remains and is the one risk (see the integrator file).
- nvdisp ABI is invented but small and isolated (
NVDISP_*enums innvdrv_media_core.h); syncpoint ids 26/27 are those of older Tegra host1x sources. decoder_backend_installnow returns int (callers ignored the void before); the recording test backend needed.abi.- No SPS/PPS synthesis from the NVDEC picture-info struct: the layout is not documented offline; the writers are ready for it.