Repository navigation
test(video): prove the VA-API decode, scale and encode path stays on GPU - #7618
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: a8695e9
No actionable bugs found. The hardware-only ladder test complements the existing independent-decoder pixel tests: it checks decode/resize residency, every rung’s GPU encode count, and decoded dimensions/frame counts without changing production APIs or wire behavior. Keeping these distinct tests is simpler than coupling residency coverage to a software codec.
Verification: static review of the test, Intel runner wiring, and relevant VAAPI selection, resize, encode and decoder-flush paths. No builds, tests or GPU checks run; the reported hardware results were not independently reproduced.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- VA-API hardware ladder proof (
rs/moq-video/src/encode/backend/vaapi.rs): new#[ignore]testvaapi_1080p_ladder_stays_on_the_gpucompiles without any software codec, encodes a 12-frame 1080p source on hardware, decodes it to DMA-BUFs, then VPP-scales and re-encodes each rung (720p/480p/360p), asserting DMA-BUF residency,gpu_frames == 12,refused.is_empty(), and decoded sizes/counts. - Intel hardware runner (
sh/rs/gpu.sh): the Intel branch now builds Nixlibva+intel-media-driverand runs the proof underLIBVA_DRIVER_NAME=iHD; the AMD branch prints its coverage notice and both share the final "Vulkan driver verified" echo. - Test inventory (
sh/gh/test-inventory.allow): registers the ignored test as an orphan owned by/quest/m2/video-vaapi.md, matching its module path. - Quest doc (
quest/m2/video-vaapi.md): records thatjust rs gpuruns the proof on Intel.
Traced the test against the backend and front end: a fresh VA-API encoder's first picture is an IDR, so the decoder's keyframe gate opens; VA-API encode/decode are synchronous one-in one-out, so the frame-count assertions hold; Surface::resize preserves the decoded BT.709 label and Vaapi::new accepts it at every rung; and gpu_frames/refused catch a CPU fallback. recipe rs::gpu is already a manual-runner orphan, so the new ignore entry is correctly required and the path matches encode::backend::vaapi::hardware_tests::.... No behavioral surface beyond the hardware runner.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Problem
Existing VA-API pixel tests enable OpenH264. They do not establish that a build with no software codec can decode a 1080p source, scale a ladder, and encode every frame without CPU transfers.
Approach
just rs gpuwith Nix libva and iHD paths. Missing hardware fails. Preserve the AMD coverage notice and register the hardware-CI gap against the existing VA-API quest.Impact
just rs gpuIntel hardware runner.Validation
Head
a8695e9fa62a846fe8cadb2e694372bec5ee1e56(d189454plus a conflict-free merge oforigin/mainat5553907, after moq-dev/moq#7091 landed), run ondesktopthroughquest gate:just ci(baseorigin/main): passed in 80 s wall time. Every selected module passed: check rs, test rs, markdown, gh (check and test), drill, quest, shell, large_files, toml, nix, justfile. Rust tests: 1454 run, 1454 passed, 58 skipped (ignored or filtered out by theciprofile), this ignored proof among them. Themoq-relayIowarning that failed the earlier run is gone.just rs gpu: passed. This host has an Intel Arrow Lake iGPU (8086:7d67, i915,renderD128) and an AMD dGPU (1002:7550, amdgpu,renderD129); no NVIDIA module is loaded, so the NVIDIA branch did not run.vulkan_gpu_deviceand the three render-export tests passed. The script prints that AMD VA-API encode and VPP are not covered.vulkan_gpu_deviceand the three render-export tests passed, and so didvaapi_1080p_ladder_stays_on_the_gpu(0.397 s, with Nix libva and iHD).MOQ_VAAPI_DEVICEwas unset. Auto-selection chose the Intel node, because withLIBVA_DRIVER_NAME=iHDforced the AMD node fails the encode/decode/VPP probe (rs/moq-video/src/frame/vaapi.rs).quest check --base origin/main: 551 documents ok.Earlier validation on
d189454:just fix,just rs check-test -p moq-video --no-default-features --features vaapi(133 passed, the proof ignored), and the explicit proof against both the Nix iHD 26.3.5 and the host's iHD 26.1.2.Reproduce the proof alone inside
nix develop:Alternatives
Enabling OpenH264 to reuse the pixel-test module would remove the build boundary this proof tests. Wiring every older optional hardware test into CI belongs to the existing GPU CI work.
Review
quest review --base origin/main --harness claude, Claude Code,claude-opus-5-5, medium effort, round 2, headd18945462bbd9dc5d7a7535288b4c8a7fa3366f6: no findings.Round 1: fixed the AMD coverage notice and both decoder-name assertions. Refuted broadening this hardware-only residency proof into independent pixel/conformance coverage. That coverage stays in the existing OpenH264-backed tests, and the new test now states its narrower contract.
That record covers head
a8695e9fa62a846fe8cadb2e694372bec5ee1e56: the only change since is a conflict-free merge oforigin/main.git diff origin/main...a8695e9matchesgit diff origin/main...d189454byte for byte except one blob index line, insh/gh/test-inventory.allow, where nearby context moved on main.Follow-ups
The existing VA-API quest retains the remaining codec/bindings work and hardware CI ownership. No new quest is created.
(Written by GPT-6.1 Sol; merge, validation, and review record updated by Claude Opus 5.5)