From d0ac1b73573769cb320b14f4a8996e6f9cace70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 10:49:53 +0300 Subject: [PATCH] ec-opus test: hybrid_fb LB-only run forces Full bandwidth. Root cause: wav16 is band-limited, so auto bandwidth detection (as libopus) drops most packets to SILK-WB/CELT-only; LB-only (CELT muted) then outputs silence for CELT-only packets -> corr 0.44 at lag 78. Library mute path (lib.rs:518-525) is correct: SILK is bit-identical in both runs. Forced FB keeps every packet hybrid (asserted config 15) --- crates/ec-opus/tests/conformance.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ec-opus/tests/conformance.rs b/crates/ec-opus/tests/conformance.rs index e5350108..e9a2b39b 100644 --- a/crates/ec-opus/tests/conformance.rs +++ b/crates/ec-opus/tests/conformance.rs @@ -2309,7 +2309,12 @@ fn hybrid_fb_roundtrip() { let toc = ec_opus::Toc::new(packets[0][0]); assert_eq!(toc.config, 15, "{name}: TOC config {}", toc.config); let (corr, lag) = aligned_corr(&pcm, &decoded, 400); - let (lb_only, _) = hybrid_roundtrip(&pcm, 32_000, None, (true, false)); + let (lb_only, lb_packets) = + hybrid_roundtrip(&pcm, 32_000, Some(Bandwidth::Full), (true, false)); + assert!( + lb_packets.iter().all(|p| ec_opus::Toc::new(p[0]).config == 15), + "{name}: forced-FB run left hybrid" + ); let lb_ref = lowpass(&pcm, 7000.0); let (lb_corr, lb_lag) = aligned_corr(&lb_ref, &lb_only, 400); let bytes: usize = packets.iter().map(Vec::len).sum();