diff --git a/Cargo.lock b/Cargo.lock index 310b4c59163..4ba4505dd2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5309,9 +5309,9 @@ dependencies = [ [[package]] name = "moq-vaapi" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a697143830ed57c5ce0e96016e845e0b097f607c536847c12890e3bd23ff4db9" +checksum = "fb08b9dab1b19b21fe0e909755a9c17601d6dcb0ced2b325fda0f0a8ba594cb8" dependencies = [ "anyhow", "bindgen 0.70.1", diff --git a/Cargo.toml b/Cargo.toml index f6ffa1c4660..2bee1f1413f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -169,7 +169,7 @@ moq-uring = { version = "0.0.12", path = "rs/moq-uring", default-features = fals moq-v4l = { version = "0.1.0", path = "rs/moq-v4l" } # Standalone crate (moq-dev/vaapi); vendored from cros-libva + cros-codecs. # dlopen's libva at runtime (no libva-dev at build, no NEEDED libva in the binary). -moq-vaapi = "0.1.0" +moq-vaapi = "0.1.1" # `default-features = false` is here for `capture` (V4L2, libclang), which the # cross-compiled Python, Swift, Kotlin, and Go builds have no use for: adding # `features = ["capture"]` to a consumer that ships in those bindings pulls the diff --git a/quest/m1/vendor-sync/README.md b/quest/m1/vendor-sync/README.md index 3d40c771706..51bf2c1564d 100644 --- a/quest/m1/vendor-sync/README.md +++ b/quest/m1/vendor-sync/README.md @@ -56,10 +56,19 @@ kixelated/cros-codecs, kixelated/openh264-rs, kixelated/fflate) and the Public API: none expected; a ported fix that changes one says so. Wire: QUIC behavior follows quinn's fixes. +VAAPI's completed cycle adopted crates.io `moq-vaapi 0.1.1` after +[the source fix](https://github.com/moq-dev/vaapi/pull/5) and +[read-only CI](https://github.com/moq-dev/vaapi/pull/6) merged. When re-creating +the next cycle, always include moq-dev/vaapi even though it is a crates.io +dependency outside this tree. Restore its Goal of auditing both ChromeOS +upstreams and publishing/adopting any needed fixes. Carry checked heads and +dispositions from [VAAPI's Upstream audit](https://github.com/moq-dev/vaapi/blob/v0.1.1/README.md#upstream), +which records cros-libva `59384456ac2ae78c0c3e5515f41ef1efd9b802cf` and +cros-codecs `a050c6cde530e563197ee9e3e72ab01f48a0c41f`. + ## Required - [UniFFI generator forks are current](/quest/m1/vendor-sync/uniffi.md) - the generator forks carry upstream's fixes until rust2 replaces them -- [moq-vaapi has every cros-codecs fix it needs](/quest/m1/vendor-sync/vaapi.md) - cros-libva and cros-codecs fixes reach moq-dev/vaapi ## Related diff --git a/quest/m1/vendor-sync/vaapi.md b/quest/m1/vendor-sync/vaapi.md deleted file mode 100644 index bcc994d158f..00000000000 --- a/quest/m1/vendor-sync/vaapi.md +++ /dev/null @@ -1,63 +0,0 @@ -# [XS] moq-vaapi has every cros-codecs fix it needs - -## Goal - -[moq-dev/vaapi](https://github.com/moq-dev/vaapi) carries every fix that -[chromeos/cros-libva](https://github.com/chromeos/cros-libva) and -[chromeos/cros-codecs](https://github.com/chromeos/cros-codecs) have landed -since the last check, for the code it vendors, each ported with its test or -recorded as not applying, and released to crates.io if anything changed, with -moq's `moq-vaapi` dependency bumped to that release. - -## Plan - -Recurring child of the [vendor sync](/quest/m1/vendor-sync/README.md), which -says how each run works and recurs. moq-vaapi lives in its own repository and -ships from crates.io for build reasons. Carry these checked heads and -dispositions into the next cycle when the parent re-creates this child. - -moq-vaapi vendors Discord's forks: cros-libva tag `discord-0.0.13` -([`896a248e`](https://github.com/discord/cros-libva/commit/896a248e003caae7a7120812f7eaa423c93a920d), -2026-03-13) and cros-codecs tag `discord-0.0.5` -([`9cdecb19`](https://github.com/discord/cros-codecs/commit/9cdecb192ee3682950d02bd80a7f106163531b76), -2026-06-15). Track the ChromeOS default branches against these diverged fork -baselines, without undoing Discord's additions. - -Checked 2026-10-31: - -- cros-libva - [`59384456ac2ae78c0c3e5515f41ef1efd9b802cf`](https://github.com/chromeos/cros-libva/commit/59384456ac2ae78c0c3e5515f41ef1efd9b802cf): - all five commits absent from the vendor baseline inspected. Explicit image - lifetimes and packed headers are already present. The retained VP9 wrapper - already zero-fills the libva 2.23 fields with `..Default::default()`; there - is no VP9 codec driver needing segmentation control. Protected-content - headers have no consumer. Borrowed input buffers are an optional optimization, - not a correctness fix; retain the existing owned-buffer API. -- cros-codecs - [`a050c6cde530e563197ee9e3e72ab01f48a0c41f`](https://github.com/chromeos/cros-codecs/commit/a050c6cde530e563197ee9e3e72ab01f48a0c41f): - the only commit absent from the vendor baseline removes - `log/release_max_level_debug`, which conflicts with a downstream application's - release log level. Ported in - [`6d38f3d0`](https://github.com/moq-dev/vaapi/commit/6d38f3d02e2709962789ad73698a27b548fd582e), - with a feature-unification compilation check in `just ci`. That check failed - before the fix and passes after it. VA-API's README records every disposition - and both full checked heads. -- GitHub's published advisory endpoints for both ChromeOS repositories and - both Discord forks returned empty lists, as did the global Rust advisory - queries for `cros-libva` and `cros-codecs`. This does not cover undisclosed - vulnerabilities. - -Remaining this cycle: merge the ported fix, -[moq-dev/vaapi#5](https://github.com/moq-dev/vaapi/pull/5), publish a new -`moq-vaapi` release to crates.io, then bump moq's workspace `moq-vaapi = "0.1.0"` -and lockfile to it and run the affected checks. Public API and wire formats are -unchanged; applications regain control of their release log level. - -CI, added 2026-11-01 (maintainer, follow-up planning after the 2026-11-01 -/quest-afk run): moq-dev/vaapi's only workflow, `.github/workflows/check.yml`, -sets `id-token: write` at the workflow level and runs on `pull_request`, so -every PR's check job can mint an OIDC token without a protected environment. -CI on pull requests must stay read-only. Remove it, leaving -`contents: read`; if a step needs OIDC (`magic-nix-cache-action` is the likely one), confirm -it still works without it, and otherwise move that step to a job limited to -`main` behind a protected environment. diff --git a/quest/m2/video-vaapi.md b/quest/m2/video-vaapi.md index 80e88f6adb9..9420f1d99d0 100644 --- a/quest/m2/video-vaapi.md +++ b/quest/m2/video-vaapi.md @@ -11,12 +11,12 @@ surfaces. Decided in the 2026-09-30 audit: moved from m4, and the "gated on a `moq-dev/vaapi` release" blocker is gone. That crate is our own repo (last -release 0.1.0 on 2026-09-24), so this quest includes the crate work (HEVC +release 0.1.1 on 2026-11-04), so this quest includes the crate work (HEVC encode, H.265 decode, pre-generated bindings, the resize pool) and cutting the release, then bumping the workspace requirement here. The resize-pool quest folds in for the same reason. -**Decode.** The H.264 decoder landed (`decode/backend/vaapi.rs`; the workspace pins moq-vaapi 0.1.0), +**Decode.** The H.264 decoder landed (`decode/backend/vaapi.rs`; the workspace pins moq-vaapi 0.1.1), with the default `decode::Config::output` of `Output::Native` handing out DMA-BUF surfaces the renderer imports without a download. H.265 decode is still missing, so a Linux box without NVDEC has no hardware path for it. @@ -30,7 +30,7 @@ Intel Meteor Lake. `just rs gpu` also runs the ignored VPP to 720p/480p/360p, GPU encode of every frame, and decoded output sizes and counts. What is left is H.265, below. -**H.265.** The VAAPI backend advertises H.264 only. `moq-vaapi` 0.1.0 vendors +**H.265.** The VAAPI backend advertises H.264 only. `moq-vaapi` 0.1.1 vendors the HEVC buffer types (`src/buffer/hevc.rs`) but its `Encoder` is hardcoded to `VAProfileH264Main` (with `VAEntrypointEncSlice`, or the low-power entrypoint where that is all a device has), so exposing an HEVC encoder is a diff --git a/quest/m3/obs-linux-gpu.md b/quest/m3/obs-linux-gpu.md index 88d88b6f4fd..3e36215094b 100644 --- a/quest/m3/obs-linux-gpu.md +++ b/quest/m3/obs-linux-gpu.md @@ -10,7 +10,7 @@ In m3 until the OBS encoder ships and a Linux user reports CPU readback as the bottleneck. - Start with an API feasibility probe. OBS exposes DMA-BUF import in `graphics.h`; that is not proof its compositor textures can be exported. Determine whether EGL/GL allocation export is available, or whether an upstream OBS hook or an encoder-owned exportable render target is required. -- moq-video encodes a `Surface::DmaBuf` on VAAPI without a download, and scales one through VPP (moq-vaapi 0.1.0). This quest still has to turn an OBS compositor texture into a DMA-BUF that import accepts. +- moq-video encodes a `Surface::DmaBuf` on VAAPI without a download, and scales one through VPP (moq-vaapi 0.1.1). This quest still has to turn an OBS compositor texture into a DMA-BUF that import accepts. - Negotiate DRM device, fourcc, plane offsets/strides, modifiers, and synchronization. Reuse `Surface::DmaBuf` and the hardware encoder's real import path, retaining allocation ownership until completion. A borrowed fd or an importable packed RGB texture does not prove the encoder accepts NV12 on the same device. - Prefer direct import; otherwise GPU-convert into exportable NV12 surfaces. Document and measure each GPU copy. Keep CPU staging as a visible fallback, not as the successful accelerated result. - Validate at least one Intel/AMD VAAPI path on hardware before promising broad support. Scope NVIDIA/CUDA interoperability separately if it needs another allocation or synchronization strategy. Test unsupported modifiers, multi-plane buffers, fd closure, cancellation, device loss, resize, and repeated pool reuse. @@ -24,4 +24,4 @@ the bottleneck. - [Video hardware validation](/quest/m3/video-hardware.md) - native input and encoder acceptance need hardware evidence - [VA-API encodes an external Vulkan image](/quest/m2/vaapi-vulkan-import.md) - explicit sync for an external DMA-BUF, and the public `DmaBuf` constructor from #4975 -- [VAAPI encode and decode](/quest/m2/video-vaapi.md) - H.265 and checked-in bindings. The DMA-BUF encoder import this quest needs is already on main (moq-vaapi 0.1.0). +- [VAAPI encode and decode](/quest/m2/video-vaapi.md) - H.265 and checked-in bindings. The DMA-BUF encoder import this quest needs is already on main (moq-vaapi 0.1.1). diff --git a/rs/workspace-hack/Cargo.toml b/rs/workspace-hack/Cargo.toml index 7eed8186016..a6cdb00fccd 100644 --- a/rs/workspace-hack/Cargo.toml +++ b/rs/workspace-hack/Cargo.toml @@ -328,7 +328,6 @@ itertools = { version = "0.13" } libc = { version = "0.2", features = ["extra_traits"] } libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } -log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } nix = { version = "0.31", features = ["net", "uio"] } nom-15128469a54ed75a = { package = "nom", version = "7" } pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } @@ -364,7 +363,6 @@ itertools = { version = "0.13" } libc = { version = "0.2", features = ["extra_traits"] } libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } -log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } nix = { version = "0.31", features = ["net", "uio"] } nom-15128469a54ed75a = { package = "nom", version = "7" } pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } @@ -432,7 +430,6 @@ itertools = { version = "0.13" } libc = { version = "0.2", features = ["extra_traits"] } libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } -log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } nix = { version = "0.31", features = ["net", "uio"] } nom-15128469a54ed75a = { package = "nom", version = "7" } pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } @@ -468,7 +465,6 @@ itertools = { version = "0.13" } libc = { version = "0.2", features = ["extra_traits"] } libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } -log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } nix = { version = "0.31", features = ["net", "uio"] } nom-15128469a54ed75a = { package = "nom", version = "7" } pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] }