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)
Browse files at this commitd0ac1b73573769cb320b14f4a8996e6f9cace70bParent: 2dcf65f1 changed file +6 -1
crates/ec-opus/tests/conformance.rsmodified+6 -1
| @@ -2309,7 +2309,12 @@ fn hybrid_fb_roundtrip() { | |||
| 2309 | let toc = ec_opus::Toc::new(packets[0][0]); | 2309 | let toc = ec_opus::Toc::new(packets[0][0]); |
| 2310 | assert_eq!(toc.config, 15, "{name}: TOC config {}", toc.config); | 2310 | assert_eq!(toc.config, 15, "{name}: TOC config {}", toc.config); |
| 2311 | let (corr, lag) = aligned_corr(&pcm, &decoded, 400); | 2311 | let (corr, lag) = aligned_corr(&pcm, &decoded, 400); |
| 2312 | - let (lb_only, _) = hybrid_roundtrip(&pcm, 32_000, None, (true, false)); | 2312 | + let (lb_only, lb_packets) = |
| 2313 | + hybrid_roundtrip(&pcm, 32_000, Some(Bandwidth::Full), (true, false)); | ||
| 2314 | + assert!( | ||
| 2315 | + lb_packets.iter().all(|p| ec_opus::Toc::new(p[0]).config == 15), | ||
| 2316 | + "{name}: forced-FB run left hybrid" | ||
| 2317 | + ); | ||
| 2313 | let lb_ref = lowpass(&pcm, 7000.0); | 2318 | let lb_ref = lowpass(&pcm, 7000.0); |
| 2314 | let (lb_corr, lb_lag) = aligned_corr(&lb_ref, &lb_only, 400); | 2319 | let (lb_corr, lb_lag) = aligned_corr(&lb_ref, &lb_only, 400); |
| 2315 | let bytes: usize = packets.iter().map(Vec::len).sum(); | 2320 | let bytes: usize = packets.iter().map(Vec::len).sum(); |