From 7ffca32472ad84c5553cf1d0007234bb113361a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 13 Sep 2026 00:49:18 +0300 Subject: [PATCH] ec-vp8: restore shared avx2 probe after idct revert The revert of 4d6a9f27 also dropped lib.rs's avx2_supported(), which mc.rs's six-tap/bilinear kernels import since 79e13d22. --- crates/ec-vp8/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/ec-vp8/src/lib.rs b/crates/ec-vp8/src/lib.rs index 30756bf3..9523e116 100644 --- a/crates/ec-vp8/src/lib.rs +++ b/crates/ec-vp8/src/lib.rs @@ -48,6 +48,14 @@ pub(crate) fn trace_enabled() -> bool { } } +/// Cached AVX2 availability for the explicit-SIMD kernels (`mc`). +#[cfg(target_arch = "x86_64")] +pub(crate) fn avx2_supported() -> bool { + static AVX2: std::sync::LazyLock = + std::sync::LazyLock::new(|| std::arch::is_x86_feature_detected!("avx2")); + *AVX2 +} + /// Whether `EC_VP8_DEBUG` per-macroblock dumps are enabled (same shape as /// [`trace_enabled`]; the check sits in the per-MB reconstruct path). pub(crate) fn debug_enabled() -> bool {