Skip to content

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

  1. Vorbis out-of-band headers. vorbispcm_set_headers_csd accepts the three header packets as csd-0..2 in any Android layout (Xiph bundle / identification + setup / three packets); the comment header is synthesised when missing; a rejected header rolls back. movie.c reads 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=0 turns it off. movie.c was reformatted with clang-format (it was 54 lines off).
  2. /dev/nvdisp-disp0/1: portable nvdisp_* core (mode, vblank counter from a passed-in clock, WAIT_VBLANK that never repeats, vblank syncpoint 26/27, status) wired as DEV_DISP in nvdrv.c. The ioctl numbers are a proposed ABI (nothing public documents one).
  3. nvdrv rows: IPC_STUB 7 -> 1 (see the table in runtime-services.md); command 13 stays a stub on purpose.
  4. DecoderBackend contract frozen (ABI 1): configure / abi added, decoder_backend_install validates and returns int, full call-sequence/ownership/synchronous-output rules documented in decoder_backend.h. NVDEC hands H.264 SPS+PPS (found in the stream) and VP9 key-frame configs to configure() once per change; null backend implements it.
  5. 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) in Vp9Header, 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 in nvdrv_media_core.h); syncpoint ids 26/27 are those of older Tegra host1x sources.
  • decoder_backend_install now 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.