From d346e45619e48cd4d8f3bdb47ec09a775f786ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 16 Nov 2026 00:25:47 +0300 Subject: [PATCH] edith-sink: silence libva info lines (errors kept); ec-hw: docs no longer call working codecs unsupported --- crates/ec-hw/src/enc/mod.rs | 3 +-- crates/ec-hw/src/lib.rs | 7 +++---- tools/edith-sink/src/main.rs | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/crates/ec-hw/src/enc/mod.rs b/crates/ec-hw/src/enc/mod.rs index db1711ef..1a24c351 100644 --- a/crates/ec-hw/src/enc/mod.rs +++ b/crates/ec-hw/src/enc/mod.rs @@ -1,5 +1,4 @@ -//! Hardware encoding: H.264 (ported to cros-libva), HEVC and AV1 (refused -//! with [`Error::Unsupported`] until their parameter buffers are ported). +//! Hardware encoding: H.264, HEVC and AV1. //! //! The bitstream writers in [`headers`] are pure. The parameter buffers are //! built from cros-libva's typed constructors in each codec module. diff --git a/crates/ec-hw/src/lib.rs b/crates/ec-hw/src/lib.rs index 2bade39e..f1da9c67 100644 --- a/crates/ec-hw/src/lib.rs +++ b/crates/ec-hw/src/lib.rs @@ -35,10 +35,9 @@ //! //! * [`params`] — the codec parameter buffers, converted to cros-libva's typed //! buffers. -//! * [`dec`] — one stateless decoder per codec behind [`Decoder`]. H.264 is -//! ported; HEVC, VP9 and AV1 return [`Error::Unsupported`] for now. -//! * [`enc`] — H.264, HEVC and AV1 encoders. Not ported yet: they return -//! [`Error::Unsupported`]. +//! * [`dec`] — one stateless decoder per codec behind [`Decoder`]: H.264, +//! HEVC, VP9 and AV1. +//! * [`enc`] — H.264, HEVC and AV1 encoders: IDR + P GOPs, CQP/CBR/VBR/QVBR. //! * [`SurfacePool`] / [`Frame`] — surface recycling and pixel access. //! //! # Unsafe diff --git a/tools/edith-sink/src/main.rs b/tools/edith-sink/src/main.rs index 86934252..52c97f1c 100644 --- a/tools/edith-sink/src/main.rs +++ b/tools/edith-sink/src/main.rs @@ -340,7 +340,23 @@ fn run() -> Res { Ok(frames) } +fn quiet_libva() -> Option { + if std::env::var_os("LIBVA_MESSAGING_LEVEL").is_some() { + return None; + } + let exe = std::env::current_exe().ok()?; + let status = std::process::Command::new(exe) + .args(std::env::args_os().skip(1)) + .env("LIBVA_MESSAGING_LEVEL", "1") + .status() + .ok()?; + Some(ExitCode::from(u8::try_from(status.code().unwrap_or(1)).unwrap_or(1))) +} + fn main() -> ExitCode { + if let Some(code) = quiet_libva() { + return code; + } match run() { Ok(frames) => { eprintln!("edith-sink: {frames} frames");