forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'lane-opus-silkq': 12k divergence diagnostics (r1/r2)

Browse files at this commit

3e24efa0a2f30be20d63a7ca0efe72cb9df81488Ahmet Kaan GümüşParent: 18042b376642da
crates/ec-opus/src/encoder.rsmodified+10 -0
@@ -257,6 +257,16 @@ impl Encoder {
257257 self.celt.last_diag()
258258 }
259259
260+ /// Per-frame SILK diagnostics from the last SILK-encoded frame (mono).
261+ /// Returns `None` if no mono SILK encoder has been initialised.
262+ pub fn last_silk_diag(&self) -> Option<&crate::silk_enc_write::SilkFrameDiag> {
263+ self.silk_mb
264+ .as_ref()
265+ .or(self.silk_wb.as_ref())
266+ .or(self.silk_nb.as_ref())
267+ .map(|s| s.last_diag())
268+ }
269+
260270 /// Drops all inter-frame state; the next packet starts like the first.
261271 pub fn reset(&mut self) {
262272 self.celt.reset();
crates/ec-opus/src/lib.rsmodified+2 -1
@@ -76,11 +76,12 @@ pub mod silk_enc_write;
7676 pub use celt::CeltDecoder;
7777 pub use celt_enc::CeltFrameDiag;
7878 pub use encoder::{Application, Encoder};
79+pub use silk_enc_write::SilkFrameDiag;
7980 pub use multistream::MultistreamDecoder;
8081 pub use multistream_enc::MultistreamEncoder;
8182 pub use packet::{Bandwidth, Mode, Packet, Toc};
8283 pub use range::{RangeDecoder, RangeEncoder};
83-pub use silk::SilkDecoder;
84+pub use silk::{SilkDecIndices, SilkDecoder};
8485 pub use silk_enc_write::{SilkEncoder, SilkStereoEncoder};
8586
8687 use ec_core::{Error, Result};
crates/ec-opus/src/silk.rsmodified+39 -0
@@ -245,6 +245,25 @@ struct Indices {
245245 seed: i32,
246246 }
247247
248+/// Public snapshot of per-frame SILK parameters as decoded from the
249+/// bitstream — used by the oracle diagnostic to compare our encoder's
250+/// packets against ffmpeg-libopus's.
251+#[derive(Clone, Debug, Default)]
252+pub struct SilkDecIndices {
253+ pub signal_type: i32,
254+ pub quant_offset_type: i32,
255+ pub gains: [i8; 4],
256+ pub nlsf: [i8; 17],
257+ pub nlsf_interp_coef_q2: i32,
258+ pub lag_index: i32,
259+ pub contour_index: i32,
260+ pub per_index: usize,
261+ pub ltp_index: [usize; 4],
262+ pub ltp_scale_index: usize,
263+ pub seed: i32,
264+ pub frames_decoded: usize,
265+}
266+
248267 /// Everything `decode_parameters` produces for one frame.
249268 #[derive(Clone, Debug)]
250269 struct FrameCtrl {
@@ -420,6 +439,26 @@ impl SilkDecoder {
420439 &ch.out_buf[..ch.ltp_mem_length]
421440 }
422441
442+ /// Snapshot of the last decoded frame's index parameters for channel 0.
443+ /// Used by the oracle diagnostic to inspect what the bitstream coded.
444+ pub fn last_indices(&self) -> SilkDecIndices {
445+ let ix = &self.channels[0].indices;
446+ SilkDecIndices {
447+ signal_type: ix.signal_type,
448+ quant_offset_type: ix.quant_offset_type,
449+ gains: ix.gains,
450+ nlsf: ix.nlsf,
451+ nlsf_interp_coef_q2: ix.nlsf_interp_coef_q2,
452+ lag_index: ix.lag_index,
453+ contour_index: ix.contour_index,
454+ per_index: ix.per_index,
455+ ltp_index: ix.ltp_index,
456+ ltp_scale_index: ix.ltp_scale_index,
457+ seed: ix.seed,
458+ frames_decoded: self.channels[0].frames_decoded,
459+ }
460+ }
461+
423462 /// Drops all inter-packet state.
424463 pub fn reset(&mut self) {
425464 let api_rate = self.api_rate;
crates/ec-opus/src/silk_enc.rsmodified+47 -5
@@ -556,7 +556,19 @@ fn ncc(frame: &[f32], lag: usize) -> f32 {
556556 /// Coarse (4 kHz-equivalent decimated) search followed by a fine search at
557557 /// full rate, then a per-subframe refinement and contour-table lookup
558558 /// against the decoder's own `CB_LAGS_*` tables (`silk.rs:157-176`).
559-pub(crate) fn estimate_pitch(frame: &[f32], fs_khz: i32, nb_subfr: usize) -> Option<PitchEstimate> {
559+/// Voiced decision: libopus silk_find_pitch_lags starts from 0.6 (minus speech-activity,
560+/// tilt and prev-type terms); value measured on real speech, lane opus-silkq r1.
561+// Sweep 2026-08-23 (reelm 12k SILK-WB, corr/err_ratio): .35 -> .8081/11.4,
562+// .45 -> .8127/26.3, .55 -> .8106/44.8, .65 -> .7987/12.3; err non-monotonic,
563+// threshold is not the 12k mechanism. Kept at .35.
564+const VOICED_THRESHOLD: f32 = 0.35;
565+
566+pub(crate) fn estimate_pitch(
567+ frame: &[f32],
568+ fs_khz: i32,
569+ nb_subfr: usize,
570+ prior_lag: Option<i32>,
571+) -> Option<PitchEstimate> {
560572 let min_lag = (PE_MIN_LAG_MS * fs_khz) as usize;
561573 let max_lag = (PE_MAX_LAG_MS * fs_khz) as usize;
562574 if frame.len() <= max_lag {
@@ -595,8 +607,38 @@ pub(crate) fn estimate_pitch(frame: &[f32], fs_khz: i32, nb_subfr: usize) -> Opt
595607 .find(|&(_, &s)| s >= 0.85 * fine_best)
596608 .map(|(lag, _)| lag)
597609 .unwrap_or(fine_lo);
598- let best_score = fine_best;
599- let voiced = best_score > 0.35;
610+ let mut best_score = fine_best;
611+
612+ // Pitch continuity (libopus `silk_P_estimation` reuses the prior frame's
613+ // lag as a prior). The open-loop search can octave-error onto an integer
614+ // multiple of the true period — seen as a 2-3.5x lag jump with LTP gain
615+ // pinned at its floor — cratering that second's corr. When a prior lag is
616+ // available and the open-loop result jumped away from it, re-search the
617+ // fine window around the prior lag and keep it if its NCC is comparable.
618+ // Measured harmful on real speech (reelm 12k SILK-WB: err_ratio 11.4 -> 26.2,
619+ // lane opus-silkq r1); kept off.
620+ const ENABLE_PITCH_CONTINUITY: bool = false;
621+ let mut best_lag = best_lag;
622+ if ENABLE_PITCH_CONTINUITY {
623+ if let Some(pl) = prior_lag {
624+ let pl = pl as usize;
625+ if pl >= min_lag && pl <= max_lag && best_lag.abs_diff(pl) > dec {
626+ let p_lo = pl.saturating_sub(dec).max(min_lag);
627+ let p_hi = (pl + dec).min(max_lag);
628+ let p_scores: Vec<f32> = (p_lo..=p_hi).map(|lag| ncc(frame, lag)).collect();
629+ let p_best = p_scores.iter().cloned().fold(f32::MIN, f32::max);
630+ if p_best >= 0.85 * best_score {
631+ best_lag = (p_lo..=p_hi)
632+ .zip(p_scores.iter())
633+ .find(|&(_, &s)| s >= 0.85 * p_best)
634+ .map(|(lag, _)| lag)
635+ .unwrap_or(pl);
636+ best_score = p_best;
637+ }
638+ }
639+ }
640+ }
641+ let voiced = best_score > VOICED_THRESHOLD;
600642 if !voiced {
601643 return Some(PitchEstimate {
602644 voiced: false,
@@ -905,7 +947,7 @@ mod tests {
905947 let (idx, win) = w;
906948 frame[idx + 1] = 0.25 * win[0] + 0.5 * win[1] + 0.25 * win[2];
907949 }
908- let est = estimate_pitch(&frame, 16, 4).expect("long enough frame");
950+ let est = estimate_pitch(&frame, 16, 4, None).expect("long enough frame");
909951 assert!(est.voiced, "pulse train should read as voiced");
910952 assert!(
911953 (est.lag as f32 - period).abs() <= 1.0,
@@ -920,7 +962,7 @@ mod tests {
920962 ((rng_state >> 8) as f32 / 8_388_608.0) - 1.0
921963 })
922964 .collect();
923- let est_noise = estimate_pitch(&noise, 16, 4).expect("long enough frame");
965+ let est_noise = estimate_pitch(&noise, 16, 4, None).expect("long enough frame");
924966 assert!(!est_noise.voiced, "white noise should read as unvoiced");
925967 }
926968
crates/ec-opus/src/silk_enc_write.rsmodified+51 -1
@@ -38,6 +38,21 @@ const LEVEL_ADJUST: f32 = 80.0 / 1024.0;
3838 /// with 16 such pulses in one block.
3939 const MAX_PULSE: i32 = 1023;
4040
41+/// Per-frame SILK diagnostics captured at the end of the last `encode_inner`
42+/// call, for the speech-quality diagnostic lane.
43+#[derive(Clone, Debug, Default)]
44+pub struct SilkFrameDiag {
45+ pub voiced: bool,
46+ pub signal_type: i32,
47+ pub gain_idx: [i8; MAX_NB_SUBFR],
48+ pub nb_subfr: usize,
49+ pub lag_index: i32,
50+ pub pitch_l: [i32; MAX_NB_SUBFR],
51+ pub nlsf_interp: i32,
52+ pub bytes: usize,
53+ pub ltp_gain: f32,
54+}
55+
4156 /// A mono, 10/20/40/60 ms, NB/MB/WB SILK encoder.
4257 #[derive(Clone, Debug)]
4358 pub struct SilkEncoder {
@@ -65,6 +80,8 @@ pub struct SilkEncoder {
6580 shape_d: Vec<f32>,
6681 shape_u: Vec<f32>,
6782 shape_gq: Vec<f32>,
83+ prev_pitch_lag: i32,
84+ last_diag: SilkFrameDiag,
6885 }
6986
7087 /// Noise-shaping constants: AR (denominator) and MA (numerator) bandwidth
@@ -130,6 +147,7 @@ impl SilkEncoder {
130147 final_range: 0,
131148 mirror_range: 0,
132149 voiced_frames: 0,
150+ prev_pitch_lag: 0,
133151 mirror_out: vec![0; 20 * 16],
134152 target_bps: None,
135153 reservoir: 0.0,
@@ -138,6 +156,7 @@ impl SilkEncoder {
138156 shape_d: vec![0.0; 20 * fs_khz],
139157 shape_u: vec![0.0; 20 * fs_khz],
140158 shape_gq: vec![0.0; 20 * fs_khz],
159+ last_diag: SilkFrameDiag::default(),
141160 }
142161 }
143162
@@ -152,6 +171,12 @@ impl SilkEncoder {
152171 self.voiced_frames
153172 }
154173
174+ /// Per-frame diagnostics captured at the end of the last `encode_inner`
175+ /// call.
176+ pub fn last_diag(&self) -> &SilkFrameDiag {
177+ &self.last_diag
178+ }
179+
155180 /// Target bit rate in bits per second; `None` (the default) codes pulses
156181 /// at unit excitation RMS with no rate loop.
157182 pub fn set_bitrate(&mut self, bps: u32) {
@@ -389,7 +414,13 @@ impl SilkEncoder {
389414 let res: Vec<f32> = (0..n as isize).map(whiten).collect();
390415
391416 // Pitch / LTP.
392- let pitch = estimate_pitch(&x, fs as i32, nb_subfr).filter(|p| p.voiced);
417+ let prior = if self.prev_pitch_lag > 0 { Some(self.prev_pitch_lag) } else { None };
418+ let pitch = estimate_pitch(&x, fs as i32, nb_subfr, prior).filter(|p| p.voiced);
419+ if let Some(p) = &pitch {
420+ self.prev_pitch_lag = p.lag;
421+ } else {
422+ self.prev_pitch_lag = 0;
423+ }
393424 let voiced = pitch.is_some();
394425
395426 let (lag_index, contour_index, pitch_l) = match &pitch {
@@ -657,6 +688,7 @@ impl SilkEncoder {
657688 voiced,
658689 ltp_scale_index,
659690 nq: nq.clone(),
691+ ltp_gain,
660692 seed_index,
661693 };
662694 let enc = &mut self.range;
@@ -741,6 +773,23 @@ impl SilkEncoder {
741773 self.shape_d.copy_from_slice(&best.run.d[n..]);
742774 self.shape_u.copy_from_slice(&best.run.u[n..]);
743775 self.shape_gq.copy_from_slice(&best.run.gq[n..]);
776+ self.last_diag = SilkFrameDiag {
777+ voiced: best.voiced,
778+ signal_type: best.signal_type,
779+ gain_idx: best.gain_idx,
780+ nb_subfr: best.nb_subfr,
781+ lag_index: best.lag_index,
782+ pitch_l: {
783+ let mut pl = [0i32; MAX_NB_SUBFR];
784+ for (i, &v) in pitch_l.iter().enumerate().take(best.nb_subfr) {
785+ pl[i] = v;
786+ }
787+ pl
788+ },
789+ nlsf_interp: best.nq.interp_index,
790+ bytes: best.bytes.len(),
791+ ltp_gain: best.ltp_gain,
792+ };
744793 Ok(best)
745794 }
746795 }
@@ -1030,6 +1079,7 @@ struct Trial {
10301079 voiced: bool,
10311080 ltp_scale_index: usize,
10321081 nq: NlsfQuant,
1082+ ltp_gain: f32,
10331083 seed_index: i32,
10341084 }
10351085
crates/ec-opus/tests/conformance.rsmodified+745 -0
@@ -3593,6 +3593,751 @@ fn silk_library_gate_vs_libopus() {
35933593 println!("wrote {}", sweep_path.display());
35943594 }
35953595
3596+// ---------------------------------------------------------------------------
3597+// Per-second SILK diagnostic: reelm@12k VoIP encoder decisions vs libopus.
3598+// Names the mechanism behind the 12k corr gap by per-second SILK frame facts.
3599+// Run:
3600+// cargo test -p ec-opus --release --test conformance silk_silkq_persecond_diag -- --ignored --nocapture
3601+// Writes lanes/opus-silkq-r1.seconds.txt.
3602+// ---------------------------------------------------------------------------
3603+
3604+#[test]
3605+#[ignore]
3606+fn silk_silkq_persecond_diag() {
3607+ const SECS: f64 = 120.0;
3608+ const FRAME: usize = 960; // 20 ms at 48 kHz
3609+ const CHANNELS: usize = 1; // MONO
3610+ const MAX_LAG: usize = 2000;
3611+ const KBPS: u32 = 12;
3612+
3613+ let src = shellexpand("~/Music/reelm.wav");
3614+ assert!(src.exists(), "source missing: {}", src.display());
3615+ let source_pcm = ffmpeg_decode_pcm_mono(&src, SECS);
3616+ let source_frames = source_pcm.len() / CHANNELS;
3617+ assert!(source_frames > 48_000, "source too short");
3618+ let seconds = source_frames as f64 / 48000.0;
3619+
3620+ let lanes_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes");
3621+ fs::create_dir_all(&lanes_dir).unwrap();
3622+ let ref_ogg = temp_path("opus-silkq-r1-ref.opus");
3623+
3624+ // Reference: ffmpeg libopus mono voip VBR at 12k; realised rate from size.
3625+ ffmpeg_encode_libopus_mono_voip(&src, KBPS, &ref_ogg, SECS);
3626+ let ref_bytes = fs::metadata(&ref_ogg).map(|m| m.len() as usize).unwrap_or(0);
3627+ let ref_kbps = ref_bytes as f64 * 8.0 / seconds / 1000.0;
3628+ let ref_dec = ffmpeg_decode(&ref_ogg, CHANNELS).expect("ffmpeg libopus decode of ref");
3629+ let ref_trim: Vec<f32> = ref_dec.into_iter().take(source_frames * CHANNELS).collect();
3630+ let (_, ref_aligned) = align_to_source(&source_pcm, &ref_trim, CHANNELS, MAX_LAG);
3631+ let ref_ogg_bytes = fs::read(&ref_ogg).expect("read ref ogg");
3632+ let ref_payload: Vec<usize> = ogg_packets(&ref_ogg_bytes)
3633+ .into_iter()
3634+ .skip(2) // skip opus_head + opus_comment
3635+ .filter(|p| !p.is_empty())
3636+ .map(|p| p.len())
3637+ .collect();
3638+ let _ = fs::remove_file(&ref_ogg);
3639+
3640+ // Ours: ec-opus Voip at the reference's realised rate, collecting per-frame
3641+ // SILK diag. Bitrate matches the gate (ref_kbps*1000 rounded).
3642+ let mut enc = Encoder::new(48000, CHANNELS, Application::Voip).expect("encoder");
3643+ enc.set_bitrate((ref_kbps * 1000.0).round() as u32);
3644+ enc.set_vbr_constrained(true);
3645+ let mut dec = Decoder::new(48000, CHANNELS).unwrap();
3646+ let mut out = vec![0u8; 1500];
3647+ let mut buf = vec![0.0f32; 5760 * CHANNELS];
3648+ let mut padded = Vec::new();
3649+ let mut ours_dec = Vec::new();
3650+ let mut diags: Vec<ec_opus::SilkFrameDiag> = Vec::new();
3651+ let mut ours_bytes: Vec<usize> = Vec::new();
3652+
3653+ for block in source_pcm.chunks(FRAME * CHANNELS) {
3654+ let block = if block.len() < FRAME * CHANNELS {
3655+ padded.clear();
3656+ padded.extend_from_slice(block);
3657+ padded.resize(FRAME * CHANNELS, 0.0);
3658+ &padded[..]
3659+ } else {
3660+ block
3661+ };
3662+ let len = enc.encode_float(block, FRAME, &mut out).expect("encode");
3663+ let d = enc.last_silk_diag().cloned();
3664+ ours_bytes.push(len);
3665+ if let Some(d) = d { diags.push(d); }
3666+ let n = dec.decode_float(&out[..len], &mut buf).expect("decode");
3667+ ours_dec.extend_from_slice(&buf[..n * CHANNELS]);
3668+ }
3669+ let ours_trim: Vec<f32> = ours_dec.into_iter().take(source_frames * CHANNELS).collect();
3670+ let (_, ours_aligned) = align_to_source(&source_pcm, &ours_trim, CHANNELS, MAX_LAG);
3671+
3672+ // Per-second correlation ours vs ref against the full-band source (matches
3673+ // the gate's corr_bl for the 12k auto-mode row: no lowpass).
3674+ let n_frames = source_frames
3675+ .min(ours_aligned.len() / CHANNELS)
3676+ .min(ref_aligned.len() / CHANNELS);
3677+ let sec_samples = 48000usize;
3678+ let frames_per_sec = sec_samples / FRAME; // 50
3679+
3680+ let mut sec_rows: Vec<(usize, f64, f64, f64)> = Vec::new(); // (sec, corr_o, corr_r, gap)
3681+ let mut start = 0usize;
3682+ let mut sec_idx = 0usize;
3683+ while start + sec_samples <= n_frames {
3684+ let (mut sxy_o, mut sxx_o, mut syy_o) = (0.0f64, 0.0f64, 0.0f64);
3685+ let (mut sxy_r, mut sxx_r, mut syy_r) = (0.0f64, 0.0f64, 0.0f64);
3686+ for i in 0..sec_samples {
3687+ let s = source_pcm[start + i] as f64;
3688+ let o = ours_aligned[start + i] as f64;
3689+ let r = ref_aligned[start + i] as f64;
3690+ sxy_o += s * o; sxx_o += s * s; syy_o += o * o;
3691+ sxy_r += s * r; sxx_r += s * s; syy_r += r * r;
3692+ }
3693+ let co = if sxx_o > 0.0 && syy_o > 0.0 { sxy_o / (sxx_o * syy_o).sqrt() } else { 0.0 };
3694+ let cr = if sxx_r > 0.0 && syy_r > 0.0 { sxy_r / (sxx_r * syy_r).sqrt() } else { 0.0 };
3695+ sec_rows.push((sec_idx, co, cr, cr - co));
3696+ start += sec_samples;
3697+ sec_idx += 1;
3698+ }
3699+
3700+ let mut sorted = sec_rows.clone();
3701+ sorted.sort_by(|a, b| b.3.partial_cmp(&a.3).unwrap());
3702+
3703+ let mut out_str = String::new();
3704+ out_str.push_str("# reelm@12k SILK per-second diagnostic (r1)\n");
3705+ out_str.push_str("# mono, 120s cap, 20ms frames, VBR constrained, 48kHz, Application::Voip\n");
3706+ out_str.push_str(&format!("# total frames: ours={} ref={}\n", diags.len(), ref_payload.len()));
3707+ let avg_o: f64 = sec_rows.iter().map(|r| r.1).sum::<f64>() / sec_rows.len().max(1) as f64;
3708+ let avg_r: f64 = sec_rows.iter().map(|r| r.2).sum::<f64>() / sec_rows.len().max(1) as f64;
3709+ let gap_avg = avg_r - avg_o;
3710+ out_str.push_str(&format!(
3711+ "# avg corr: ours={:.4} ref={:.4} gap={:+.4} ref_kbps={:.1} ours_kbps={:.1}\n\n",
3712+ avg_o, avg_r, gap_avg, ref_kbps,
3713+ ours_bytes.iter().map(|&b| b as f64).sum::<f64>() * 8.0 / seconds / 1000.0
3714+ ));
3715+
3716+ // Per-second summary table.
3717+ out_str.push_str("# sec\tcorr_o\tcorr_r\tgap\tgain_idx_mean\tvoiced_n\tnlsf_interp\tavg_B_o\tavg_B_r\tltp_gain_mean\tpitch_l_mean\n");
3718+ for &(s, co, cr, g) in &sec_rows {
3719+ let f0 = s * frames_per_sec;
3720+ let f1 = ((s + 1) * frames_per_sec).min(diags.len());
3721+ let sd = &diags[f0..f1.min(diags.len())];
3722+ let gain_mean: f64 = if !sd.is_empty() {
3723+ sd.iter().map(|d| d.gain_idx[0] as f64).sum::<f64>() / sd.len() as f64
3724+ } else { -1.0 };
3725+ let voiced_n = sd.iter().filter(|d| d.voiced).count();
3726+ let nlsf_int = if !sd.is_empty() {
3727+ sd.iter().map(|d| d.nlsf_interp).max().unwrap_or(0)
3728+ } else { 0 };
3729+ let avg_b_o: f64 = if !sd.is_empty() {
3730+ sd.iter().map(|d| d.bytes as f64).sum::<f64>() / sd.len() as f64
3731+ } else { 0.0 };
3732+ let ref_f0 = f0.min(ref_payload.len());
3733+ let ref_f1 = f1.min(ref_payload.len());
3734+ let avg_b_r: f64 = if ref_f1 > ref_f0 {
3735+ ref_payload[ref_f0..ref_f1].iter().map(|&b| b as f64).sum::<f64>()
3736+ / (ref_f1 - ref_f0) as f64
3737+ } else { 0.0 };
3738+ let ltp_mean: f64 = if !sd.is_empty() {
3739+ sd.iter().map(|d| d.ltp_gain as f64).sum::<f64>() / sd.len() as f64
3740+ } else { 0.0 };
3741+ let pitch_mean: f64 = if !sd.is_empty() {
3742+ sd.iter().filter(|d| d.voiced).map(|d| d.pitch_l[0] as f64).sum::<f64>()
3743+ / sd.iter().filter(|d| d.voiced).count().max(1) as f64
3744+ } else { 0.0 };
3745+ out_str.push_str(&format!(
3746+ "{}\t{:.4}\t{:.4}\t{:+.4}\t{:.1}\t{}\t{}\t{:.1}\t{:.1}\t{:.3}\t{:.1}\n",
3747+ s, co, cr, g, gain_mean, voiced_n, nlsf_int, avg_b_o, avg_b_r, ltp_mean, pitch_mean
3748+ ));
3749+ }
3750+
3751+ // Top 10 worst seconds by gap with per-frame SILK diag.
3752+ out_str.push_str("\n# --- 10 worst seconds by gap (per-frame SILK diag) ---\n");
3753+ out_str.push_str("# frame\tt_ms\tB_o\tB_r\tvoiced\tsig_type\tgain[0]\tlag_idx\tpitch_l\tnlsf_int\tltp_gain\tnb_subfr\n");
3754+ for &(s, _co, _cr, g) in sorted.iter().take(10) {
3755+ let f0 = s * frames_per_sec;
3756+ let f1 = ((s + 1) * frames_per_sec).min(diags.len());
3757+ out_str.push_str(&format!("# second {} gap={:+.4}\n", s, g));
3758+ for fi in f0..f1.min(diags.len()) {
3759+ let d = &diags[fi];
3760+ let b_ref = ref_payload.get(fi).copied().unwrap_or(0);
3761+ out_str.push_str(&format!(
3762+ "{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{:.3}\t{}\n",
3763+ fi, fi * 20, d.bytes, b_ref,
3764+ d.voiced as u8, d.signal_type, d.gain_idx[0], d.lag_index,
3765+ d.pitch_l[0], d.nlsf_interp, d.ltp_gain, d.nb_subfr
3766+ ));
3767+ }
3768+ out_str.push('\n');
3769+ }
3770+
3771+ // Global stats.
3772+ out_str.push_str("# --- global stats ---\n");
3773+ let voiced_count = diags.iter().filter(|d| d.voiced).count();
3774+ out_str.push_str(&format!("# voiced frames: {}/{}\n", voiced_count, diags.len()));
3775+ let gain_hist: Vec<(i8, usize)> = {
3776+ let mut h = std::collections::HashMap::new();
3777+ for d in &diags { *h.entry(d.gain_idx[0]).or_insert(0) += 1; }
3778+ let mut v: Vec<_> = h.into_iter().collect();
3779+ v.sort();
3780+ v
3781+ };
3782+ out_str.push_str(&format!("# gain_idx[0] histogram: {:?}\n", gain_hist));
3783+ let nlsf_hist: Vec<(i32, usize)> = {
3784+ let mut h = std::collections::HashMap::new();
3785+ for d in &diags { *h.entry(d.nlsf_interp).or_insert(0) += 1; }
3786+ let mut v: Vec<_> = h.into_iter().collect();
3787+ v.sort();
3788+ v
3789+ };
3790+ out_str.push_str(&format!("# nlsf_interp histogram: {:?}\n", nlsf_hist));
3791+ let avg_b_ours: f64 = diags.iter().map(|d| d.bytes as f64).sum::<f64>() / diags.len().max(1) as f64;
3792+ let avg_b_ref: f64 = ref_payload.iter().map(|&b| b as f64).sum::<f64>() / ref_payload.len().max(1) as f64;
3793+ out_str.push_str(&format!("# avg bytes/frame: ours={:.1} ref={:.1}\n", avg_b_ours, avg_b_ref));
3794+ let ltp_mean_all: f64 = diags.iter().map(|d| d.ltp_gain as f64).sum::<f64>() / diags.len().max(1) as f64;
3795+ out_str.push_str(&format!("# mean ltp_gain: {:.4}\n", ltp_mean_all));
3796+
3797+ let out_path = lanes_dir.join("opus-silkq-r1.seconds.txt");
3798+ fs::write(&out_path, out_str).unwrap();
3799+ println!("wrote {}", out_path.display());
3800+}
3801+
3802+// ---------------------------------------------------------------------------
3803+// ORACLE: decode both our packets and ffmpeg-libopus ref packets through our
3804+// own SilkDecoder, read back the per-frame `Indices`, and print side-by-side
3805+// for the worst seconds to name the divergence mechanism.
3806+// Run: SWEEP_ONLY=reelm cargo test -p ec-opus --release --test conformance \
3807+// silk_silkq_oracle -- --ignored --nocapture
3808+// ---------------------------------------------------------------------------
3809+#[test]
3810+#[ignore]
3811+fn silk_silkq_oracle() {
3812+ const SECS: f64 = 120.0;
3813+ const FRAME: usize = 960; // 20 ms at 48 kHz
3814+ const CHANNELS: usize = 1;
3815+ const KBPS: u32 = 12;
3816+ const TARGET_SECS: &[usize] = &[3, 39, 51, 5, 1];
3817+
3818+ let src = shellexpand("~/Music/reelm.wav");
3819+ assert!(src.exists(), "source missing: {}", src.display());
3820+ let source_pcm = ffmpeg_decode_pcm_mono(&src, SECS);
3821+
3822+ let lanes_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes");
3823+ fs::create_dir_all(&lanes_dir).unwrap();
3824+ let ref_ogg = temp_path("opus-silkq-oracle-ref.opus");
3825+
3826+ // Reference: ffmpeg libopus mono voip at 12k.
3827+ ffmpeg_encode_libopus_mono_voip(&src, KBPS, &ref_ogg, SECS);
3828+ let ref_ogg_bytes = fs::read(&ref_ogg).expect("read ref ogg");
3829+ let ref_packets: Vec<Vec<u8>> = ogg_packets(&ref_ogg_bytes)
3830+ .into_iter()
3831+ .skip(2)
3832+ .filter(|p| !p.is_empty())
3833+ .collect();
3834+ let _ = fs::remove_file(&ref_ogg);
3835+
3836+ // Ours: ec-opus Voip at 12k.
3837+ let mut enc = Encoder::new(48000, CHANNELS, Application::Voip).expect("encoder");
3838+ enc.set_bitrate(KBPS * 1000);
3839+ enc.set_vbr_constrained(true);
3840+ let mut out = vec![0u8; 1500];
3841+ let mut ours_packets: Vec<Vec<u8>> = Vec::new();
3842+ let mut padded = Vec::new();
3843+ for block in source_pcm.chunks(FRAME * CHANNELS) {
3844+ let block = if block.len() < FRAME * CHANNELS {
3845+ padded.clear();
3846+ padded.extend_from_slice(block);
3847+ padded.resize(FRAME * CHANNELS, 0.0);
3848+ &padded[..]
3849+ } else {
3850+ block
3851+ };
3852+ let len = enc.encode_float(block, FRAME, &mut out).expect("encode");
3853+ ours_packets.push(out[..len].to_vec());
3854+ }
3855+
3856+
3857+ let ours_ix = collect_indices(&ours_packets);
3858+ let ref_ix = collect_indices(&ref_packets);
3859+
3860+ eprintln!("ours frames: {} ref frames: {}", ours_ix.len(), ref_ix.len());
3861+
3862+ // Print side-by-side for target seconds (50 frames/sec at 20ms).
3863+ let frames_per_sec = 50usize;
3864+ let mut out_str = String::new();
3865+ out_str.push_str("# reelm@12k SILK oracle: ours vs ffmpeg-libopus indices (r1)\n");
3866+ out_str.push_str("# mono, 120s, 20ms frames, VBR constrained, 48kHz, Application::Voip\n");
3867+ out_str.push_str(&format!("# ours_frames={} ref_frames={}\n", ours_ix.len(), ref_ix.len()));
3868+ out_str.push_str("# sig: 0=unvoiced 2=voiced | per: LTP codebook | nlsf_i: 4=nointerp\n");
3869+ out_str.push_str("# gains/ltp are 4 subframe indices; lag/contour only for voiced\n\n");
3870+
3871+ for &sec in TARGET_SECS {
3872+ let start = sec * frames_per_sec;
3873+ let end = start + frames_per_sec;
3874+ out_str.push_str(&format!("=== second {} (frames {}–{}) ===\n", sec, start, end - 1));
3875+ out_str.push_str("frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes\n");
3876+ for f in start..end {
3877+ let ours = ours_ix.get(f);
3878+ let refr = ref_ix.get(f);
3879+ if ours.is_none() && refr.is_none() {
3880+ continue;
3881+ }
3882+ for (side, item) in [("O", ours), ("R", refr)] {
3883+ match item {
3884+ Some((ix, bytes)) => {
3885+ let voiced = ix.signal_type == 2;
3886+ let lag_str = if voiced {
3887+ format!("{:4}", ix.lag_index)
3888+ } else {
3889+ " -".to_string()
3890+ };
3891+ let cont_str = if voiced {
3892+ format!("{:4}", ix.contour_index)
3893+ } else {
3894+ " -".to_string()
3895+ };
3896+ let per_str = if voiced {
3897+ format!("{}", ix.per_index)
3898+ } else {
3899+ "-".to_string()
3900+ };
3901+ let ltp_str = if voiced {
3902+ format!("[{},{},{},{}]", ix.ltp_index[0], ix.ltp_index[1], ix.ltp_index[2], ix.ltp_index[3])
3903+ } else {
3904+ "[-,-,-,-]".to_string()
3905+ };
3906+ let ltpscl_str = if voiced {
3907+ format!("{}", ix.ltp_scale_index)
3908+ } else {
3909+ "-".to_string()
3910+ };
3911+ out_str.push_str(&format!(
3912+ "{:5} {} {:2} {:2} [{:2},{:2},{:2},{:2}] {:2} {} {} {} {} {} {:2} {:3}\n",
3913+ f, side, ix.signal_type, ix.quant_offset_type,
3914+ ix.gains[0], ix.gains[1], ix.gains[2], ix.gains[3],
3915+ ix.nlsf_interp_coef_q2,
3916+ lag_str, cont_str, per_str, ltp_str, ltpscl_str,
3917+ ix.seed, bytes,
3918+ ));
3919+ }
3920+ None => {
3921+ out_str.push_str(&format!("{:5} {} -- missing --\n", f, side));
3922+ }
3923+ }
3924+ }
3925+ }
3926+ out_str.push('\n');
3927+ }
3928+
3929+ // Summarize divergence statistics across ALL frames.
3930+ let n = ours_ix.len().min(ref_ix.len());
3931+ let mut sig_mismatch = 0;
3932+ let mut qoff_mismatch = 0;
3933+ let mut gain_diff_sum = 0i64;
3934+ let mut nlsf_interp_diff = 0;
3935+ let mut ltp_per_mismatch = 0;
3936+ let mut ltp_idx_diff_sum = 0i64;
3937+ let mut voiced_both = 0;
3938+ let mut lag_diff_sum = 0i64;
3939+ let mut bytes_ours = 0u64;
3940+ let mut bytes_ref = 0u64;
3941+ for i in 0..n {
3942+ let (o, ob) = &ours_ix[i];
3943+ let (r, rb) = &ref_ix[i];
3944+ if o.signal_type != r.signal_type { sig_mismatch += 1; }
3945+ if o.quant_offset_type != r.quant_offset_type { qoff_mismatch += 1; }
3946+ for k in 0..4 { gain_diff_sum += (o.gains[k] as i64 - r.gains[k] as i64).abs(); }
3947+ if o.nlsf_interp_coef_q2 != r.nlsf_interp_coef_q2 { nlsf_interp_diff += 1; }
3948+ if o.signal_type == 2 && r.signal_type == 2 {
3949+ voiced_both += 1;
3950+ if o.per_index != r.per_index { ltp_per_mismatch += 1; }
3951+ for k in 0..4 { ltp_idx_diff_sum += (o.ltp_index[k] as i64 - r.ltp_index[k] as i64).abs(); }
3952+ lag_diff_sum += (o.lag_index as i64 - r.lag_index as i64).abs();
3953+ }
3954+ bytes_ours += *ob as u64;
3955+ bytes_ref += *rb as u64;
3956+ }
3957+ out_str.push_str("=== divergence summary (all frames) ===\n");
3958+ out_str.push_str(&format!("frames compared: {}\n", n));
3959+ out_str.push_str(&format!("signal_type mismatch: {} ({:.1}%)\n", sig_mismatch, 100.0 * sig_mismatch as f64 / n as f64));
3960+ out_str.push_str(&format!("quant_offset mismatch: {} ({:.1}%)\n", qoff_mismatch, 100.0 * qoff_mismatch as f64 / n as f64));
3961+ out_str.push_str(&format!("avg |gain diff| per subframe: {:.2}\n", gain_diff_sum as f64 / (n as f64 * 4.0)));
3962+ out_str.push_str(&format!("nlsf_interp mismatch: {} ({:.1}%)\n", nlsf_interp_diff, 100.0 * nlsf_interp_diff as f64 / n as f64));
3963+ out_str.push_str(&format!("voiced_both: {}\n", voiced_both));
3964+ out_str.push_str(&format!(" LTP per_index mismatch: {} ({:.1}%)\n", ltp_per_mismatch, 100.0 * ltp_per_mismatch as f64 / voiced_both.max(1) as f64));
3965+ out_str.push_str(&format!(" avg |ltp_index diff| per subframe: {:.2}\n", ltp_idx_diff_sum as f64 / (voiced_both.max(1) as f64 * 4.0)));
3966+ out_str.push_str(&format!(" avg |lag diff|: {:.2}\n", lag_diff_sum as f64 / voiced_both.max(1) as f64));
3967+ out_str.push_str(&format!("total bytes: ours={} ref={} ratio={:.3}\n", bytes_ours, bytes_ref, bytes_ours as f64 / bytes_ref.max(1) as f64));
3968+
3969+ let out_path = lanes_dir.join("opus-silkq-r1.oracle.txt");
3970+ fs::write(&out_path, &out_str).unwrap();
3971+ println!("wrote {}", out_path.display());
3972+ print!("{}", out_str);
3973+}
3974+
3975+/// Decode a SILK stream packet-by-packet through a fresh `SilkDecoder`,
3976+/// snapshotting each frame's coded indices — the oracle diagnostic's view of
3977+/// what the bitstream actually coded (our encoder's packets and a reference
3978+/// encoder's alike).
3979+fn collect_indices(packets: &[Vec<u8>]) -> Vec<(ec_opus::SilkDecIndices, usize)> {
3980+ let mut silk = ec_opus::SilkDecoder::new(16000, 1);
3981+ let mut results = Vec::new();
3982+ let mut silk_pcm = vec![0i16; 320]; // 20ms at 16kHz
3983+ for pkt in packets {
3984+ if pkt.len() <= 1 {
3985+ continue; // DTX / empty
3986+ }
3987+ let parsed = match ec_opus::Packet::parse(pkt, false) {
3988+ Ok(p) => p,
3989+ Err(_) => continue,
3990+ };
3991+ let toc = parsed.toc;
3992+ let mode = toc.mode();
3993+ if mode == ec_opus::Mode::Celt {
3994+ continue;
3995+ }
3996+ let internal_rate = if mode == ec_opus::Mode::Hybrid {
3997+ 16000
3998+ } else {
3999+ match toc.bandwidth() {
4000+ ec_opus::Bandwidth::Narrow => 8000,
4001+ ec_opus::Bandwidth::Medium => 12000,
4002+ _ => 16000,
4003+ }
4004+ };
4005+ let payload_ms = (toc.frame_size_48k() / 48).max(10);
4006+ let mut first = true;
4007+ for frame_data in &parsed.frames {
4008+ if frame_data.len() <= 1 {
4009+ first = false;
4010+ continue;
4011+ }
4012+ let mut dec = ec_opus::RangeDecoder::new(frame_data);
4013+ let _ = silk.decode(
4014+ &mut dec,
4015+ &mut silk_pcm,
4016+ payload_ms,
4017+ internal_rate,
4018+ 1,
4019+ first,
4020+ );
4021+ let ix = silk.last_indices();
4022+ let bytes = frame_data.len();
4023+ results.push((ix, bytes));
4024+ first = false;
4025+ }
4026+ }
4027+ results
4028+}
4029+
4030+// ---------------------------------------------------------------------------
4031+// SILK 12k spectral divergence: WHERE the 12 kbps Voip err_ratio outlier
4032+// carries its error. Same machinery as spectral_divergence_vs_libopus, but
4033+// mono/Application::Voip/12 kbps on reelm.wav, both sides decoded through
4034+// ffmpeg libopus (gate symmetry), with the index oracle on the worst frames.
4035+// Run:
4036+// cargo test -p ec-opus --release --test conformance \
4037+// silk_spectral_divergence_12k -- --ignored --nocapture
4038+// Writes lanes/opus-silkq-r2.bands.txt.
4039+// ---------------------------------------------------------------------------
4040+
4041+#[test]
4042+#[ignore]
4043+fn silk_spectral_divergence_12k() {
4044+ const SECS: f64 = 120.0;
4045+ const FRAME: usize = 960; // 20 ms at 48 kHz
4046+ const CHANNELS: usize = 1;
4047+ const MAX_LAG: usize = 2000;
4048+ const KBPS: u32 = 12;
4049+
4050+ let src = shellexpand("~/Music/reelm.wav");
4051+ assert!(src.exists(), "source missing: {}", src.display());
4052+ let source_pcm = ffmpeg_decode_pcm_mono(&src, SECS);
4053+ let source_frames = source_pcm.len() / CHANNELS;
4054+ assert!(source_frames > 48_000, "source too short");
4055+ let seconds = source_frames as f64 / 48000.0;
4056+
4057+ let lanes_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes");
4058+ fs::create_dir_all(&lanes_dir).unwrap();
4059+ let ref_ogg = temp_path("opus-silkq-r2-ref.opus");
4060+ let ours_ogg = temp_path("opus-silkq-r2-ours.opus");
4061+
4062+ // Reference: ffmpeg libopus mono voip at 12k, decoded by ffmpeg libopus.
4063+ ffmpeg_encode_libopus_mono_voip(&src, KBPS, &ref_ogg, SECS);
4064+ let ref_bytes = fs::metadata(&ref_ogg).map(|m| m.len() as usize).unwrap_or(0);
4065+ let ref_kbps = ref_bytes as f64 * 8.0 / seconds / 1000.0;
4066+ let ref_dec = ffmpeg_decode(&ref_ogg, CHANNELS).expect("ffmpeg libopus decode of ref");
4067+ let ref_trim: Vec<f32> = ref_dec.into_iter().take(source_frames * CHANNELS).collect();
4068+ let (_, ref_aligned) = align_to_source(&source_pcm, &ref_trim, CHANNELS, MAX_LAG);
4069+ let ref_ogg_bytes = fs::read(&ref_ogg).expect("read ref ogg");
4070+ let ref_packets: Vec<Vec<u8>> = ogg_packets(&ref_ogg_bytes)
4071+ .into_iter()
4072+ .skip(2)
4073+ .filter(|p| !p.is_empty())
4074+ .collect();
4075+ let _ = fs::remove_file(&ref_ogg);
4076+
4077+ // Ours: ec-opus Voip at the reference's realised rate; our packets
4078+ // re-decoded through ffmpeg libopus so both sides cross the same decoder.
4079+ let mut enc = Encoder::new(48000, CHANNELS, Application::Voip).expect("encoder");
4080+ enc.set_bitrate((ref_kbps * 1000.0).round() as u32);
4081+ enc.set_vbr_constrained(true);
4082+ let pre_skip = enc.look_ahead(FRAME) as i64;
4083+ let mut out = vec![0u8; 1500];
4084+ let mut ours_packets: Vec<Vec<u8>> = Vec::new();
4085+ let mut padded = Vec::new();
4086+ for block in source_pcm.chunks(FRAME * CHANNELS) {
4087+ let block = if block.len() < FRAME * CHANNELS {
4088+ padded.clear();
4089+ padded.extend_from_slice(block);
4090+ padded.resize(FRAME * CHANNELS, 0.0);
4091+ &padded[..]
4092+ } else {
4093+ block
4094+ };
4095+ let len = enc.encode_float(block, FRAME, &mut out).expect("encode");
4096+ ours_packets.push(out[..len].to_vec());
4097+ }
4098+ write_ogg_opus(
4099+ &ours_ogg,
4100+ &ours_packets,
4101+ opus_head(CHANNELS, pre_skip as u16, None),
4102+ CHANNELS,
4103+ source_frames,
4104+ pre_skip,
4105+ );
4106+ let ours_bytes: usize = ours_packets.iter().map(|p| p.len()).sum();
4107+ let ours_kbps = ours_bytes as f64 * 8.0 / seconds / 1000.0;
4108+ let ours_dec = ffmpeg_decode(&ours_ogg, CHANNELS).expect("ffmpeg libopus decode of ours");
4109+ let _ = fs::remove_file(&ours_ogg);
4110+ let ours_trim: Vec<f32> = ours_dec.into_iter().take(source_frames * CHANNELS).collect();
4111+ let (_, ours_aligned) = align_to_source(&source_pcm, &ours_trim, CHANNELS, MAX_LAG);
4112+
4113+ // opus_compare totals, per-band eb², per-frame ef² — both vs the source.
4114+ let cmp_frames = source_frames
4115+ .min(ours_aligned.len() / CHANNELS)
4116+ .min(ref_aligned.len() / CHANNELS);
4117+ let take = |v: &[f32]| -> Vec<i16> { to_i16(&v[..cmp_frames * CHANNELS]) };
4118+ let s_i = take(&source_pcm);
4119+ let o_i = take(&ours_aligned);
4120+ let r_i = take(&ref_aligned);
4121+ let (err_o, eb2_o, ef2_o) = opus_compare_err_parts(&s_i, &o_i, CHANNELS);
4122+ let (err_r, eb2_r, ef2_r) = opus_compare_err_parts(&s_i, &r_i, CHANNELS);
4123+ let nframes = ef2_o.len();
4124+ assert_eq!(nframes, ef2_r.len(), "frame counts differ");
4125+
4126+ // Raw (unmasked) band energies: spectral shape + dominant-band lookup.
4127+ let as_f64 = |v: &[i16]| -> Vec<f64> { v.iter().map(|&x| x as f64).collect() };
4128+ let mut bands_s = Vec::new();
4129+ let mut bands_o = Vec::new();
4130+ let mut bands_r = Vec::new();
4131+ let mut scratch_ps = Vec::new();
4132+ band_energy(&as_f64(&s_i), CHANNELS, nframes, &mut Some(&mut bands_s), &mut scratch_ps);
4133+ band_energy(&as_f64(&o_i), CHANNELS, nframes, &mut Some(&mut bands_o), &mut scratch_ps);
4134+ band_energy(&as_f64(&r_i), CHANNELS, nframes, &mut Some(&mut bands_r), &mut scratch_ps);
4135+
4136+ // Oracle indices both sides; FFT frame xi -> 20 ms packet index.
4137+ let ours_ix = collect_indices(&ours_packets);
4138+ let ref_ix = collect_indices(&ref_packets);
4139+ let pkt_of = |xi: usize| xi * WIN_STEP / (FRAME * CHANNELS);
4140+
4141+ let mut report = String::new();
4142+ report.push_str("# reelm@12k SILK per-band divergence: ours vs ffmpeg-libopus (r2)\n");
4143+ report.push_str("# mono, 120s, 20ms frames, VBR constrained, 48kHz, Application::Voip\n");
4144+ report.push_str(&format!(
4145+ "# rates: ours {ours_kbps:.2} kbps, ref {ref_kbps:.2} kbps; \
4146+ err ours={err_o:.3} ref={err_r:.3} ratio={:.2}; nframes={nframes}\n",
4147+ err_o / err_r
4148+ ));
4149+
4150+ // (1) 21-band table: which bands carry the error.
4151+ let sum_o: f64 = eb2_o.iter().sum();
4152+ let sum_r: f64 = eb2_r.iter().sum();
4153+ report.push_str(
4154+ "# eb2 = band's mean share of the pre-squared frame error; \
4155+ dln = mean ln(E_test/E_src); band i ends at CELT_EBANDS[i+1]*240 Hz\n",
4156+ );
4157+ report.push_str("# band lo_hz hi_hz dln_o dln_r eb2_o eb2_r ratio share_o share_r\n");
4158+ for bi in 0..NBANDS {
4159+ let (mut dol, mut drl) = (0.0f64, 0.0f64);
4160+ for xi in 0..nframes {
4161+ let sl = bands_s[(xi * NBANDS + bi) * CHANNELS].ln();
4162+ dol += bands_o[(xi * NBANDS + bi) * CHANNELS].ln() - sl;
4163+ drl += bands_r[(xi * NBANDS + bi) * CHANNELS].ln() - sl;
4164+ }
4165+ dol /= nframes as f64;
4166+ drl /= nframes as f64;
4167+ let ratio = if eb2_r[bi] > 0.0 { eb2_o[bi] / eb2_r[bi] } else { f64::INFINITY };
4168+ report.push_str(&format!(
4169+ "{:5} {:5} {:6} {:+.3} {:+.3} {:.3e} {:.3e} {:>7} {:5.1}% {:5.1}%\n",
4170+ bi,
4171+ CELT_EBANDS[bi] * 240,
4172+ CELT_EBANDS[bi + 1] * 240,
4173+ dol,
4174+ drl,
4175+ eb2_o[bi],
4176+ eb2_r[bi],
4177+ ratio,
4178+ 100.0 * eb2_o[bi] / sum_o,
4179+ 100.0 * eb2_r[bi] / sum_r,
4180+ ));
4181+ }
4182+
4183+ // (2) top-15 frames by ef2(ours), with the dominant band and the oracle.
4184+ let mut by_ef2: Vec<usize> = (0..nframes).collect();
4185+ by_ef2.sort_by(|&a, &b| ef2_o[b].partial_cmp(&ef2_o[a]).unwrap());
4186+ report.push_str(
4187+ "\n# top-15 frames by ef2(ours) (ef2 = frame's squared opus_compare error); \
4188+ dom = argmax_b (lnE_o - lnE_s)^2, raw bands\n",
4189+ );
4190+ report.push_str(
4191+ "# t(s) fft pkt ef2_o ef2_r dom domband_hz | side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes\n",
4192+ );
4193+ for &xi in by_ef2.iter().take(15) {
4194+ let pkt = pkt_of(xi);
4195+ let t = (xi * WIN_STEP) as f64 / 48000.0;
4196+ let (mut dom, mut dom_v) = (0usize, -1.0f64);
4197+ for bi in 0..NBANDS {
4198+ let sl = bands_s[(xi * NBANDS + bi) * CHANNELS].ln();
4199+ let d = bands_o[(xi * NBANDS + bi) * CHANNELS].ln() - sl;
4200+ if d * d > dom_v {
4201+ dom_v = d * d;
4202+ dom = bi;
4203+ }
4204+ }
4205+ report.push_str(&format!(
4206+ "{:7.3} {:5} {:4} {:.3e} {:.3e} {:2} {}-{}Hz\n",
4207+ t,
4208+ xi,
4209+ pkt,
4210+ ef2_o[xi],
4211+ ef2_r[xi],
4212+ dom,
4213+ CELT_EBANDS[dom] * 240,
4214+ CELT_EBANDS[dom + 1] * 240
4215+ ));
4216+ for (side, ixv) in [(" O", ours_ix.get(pkt)), (" R", ref_ix.get(pkt))] {
4217+ match ixv {
4218+ Some((ix, bytes)) => {
4219+ let voiced = ix.signal_type == 2;
4220+ let opt = |v: String, on: bool| if on { v } else { "-".to_owned() };
4221+ report.push_str(&format!(
4222+ " {side} sig={} qoff={} gains=[{},{},{},{}] nlsf_i={} lag={} cont={} per={} ltp=[{},{},{},{}] ltpscl={} seed={} bytes={}\n",
4223+ ix.signal_type,
4224+ ix.quant_offset_type,
4225+ ix.gains[0],
4226+ ix.gains[1],
4227+ ix.gains[2],
4228+ ix.gains[3],
4229+ ix.nlsf_interp_coef_q2,
4230+ opt(format!("{}", ix.lag_index), voiced),
4231+ opt(format!("{}", ix.contour_index), voiced),
4232+ opt(format!("{}", ix.per_index), voiced),
4233+ opt(format!("{}", ix.ltp_index[0]), voiced),
4234+ opt(format!("{}", ix.ltp_index[1]), voiced),
4235+ opt(format!("{}", ix.ltp_index[2]), voiced),
4236+ opt(format!("{}", ix.ltp_index[3]), voiced),
4237+ opt(format!("{}", ix.ltp_scale_index), voiced),
4238+ ix.seed,
4239+ bytes
4240+ ));
4241+ }
4242+ None => report.push_str(&format!(" {side} -- missing --\n")),
4243+ }
4244+ }
4245+ }
4246+
4247+ // (3) tail vs body: how much of the total error the worst frames carry,
4248+ // and whether the 11x ratio survives de-tailing (err = (Σef2/n)^(1/16)).
4249+ let tail = |ef2: &[f64]| -> (usize, f64, f64, usize, f64) {
4250+ let mut s = ef2.to_vec();
4251+ s.sort_by(|a, b| b.partial_cmp(a).unwrap());
4252+ let tot: f64 = s.iter().sum();
4253+ let k = (s.len() / 100).max(1);
4254+ let top1: f64 = s[..k].iter().sum();
4255+ let (mut half, mut acc) = (s.len(), 0.0);
4256+ for (i, v) in s.iter().enumerate() {
4257+ acc += v;
4258+ if acc >= 0.5 * tot {
4259+ half = i + 1;
4260+ break;
4261+ }
4262+ }
4263+ (k, top1 / tot, half as f64 / s.len() as f64, half, tot)
4264+ };
4265+ let root16 = |tot: f64, n: usize| tot.powf(1.0 / 16.0) / (n as f64).powf(1.0 / 16.0);
4266+ let (k, sh1_o, halff_o, half_o, _tot_o) = tail(&ef2_o);
4267+ let (_, sh1_r, halff_r, half_r, _tot_r) = tail(&ef2_r);
4268+ report.push_str(&format!(
4269+ "# tail: top-1% ({k} frames) carry {:.2}% of ours' Σef2 vs {:.2}% of ref's; \
4270+ 50% of ours' err sits in the worst {half_o} frames ({:.2}%) \
4271+ vs ref's worst {half_r} ({:.2}%)\n",
4272+ 100.0 * sh1_o, 100.0 * sh1_r, 100.0 * halff_o, 100.0 * halff_r
4273+ ));
4274+ // De-tailed: drop each side's worst 50 frames (of 24k FFT frames/pkt-mapped).
4275+ let clip50 = |ef2: &[f64]| -> f64 {
4276+ let mut s = ef2.to_vec();
4277+ s.sort_by(|a, b| b.partial_cmp(a).unwrap());
4278+ s[50..].iter().sum()
4279+ };
4280+ let err_o_clip = root16(clip50(&ef2_o), nframes);
4281+ let err_r_clip = root16(clip50(&ef2_r), nframes);
4282+ report.push_str(&format!(
4283+ "# de-tailed (worst 50 of {nframes} FFT frames dropped per side): \
4284+ err ours={err_o_clip:.3} ref={err_r_clip:.3} ratio={:.2} (was {err_o:.3}/{err_r:.3}/{:.2})\n",
4285+ err_o_clip / err_r_clip,
4286+ err_o / err_r
4287+ ));
4288+ // Burst signature: per 20 ms packet, does first-subframe gain >= 60 or a
4289+ // starved packet (<= 20 bytes) line up with the packet's mean ef2?
4290+ let mut pkt_ef2 = vec![0.0f64; ours_packets.len()];
4291+ let mut pkt_cnt = vec![0u32; ours_packets.len()];
4292+ for xi in 0..nframes {
4293+ let p = pkt_of(xi).min(pkt_ef2.len() - 1);
4294+ pkt_ef2[p] += ef2_o[xi];
4295+ pkt_cnt[p] += 1;
4296+ }
4297+ let mut g_hi = (0.0f64, 0usize); // (sum, count) packets with gains[0] >= 60
4298+ let mut g_lo = (0.0f64, 0usize);
4299+ let mut b_lo = (0.0f64, 0usize); // bytes <= 20
4300+ let mut b_hi = (0.0f64, 0usize);
4301+ for (i, (ix, bytes)) in ours_ix.iter().enumerate() {
4302+ if i >= pkt_ef2.len() {
4303+ break;
4304+ }
4305+ let mean = if pkt_cnt[i] > 0 { pkt_ef2[i] / pkt_cnt[i] as f64 } else { 0.0 };
4306+ if ix.gains[0] >= 60 {
4307+ g_hi.0 += mean;
4308+ g_hi.1 += 1;
4309+ } else {
4310+ g_lo.0 += mean;
4311+ g_lo.1 += 1;
4312+ }
4313+ if *bytes <= 20 {
4314+ b_lo.0 += mean;
4315+ b_lo.1 += 1;
4316+ } else {
4317+ b_hi.0 += mean;
4318+ b_hi.1 += 1;
4319+ }
4320+ }
4321+ report.push_str(&format!(
4322+ "# burst signature: packets with gains[0]>=60: {}/{}, mean ef2 {:.3e}; \
4323+ gains[0]<60: mean ef2 {:.3e} || packets <=20 bytes: {}/{}, mean ef2 {:.3e}; \
4324+ >20 bytes: mean ef2 {:.3e}\n",
4325+ g_hi.1,
4326+ g_hi.1 + g_lo.1,
4327+ if g_hi.1 > 0 { g_hi.0 / g_hi.1 as f64 } else { f64::NAN },
4328+ if g_lo.1 > 0 { g_lo.0 / g_lo.1 as f64 } else { f64::NAN },
4329+ b_lo.1,
4330+ b_lo.1 + b_hi.1,
4331+ if b_lo.1 > 0 { b_lo.0 / b_lo.1 as f64 } else { f64::NAN },
4332+ if b_hi.1 > 0 { b_hi.0 / b_hi.1 as f64 } else { f64::NAN },
4333+ ));
4334+
4335+ let out_path = lanes_dir.join("opus-silkq-r2.bands.txt");
4336+ fs::write(&out_path, &report).unwrap();
4337+ println!("wrote {}", out_path.display());
4338+ print!("{}", report);
4339+}
4340+
35964341 // ---------------------------------------------------------------------------
35974342 // Harness: feed identical raw PCM (.sw, s16le interleaved) to our opus_compare
35984343 // so it can be checked against the C `opus_compare` tool on the SAME bytes.
lanes/opus-silkq-r1.oracle.txtadded+532 -0
@@ -0,0 +1,532 @@
1+# reelm@12k SILK oracle: ours vs ffmpeg-libopus indices (r1)
2+# mono, 120s, 20ms frames, VBR constrained, 48kHz, Application::Voip
3+# ours_frames=6000 ref_frames=6001
4+# sig: 0=unvoiced 2=voiced | per: LTP codebook | nlsf_i: 4=nointerp
5+# gains/ltp are 4 subframe indices; lag/contour only for voiced
6+
7+=== second 3 (frames 150–199) ===
8+frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
9+ 150 O 2 0 [33, 4, 7, 4] 4 40 2 2 [18,31,18,18] 0 0 33
10+ 150 R 2 0 [27, 4, 4, 5] 2 45 7 2 [20,2,2,11] 0 2 30
11+ 151 O 2 0 [42, 3, 3, 5] 4 39 1 0 [3,7,3,7] 0 0 29
12+ 151 R 2 0 [29, 6, 5, 5] 4 43 9 2 [21,4,17,8] 0 3 32
13+ 152 O 2 0 [47, 3, 4, 5] 4 39 3 2 [25,7,18,31] 0 0 21
14+ 152 R 2 0 [33, 5, 4, 5] 3 42 0 2 [8,4,16,12] 0 3 33
15+ 153 O 2 0 [47, 0, 4, 5] 4 40 13 2 [7,25,19,27] 0 0 27
16+ 153 R 2 0 [35, 4, 4, 5] 2 42 0 2 [12,5,2,21] 0 2 28
17+ 154 O 2 0 [47, 0, 0, 1] 4 40 1 2 [25,31,0,3] 0 0 36
18+ 154 R 2 0 [36, 4, 4, 4] 4 41 1 2 [8,3,16,1] 0 3 28
19+ 155 O 2 0 [41, 4, 2, 1] 4 40 4 2 [31,31,7,0] 0 0 36
20+ 155 R 2 0 [36, 6, 3, 1] 4 42 1 1 [11,6,9,9] 0 0 32
21+ 156 O 2 0 [40, 3, 4, 3] 4 39 1 1 [3,15,15,15] 0 0 28
22+ 156 R 2 0 [32, 4, 3, 4] 3 43 6 2 [16,12,24,13] 0 0 31
23+ 157 O 2 0 [39, 2, 4, 4] 4 39 1 2 [7,7,7,27] 0 0 33
24+ 157 R 2 0 [31, 3, 3, 4] 4 44 1 2 [14,0,10,1] 0 2 21
25+ 158 O 2 0 [37, 2, 1, 4] 4 42 1 1 [9,10,15,0] 0 0 27
26+ 158 R 2 0 [28, 4, 3, 3] 2 46 6 1 [6,14,13,12] 0 2 28
27+ 159 O 2 0 [32, 2,15, 4] 4 48 7 0 [3,7,1,1] 0 0 25
28+ 159 R 2 0 [26, 3, 6,12] 1 50 8 0 [4,3,2,0] 0 0 33
29+ 160 O 2 0 [44, 1, 3, 6] 4 42 1 2 [7,0,31,7] 0 0 32
30+ 160 R 2 0 [39, 4, 3, 3] 4 45 1 2 [7,7,0,2] 0 0 32
31+ 161 O 2 0 [40, 3, 2, 4] 4 44 1 1 [15,15,2,15] 0 0 37
32+ 161 R 2 0 [36, 4, 4, 4] 4 46 0 2 [0,14,0,18] 0 3 28
33+ 162 O 2 0 [40, 2, 2, 4] 4 46 1 2 [3,25,31,31] 0 0 22
34+ 162 R 2 0 [35, 4, 3, 3] 4 47 3 1 [2,1,0,2] 0 2 21
35+ 163 O 2 0 [37, 1, 3, 5] 4 50 3 2 [19,18,7,18] 0 0 34
36+ 163 R 2 0 [32, 4, 3, 3] 2 51 8 1 [0,0,0,10] 0 1 23
37+ 164 O 2 0 [35, 3, 3, 4] 4 52 3 1 [15,15,15,3] 0 0 31
38+ 164 R 2 0 [28, 4, 4, 4] 4 54 8 1 [8,0,1,7] 0 0 25
39+ 165 O 2 0 [33, 5, 3, 4] 4 51 3 1 [3,3,3,10] 0 0 25
40+ 165 R 2 0 [28, 4, 4, 4] 4 58 6 1 [10,0,1,14] 0 2 21
41+ 166 O 2 0 [33, 3, 4, 4] 4 50 3 0 [1,1,2,0] 0 0 26
42+ 166 R 2 0 [28, 4, 4, 4] 4 57 11 1 [8,9,12,7] 0 3 34
43+ 167 O 2 0 [33, 4, 3, 4] 4 51 3 1 [3,3,15,15] 0 0 39
44+ 167 R 2 0 [29, 4, 4, 3] 4 55 9 0 [0,5,5,2] 0 2 30
45+ 168 O 2 0 [37, 3, 4, 5] 4 51 3 2 [31,31,7,7] 0 0 32
46+ 168 R 2 0 [28, 5, 4, 4] 4 54 5 0 [0,4,5,3] 0 2 36
47+ 169 O 2 0 [34, 2, 4, 6] 4 54 3 1 [15,0,15,4] 0 0 29
48+ 169 R 2 0 [30, 4, 4, 4] 4 55 4 0 [0,4,2,3] 0 1 33
49+ 170 O 2 0 [38, 5, 4, 3] 4 51 7 0 [0,7,2,4] 0 0 26
50+ 170 R 2 0 [31, 5, 6, 3] 2 55 0 2 [7,28,7,11] 0 0 39
51+ 171 O 2 0 [37, 3, 2, 2] 4 52 3 0 [7,0,0,7] 0 0 23
52+ 171 R 2 0 [33, 3, 4, 3] 4 54 2 0 [6,5,0,0] 0 2 30
53+ 172 O 2 0 [31, 5, 3, 4] 4 52 3 1 [10,10,0,15] 0 0 34
54+ 172 R 2 0 [29, 5, 5, 4] 1 58 7 1 [14,5,12,1] 0 2 29
55+ 173 O 2 0 [31, 5, 3, 3] 4 53 3 2 [31,27,24,7] 0 0 30
56+ 173 R 2 1 [31, 4, 4, 4] 4 60 9 0 [0,2,2,5] 0 1 33
57+ 174 O 2 0 [30, 5, 4, 5] 4 54 3 2 [10,26,20,27] 0 0 31
58+ 174 R 2 1 [31, 4, 4, 4] 4 59 0 2 [7,23,15,23] 0 1 31
59+ 175 O 2 0 [35, 4, 3, 5] 4 51 3 1 [15,8,12,13] 0 0 29
60+ 175 R 2 1 [32, 6, 4, 4] 4 57 9 0 [3,0,0,0] 0 2 30
61+ 176 O 2 0 [37, 1, 4, 4] 4 50 3 2 [30,7,2,18] 0 0 31
62+ 176 R 2 1 [34, 4, 4, 4] 4 58 9 1 [0,2,0,10] 0 3 32
63+ 177 O 2 0 [34, 5, 3, 4] 4 49 7 0 [6,7,7,7] 0 0 28
64+ 177 R 2 1 [34, 4, 4, 4] 4 57 4 0 [0,7,2,3] 0 1 31
65+ 178 O 2 0 [36, 1, 4, 5] 4 47 0 1 [2,12,1,15] 0 0 33
66+ 178 R 2 1 [34, 4, 3, 4] 4 52 14 0 [6,0,3,4] 0 2 29
67+ 179 O 2 0 [37, 2, 5, 3] 4 48 3 2 [30,0,10,27] 0 0 30
68+ 179 R 2 0 [33, 4, 4, 4] 4 53 9 0 [2,0,2,2] 0 1 33
69+ 180 O 2 0 [38, 3, 5, 4] 4 47 4 2 [27,7,7,7] 0 0 25
70+ 180 R 2 0 [32, 4, 4, 4] 4 52 2 0 [2,0,4,5] 0 2 30
71+ 181 O 2 0 [36, 5, 5, 4] 4 47 7 0 [5,0,2,2] 0 0 38
72+ 181 R 2 0 [32, 4, 5, 4] 4 51 2 1 [9,11,9,8] 0 1 38
73+ 182 O 2 0 [39, 5, 3, 4] 4 47 5 0 [7,6,1,1] 0 0 30
74+ 182 R 2 0 [35, 4, 4, 4] 4 51 0 0 [0,6,5,5] 0 0 34
75+ 183 O 2 0 [41, 4, 4, 4] 4 46 1 0 [2,7,1,0] 0 0 25
76+ 183 R 2 0 [35, 4, 4, 4] 4 50 2 1 [9,9,4,12] 0 2 31
77+ 184 O 2 0 [42, 4, 3, 4] 4 47 0 2 [23,30,7,7] 0 0 37
78+ 184 R 2 0 [35, 5, 3, 4] 4 51 0 2 [18,7,1,14] 0 3 31
79+ 185 O 2 0 [44, 2, 1, 6] 4 50 3 2 [31,31,25,25] 0 0 27
80+ 185 R 2 0 [35, 3, 4, 4] 4 51 4 0 [0,4,4,6] 0 1 30
81+ 186 O 2 0 [41, 3, 3, 4] 4 51 3 2 [31,25,25,25] 0 0 29
82+ 186 R 2 0 [34, 4, 4, 3] 4 52 6 1 [12,9,11,12] 0 1 33
83+ 187 O 2 0 [63, 4, 4, 4] 4 51 3 0 [1,1,1,1] 0 0 15
84+ 187 R 2 0 [33, 3, 4, 4] 4 52 1 1 [8,12,12,13] 0 0 30
85+ 188 O 2 0 [16, 0, 0, 0] 4 53 3 1 [3,3,3,15] 0 0 49
86+ 188 R 2 0 [32, 3, 4, 4] 4 53 1 0 [0,4,4,3] 0 1 32
87+ 189 O 2 0 [42, 1, 2, 6] 4 55 3 0 [3,0,3,3] 0 0 39
88+ 189 R 2 0 [31, 4, 4, 4] 4 56 3 0 [0,5,5,5] 0 2 31
89+ 190 O 2 0 [44, 1, 0, 5] 4 146 3 2 [10,18,18,31] 0 0 20
90+ 190 R 2 0 [33, 4, 2, 3] 1 57 3 0 [0,5,4,6] 0 0 28
91+ 191 O 2 0 [41, 1, 5, 0] 4 146 3 2 [7,7,7,7] 0 0 40
92+ 191 R 2 0 [29, 4, 4, 4] 4 57 11 1 [9,8,15,9] 0 1 31
93+ 192 O 2 0 [40, 7, 0, 1] 4 150 3 0 [0,1,0,2] 0 0 26
94+ 192 R 2 0 [29, 4, 4, 4] 2 148 32 2 [7,18,13,7] 0 1 28
95+ 193 O 2 0 [40, 4, 1, 6] 4 151 3 0 [0,2,0,7] 0 0 23
96+ 193 R 2 0 [29, 4, 3, 4] 4 150 0 1 [4,7,14,15] 0 0 26
97+ 194 O 2 0 [44, 0, 1, 0] 4 153 3 2 [18,7,24,7] 0 0 37
98+ 194 R 2 0 [28, 4, 4, 5] 4 153 6 2 [7,24,23,23] 0 1 35
99+ 195 O 2 0 [46, 0, 6, 0] 4 149 3 1 [3,15,3,15] 0 0 23
100+ 195 R 2 0 [29, 4, 4, 5] 4 153 14 2 [7,12,18,23] 0 3 32
101+ 196 O 2 0 [63, 4, 2, 3] 4 147 3 0 [1,0,1,1] 0 0 14
102+ 196 R 2 0 [30, 4, 4, 3] 4 149 14 1 [9,4,12,15] 0 0 25
103+ 197 O 2 0 [18, 0, 0, 0] 4 146 3 0 [0,1,1,1] 0 0 66
104+ 197 R 2 0 [29, 3, 5, 4] 4 148 2 1 [9,8,9,6] 0 2 30
105+ 198 O 2 0 [63, 4, 4, 4] 4 145 3 1 [3,3,3,3] 0 0 14
106+ 198 R 2 0 [30, 3, 4, 4] 4 147 0 2 [7,20,25,23] 0 3 29
107+ 199 O 2 0 [16, 0, 0, 0] 4 144 3 2 [7,7,7,7] 0 0 41
108+ 199 R 2 0 [29, 4, 4, 5] 4 145 5 2 [7,1,18,23] 0 2 29
109+
110+=== second 39 (frames 1950–1999) ===
111+frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
112+ 1950 O 2 0 [28, 4, 5, 5] 4 110 3 2 [7,27,7,27] 0 0 35
113+ 1950 R 1 0 [27, 3, 4, 6] 4 - - - [-,-,-,-] - 3 27
114+ 1951 O 2 0 [37, 7, 1,11] 4 45 8 2 [11,18,25,31] 0 0 25
115+ 1951 R 2 0 [29, 7, 7, 4] 4 45 15 1 [10,11,0,5] 0 1 34
116+ 1952 O 2 0 [40, 2, 4, 3] 4 47 0 0 [1,7,7,0] 0 0 34
117+ 1952 R 2 0 [39, 3, 0, 4] 4 50 3 1 [11,0,2,2] 0 2 27
118+ 1953 O 2 0 [40, 3, 2, 7] 4 49 7 2 [18,18,25,31] 0 0 26
119+ 1953 R 2 0 [33, 4, 4, 3] 3 51 2 1 [7,1,13,2] 0 3 31
120+ 1954 O 2 0 [40, 1, 4, 4] 4 49 3 2 [18,18,31,25] 0 0 33
121+ 1954 R 2 0 [32, 4, 3, 4] 1 51 0 1 [13,2,2,2] 0 1 29
122+ 1955 O 2 0 [39, 0, 6, 5] 4 50 3 0 [3,3,3,3] 0 0 33
123+ 1955 R 2 0 [31, 3, 3, 4] 4 53 3 1 [1,13,0,5] 0 0 27
124+ 1956 O 2 0 [40, 3, 3, 7] 4 50 3 1 [2,15,0,15] 0 0 26
125+ 1956 R 2 0 [29, 4, 5, 4] 2 54 7 2 [10,17,17,10] 0 2 34
126+ 1957 O 2 0 [42, 2, 7, 4] 4 51 3 0 [3,3,0,4] 0 0 29
127+ 1957 R 2 0 [32, 5, 5, 5] 4 54 12 2 [25,15,26,9] 0 0 32
128+ 1958 O 2 0 [43, 0, 3, 6] 4 54 3 2 [7,18,18,31] 0 0 34
129+ 1958 R 2 0 [35, 5, 4, 4] 2 56 3 2 [5,12,22,2] 0 2 23
130+ 1959 O 2 0 [39, 4, 2, 5] 4 55 3 2 [18,20,19,19] 0 0 33
131+ 1959 R 2 0 [36, 4, 4, 3] 4 55 5 0 [6,3,4,3] 0 0 35
132+ 1960 O 2 0 [39, 2, 4, 3] 4 53 3 1 [3,15,15,15] 0 0 23
133+ 1960 R 2 0 [35, 3, 3, 4] 2 55 7 1 [0,8,15,15] 0 1 30
134+ 1961 O 2 0 [34, 0, 1, 2] 4 242 3 1 [12,3,3,3] 0 0 34
135+ 1961 R 2 0 [32, 3, 0, 0] 4 56 9 1 [0,0,15,0] 0 2 31
136+ 1962 O 2 0 [23, 0, 2, 5] 4 51 3 2 [18,7,7,7] 0 0 33
137+ 1962 R 1 1 [22, 3, 1, 2] 4 - - - [-,-,-,-] - 2 25
138+ 1963 O 0 0 [24, 4, 3,14] 4 - - - [-,-,-,-] - 0 23
139+ 1963 R 1 0 [17, 7, 4, 4] 4 - - - [-,-,-,-] - 0 25
140+ 1964 O 0 0 [28, 4, 3, 8] 4 - - - [-,-,-,-] - 0 26
141+ 1964 R 1 0 [34, 3, 0, 4] 4 - - - [-,-,-,-] - 1 21
142+ 1965 O 2 0 [32, 3, 4, 5] 4 220 3 0 [1,3,1,6] 0 0 35
143+ 1965 R 1 1 [32, 5, 4, 4] 3 - - - [-,-,-,-] - 0 28
144+ 1966 O 0 0 [34, 5, 3, 5] 4 - - - [-,-,-,-] - 0 29
145+ 1966 R 1 1 [33, 4, 5, 4] 2 - - - [-,-,-,-] - 3 33
146+ 1967 O 2 0 [39, 4, 3, 3] 4 48 7 2 [7,25,7,18] 0 0 32
147+ 1967 R 1 0 [34, 6, 4, 4] 2 - - - [-,-,-,-] - 0 33
148+ 1968 O 2 0 [40, 5, 0, 5] 4 52 3 1 [0,14,3,0] 0 0 29
149+ 1968 R 2 0 [34, 5, 6, 0] 1 56 9 0 [2,2,5,0] 0 0 34
150+ 1969 O 2 0 [38, 3, 3, 5] 4 53 3 2 [7,18,18,31] 0 0 29
151+ 1969 R 2 0 [32, 3, 4, 4] 4 57 9 1 [7,0,1,15] 0 0 27
152+ 1970 O 2 0 [38, 2, 2, 6] 4 54 3 1 [0,15,15,15] 0 0 33
153+ 1970 R 2 0 [30, 4, 3, 4] 3 58 7 1 [5,0,1,2] 0 0 26
154+ 1971 O 2 0 [41, 1, 2, 6] 4 56 3 2 [18,7,7,7] 0 0 37
155+ 1971 R 2 0 [28, 4, 4, 4] 4 57 1 1 [0,2,1,6] 0 0 30
156+ 1972 O 2 0 [43, 0, 0, 1] 4 57 3 2 [31,7,18,18] 0 0 35
157+ 1972 R 2 0 [28, 4, 3, 4] 4 59 4 1 [1,14,2,7] 0 0 22
158+ 1973 O 2 0 [44, 1, 6, 2] 4 57 3 0 [0,0,0,0] 0 0 17
159+ 1973 R 2 0 [26, 4, 4, 4] 4 59 4 2 [10,25,2,10] 0 3 29
160+ 1974 O 2 0 [44, 2, 0, 6] 4 59 3 1 [15,3,3,3] 0 0 57
161+ 1974 R 2 0 [26, 6, 5, 4] 4 60 2 2 [27,16,12,16] 0 0 25
162+ 1975 O 2 0 [49, 0, 0, 1] 4 58 3 2 [7,7,18,25] 0 0 17
163+ 1975 R 2 0 [29, 4, 3, 3] 4 59 2 2 [16,16,14,5] 0 0 23
164+ 1976 O 2 0 [43, 2, 0, 1] 4 147 3 1 [15,2,10,2] 0 0 25
165+ 1976 R 2 0 [27, 5, 4, 4] 4 58 1 2 [19,26,10,20] 0 2 26
166+ 1977 O 2 0 [41, 0, 4, 3] 4 56 3 0 [1,0,3,7] 0 0 33
167+ 1977 R 2 0 [28, 3, 4, 4] 4 57 2 2 [26,5,5,15] 0 1 19
168+ 1978 O 2 0 [40, 0, 3, 5] 4 56 3 1 [2,2,15,0] 0 0 23
169+ 1978 R 2 0 [27, 4, 4, 4] 4 57 4 2 [24,13,4,19] 0 1 21
170+ 1979 O 2 0 [35, 2, 0, 1] 4 56 3 2 [25,31,0,18] 0 0 36
171+ 1979 R 2 0 [28, 4, 3, 4] 2 57 0 2 [2,2,24,1] 0 1 20
172+ 1980 O 2 0 [42, 6, 1,10] 4 219 3 0 [1,1,1,0] 0 0 44
173+ 1980 R 2 0 [26, 3, 4, 5] 1 55 11 2 [2,19,28,7] 0 2 30
174+ 1981 O 2 0 [50, 3, 0, 3] 4 143 3 0 [1,1,1,3] 0 0 17
175+ 1981 R 2 0 [31, 2, 9, 3] 4 149 5 2 [7,7,28,28] 0 1 33
176+ 1982 O 2 0 [43, 0, 7, 0] 4 155 3 1 [3,10,2,0] 0 0 18
177+ 1982 R 2 0 [33, 6, 1, 5] 4 153 13 2 [2,7,30,22] 0 2 31
178+ 1983 O 2 0 [40, 0, 0, 0] 4 142 3 1 [3,15,3,3] 0 0 41
179+ 1983 R 2 0 [31, 4, 2, 2] 2 144 17 2 [10,2,25,18] 0 0 21
180+ 1984 O 2 0 [36, 2, 1, 1] 4 106 3 2 [7,7,10,7] 0 0 24
181+ 1984 R 2 0 [27, 2, 3, 4] 4 145 13 0 [0,0,2,0] 0 1 27
182+ 1985 O 2 0 [32, 0, 7, 8] 4 105 3 1 [3,3,0,10] 0 0 31
183+ 1985 R 1 0 [23, 1, 4, 8] 3 - - - [-,-,-,-] - 0 27
184+ 1986 O 2 0 [27, 0, 3, 9] 4 35 7 0 [1,1,1,5] 0 0 28
185+ 1986 R 1 0 [28, 0, 0, 2] 4 - - - [-,-,-,-] - 3 27
186+ 1987 O 2 0 [25, 0,11, 3] 4 221 3 2 [7,7,21,0] 0 0 30
187+ 1987 R 1 0 [19, 4, 2, 9] 4 - - - [-,-,-,-] - 1 26
188+ 1988 O 2 0 [24, 1, 1, 1] 4 193 3 0 [1,1,1,1] 0 0 17
189+ 1988 R 1 0 [22, 0, 0, 2] 4 - - - [-,-,-,-] - 1 23
190+ 1989 O 2 0 [12, 3, 4, 3] 4 173 3 1 [3,15,15,3] 0 0 30
191+ 1989 R 0 1 [12, 4, 4, 4] 4 - - - [-,-,-,-] - 2 21
192+ 1990 O 2 0 [11, 5, 2, 4] 4 26 17 2 [7,18,7,7] 0 0 40
193+ 1990 R 0 1 [12, 4, 4, 4] 4 - - - [-,-,-,-] - 0 19
194+ 1991 O 2 0 [10, 4, 4, 4] 4 237 3 2 [7,7,7,7] 0 0 28
195+ 1991 R 0 1 [11, 3, 4, 4] 4 - - - [-,-,-,-] - 0 20
196+ 1992 O 2 0 [ 9, 3, 4, 4] 4 129 3 1 [10,3,2,3] 0 0 25
197+ 1992 R 0 1 [10, 4, 3, 4] 4 - - - [-,-,-,-] - 0 20
198+ 1993 O 2 0 [ 7, 4, 5, 3] 4 230 3 0 [0,1,1,0] 0 0 28
199+ 1993 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 1 20
200+ 1994 O 2 0 [ 6, 5, 3, 4] 4 174 3 2 [7,31,7,7] 0 0 34
201+ 1994 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 0 21
202+ 1995 O 2 0 [ 5, 4, 5, 5] 4 234 3 1 [15,3,7,10] 0 0 30
203+ 1995 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 3 16
204+ 1996 O 2 0 [30, 0, 8, 8] 4 24 1 2 [24,7,31,28] 0 0 31
205+ 1996 R 1 0 [18,11, 3, 8] 4 - - - [-,-,-,-] - 0 21
206+ 1997 O 2 0 [38, 3, 6, 2] 4 47 0 2 [3,18,25,25] 0 0 30
207+ 1997 R 2 0 [31, 5, 4, 6] 4 48 1 2 [7,15,10,29] 0 1 38
208+ 1998 O 2 0 [40, 3, 3, 5] 4 49 3 1 [15,13,2,2] 0 0 32
209+ 1998 R 2 0 [34, 4, 4, 4] 4 50 3 2 [23,1,29,3] 0 1 34
210+ 1999 O 2 0 [44, 2, 3, 2] 4 50 3 2 [31,25,25,31] 0 0 25
211+ 1999 R 2 0 [34, 4, 4, 4] 4 51 3 2 [3,1,6,3] 0 0 20
212+
213+=== second 51 (frames 2550–2599) ===
214+frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
215+ 2550 O 2 0 [44, 2, 6, 4] 4 39 1 1 [0,3,3,0] 0 0 42
216+ 2550 R 2 0 [29, 4, 5, 6] 4 39 8 2 [0,0,0,29] 0 1 33
217+ 2551 O 2 0 [63, 4, 4, 4] 4 41 1 1 [0,3,3,3] 0 0 14
218+ 2551 R 2 0 [32, 4, 4, 5] 1 42 3 2 [16,22,4,8] 0 1 31
219+ 2552 O 2 0 [63, 4, 4, 4] 4 42 11 0 [1,1,1,1] 0 0 14
220+ 2552 R 2 0 [34, 4, 4, 4] 1 43 0 2 [13,16,3,4] 0 3 29
221+ 2553 O 2 0 [16, 0, 0, 0] 4 43 1 0 [1,0,2,2] 0 0 60
222+ 2553 R 2 0 [34, 4, 4, 4] 3 44 3 2 [3,13,16,6] 0 0 33
223+ 2554 O 2 0 [47, 0, 2, 6] 4 43 2 1 [14,5,0,1] 0 0 24
224+ 2554 R 2 0 [34, 4, 4, 4] 4 44 0 2 [4,9,13,0] 0 3 33
225+ 2555 O 2 0 [47, 0, 1, 5] 4 42 1 2 [25,31,25,18] 0 0 25
226+ 2555 R 2 0 [33, 4, 4, 4] 1 44 0 2 [12,9,16,1] 0 1 27
227+ 2556 O 2 0 [43, 0, 5, 2] 4 41 2 2 [31,18,31,31] 0 0 28
228+ 2556 R 2 0 [33, 4, 3, 4] 4 44 0 2 [20,13,22,2] 0 0 25
229+ 2557 O 2 0 [39, 1, 6, 4] 4 41 17 2 [10,25,31,7] 0 0 30
230+ 2557 R 2 0 [31, 4, 4, 4] 4 44 3 2 [3,2,2,2] 0 1 22
231+ 2558 O 2 0 [39, 2, 5, 4] 4 40 2 2 [18,18,31,31] 0 0 33
232+ 2558 R 2 0 [31, 4, 4, 4] 4 43 5 2 [5,4,3,1] 0 3 29
233+ 2559 O 2 0 [43, 3, 1, 2] 4 39 1 1 [15,15,2,15] 0 0 26
234+ 2559 R 2 0 [31, 3, 4, 4] 4 42 5 2 [10,3,3,8] 0 0 26
235+ 2560 O 2 0 [41, 4, 0, 3] 4 39 1 2 [31,25,25,25] 0 0 21
236+ 2560 R 2 0 [30, 4, 4, 4] 4 42 0 2 [3,6,14,14] 0 0 23
237+ 2561 O 2 0 [37, 3, 2, 5] 4 38 1 2 [7,18,31,31] 0 0 33
238+ 2561 R 2 0 [29, 4, 4, 4] 4 42 0 2 [4,22,1,2] 0 3 32
239+ 2562 O 2 0 [38, 4, 4, 4] 4 37 1 2 [18,18,31,30] 0 0 31
240+ 2562 R 2 0 [29, 3, 4, 4] 4 42 0 2 [1,1,5,2] 0 1 18
241+ 2563 O 2 0 [39, 3, 3, 5] 4 37 1 1 [10,10,15,10] 0 0 30
242+ 2563 R 2 0 [28, 4, 4, 4] 4 42 0 2 [1,17,16,17] 0 0 27
243+ 2564 O 2 0 [36, 3, 4, 4] 4 37 1 1 [15,3,15,15] 0 0 34
244+ 2564 R 2 0 [28, 4, 4, 4] 4 42 0 2 [1,13,17,5] 0 0 24
245+ 2565 O 2 0 [39, 2, 4, 5] 4 37 1 2 [7,18,18,18] 0 0 27
246+ 2565 R 2 0 [28, 4, 4, 4] 2 42 0 2 [16,0,8,15] 0 1 21
247+ 2566 O 2 0 [37, 2, 3, 3] 4 38 1 2 [30,27,30,31] 0 0 38
248+ 2566 R 2 0 [28, 4, 4, 4] 1 43 3 2 [6,2,1,20] 0 3 25
249+ 2567 O 2 0 [34, 3, 3, 1] 4 39 1 1 [3,3,9,15] 0 0 30
250+ 2567 R 2 0 [28, 2, 4, 4] 4 43 1 0 [4,4,3,7] 0 1 37
251+ 2568 O 2 0 [32, 2, 6, 7] 4 40 17 0 [3,5,0,5] 0 0 27
252+ 2568 R 2 0 [25, 4, 6, 6] 2 48 3 1 [0,1,12,3] 0 2 34
253+ 2569 O 2 0 [27, 0, 3, 1] 4 38 2 2 [7,7,7,7] 0 0 29
254+ 2569 R 1 0 [29, 0, 1, 4] 4 - - - [-,-,-,-] - 1 24
255+ 2570 O 2 0 [17, 2, 3, 2] 4 40 17 2 [7,7,7,7] 0 0 29
256+ 2570 R 1 0 [19, 2, 2, 2] 4 - - - [-,-,-,-] - 2 19
257+ 2571 O 2 0 [25,20, 0, 7] 4 145 3 2 [7,25,11,26] 0 0 31
258+ 2571 R 1 0 [12,21,12, 5] 0 - - - [-,-,-,-] - 3 34
259+ 2572 O 2 0 [45, 6, 3, 4] 4 241 3 2 [31,19,27,30] 0 0 26
260+ 2572 R 1 0 [40, 7, 6, 4] 4 - - - [-,-,-,-] - 1 27
261+ 2573 O 1 1 [45, 3, 3, 3] 4 - - - [-,-,-,-] - 0 26
262+ 2573 R 1 1 [45, 4, 4, 3] 4 - - - [-,-,-,-] - 3 31
263+ 2574 O 2 0 [42, 0, 1, 6] 4 28 4 0 [1,1,1,7] 0 0 37
264+ 2574 R 1 0 [43, 3, 1, 4] 4 - - - [-,-,-,-] - 3 27
265+ 2575 O 2 0 [38, 3, 0, 3] 4 41 17 1 [12,1,10,15] 0 0 29
266+ 2575 R 1 0 [37, 3, 2, 1] 4 - - - [-,-,-,-] - 2 28
267+ 2576 O 2 0 [28, 3, 3, 2] 4 47 0 1 [0,0,12,12] 0 0 30
268+ 2576 R 1 1 [28, 3, 2, 3] 4 - - - [-,-,-,-] - 0 35
269+ 2577 O 2 0 [24, 4, 1, 3] 4 45 1 2 [18,19,27,7] 0 0 30
270+ 2577 R 1 1 [23, 4, 3, 3] 4 - - - [-,-,-,-] - 0 27
271+ 2578 O 2 0 [17, 2, 4, 4] 4 226 3 1 [3,3,3,12] 0 0 28
272+ 2578 R 1 1 [19, 3, 3, 3] 2 - - - [-,-,-,-] - 0 26
273+ 2579 O 2 0 [15, 2, 2, 5] 4 195 3 2 [7,7,7,7] 0 0 31
274+ 2579 R 0 1 [16, 4, 3, 2] 4 - - - [-,-,-,-] - 0 19
275+ 2580 O 2 0 [38, 6, 0, 7] 4 23 12 2 [31,7,7,25] 0 0 32
276+ 2580 R 1 0 [26,11, 7, 3] 4 - - - [-,-,-,-] - 0 30
277+ 2581 O 2 0 [44, 4, 4, 5] 4 39 13 2 [27,25,7,7] 0 0 30
278+ 2581 R 2 0 [35, 6, 4, 4] 4 44 10 1 [3,1,2,2] 0 0 38
279+ 2582 O 2 0 [45, 4, 9, 0] 4 46 12 0 [7,3,7,2] 0 0 28
280+ 2582 R 2 0 [38, 5, 5, 9] 2 47 1 2 [18,10,22,10] 0 1 35
281+ 2583 O 2 0 [46, 1, 4, 3] 4 48 3 2 [25,2,0,19] 0 0 33
282+ 2583 R 2 0 [45, 0, 4, 3] 2 48 3 2 [0,15,1,3] 0 3 22
283+ 2584 O 2 0 [43, 1, 4, 6] 4 48 3 2 [25,4,0,28] 0 0 29
284+ 2584 R 2 0 [40, 3, 4, 4] 4 48 0 2 [3,3,15,0] 0 3 20
285+ 2585 O 2 0 [44, 2, 5, 3] 4 47 0 2 [25,18,4,3] 0 0 28
286+ 2585 R 2 0 [39, 4, 4, 4] 4 48 0 1 [1,1,1,1] 0 3 24
287+ 2586 O 2 0 [46, 0, 4, 4] 4 46 1 0 [3,4,2,7] 0 0 31
288+ 2586 R 2 0 [39, 3, 4, 3] 1 47 5 2 [10,10,10,19] 0 2 28
289+ 2587 O 2 0 [43, 0, 0, 3] 4 48 3 1 [9,3,10,0] 0 0 33
290+ 2587 R 2 0 [36, 2, 0, 2] 4 47 8 0 [3,0,0,3] 0 0 37
291+ 2588 O 2 0 [33, 4, 0, 3] 4 47 4 2 [25,18,7,18] 0 0 30
292+ 2588 R 2 0 [26, 3, 7, 3] 1 48 9 1 [10,0,14,0] 0 0 39
293+ 2589 O 2 0 [37, 1, 0, 2] 4 47 12 0 [3,0,1,2] 0 0 30
294+ 2589 R 2 0 [26, 9, 3, 0] 4 48 8 0 [3,0,0,0] 0 0 32
295+ 2590 O 2 0 [32, 5, 0, 7] 4 40 11 0 [4,1,1,1] 0 0 28
296+ 2590 R 2 1 [24, 8, 8, 0] 1 52 22 1 [0,3,0,3] 0 1 27
297+ 2591 O 2 0 [29, 7,11, 0] 4 226 3 1 [3,12,3,2] 0 0 30
298+ 2591 R 1 0 [30, 4, 7, 9] 4 - - - [-,-,-,-] - 0 30
299+ 2592 O 2 0 [39, 8, 2, 5] 4 51 7 1 [13,3,2,15] 0 0 35
300+ 2592 R 1 0 [37, 2, 5, 4] 2 - - - [-,-,-,-] - 2 33
301+ 2593 O 2 0 [44, 2, 3, 6] 4 52 3 0 [7,3,7,7] 0 0 30
302+ 2593 R 2 0 [35, 4, 4, 4] 4 54 3 2 [0,1,0,14] 0 3 22
303+ 2594 O 2 0 [45, 6, 0, 0] 4 57 3 2 [10,29,15,18] 0 0 27
304+ 2594 R 2 0 [35, 6, 6, 3] 4 56 1 2 [2,2,28,3] 0 0 24
305+ 2595 O 2 0 [43, 0, 3, 1] 4 147 3 2 [7,7,7,7] 0 0 43
306+ 2595 R 2 0 [35, 1, 3, 2] 3 57 0 1 [0,12,15,14] 0 3 32
307+ 2596 O 2 0 [50, 0, 0, 0] 4 229 3 0 [1,1,1,1] 0 0 31
308+ 2596 R 2 0 [29,12, 4, 0] 1 137 18 1 [3,1,0,3] 0 0 34
309+ 2597 O 2 0 [63, 4, 4, 4] 4 200 3 0 [1,1,1,1] 0 0 15
310+ 2597 R 1 0 [29, 3, 1, 4] 4 - - - [-,-,-,-] - 2 24
311+ 2598 O 2 0 [52, 0, 0, 0] 4 210 3 0 [1,1,1,1] 0 0 35
312+ 2598 R 2 0 [27, 1, 9, 5] 4 206 24 2 [3,10,19,29] 0 1 35
313+ 2599 O 2 0 [54, 0, 0, 0] 4 146 3 0 [1,1,1,1] 0 0 16
314+ 2599 R 2 0 [26, 4, 4, 2] 4 183 5 1 [3,7,7,0] 0 2 30
315+
316+=== second 5 (frames 250–299) ===
317+frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
318+ 250 O 2 0 [35, 3, 2, 5] 4 57 3 0 [4,7,3,3] 0 0 23
319+ 250 R 2 0 [26, 4, 4, 3] 4 60 5 2 [5,13,7,20] 0 2 32
320+ 251 O 2 0 [29, 6, 4, 3] 4 58 3 0 [3,3,7,0] 0 0 32
321+ 251 R 2 0 [25, 4, 3, 3] 0 62 2 2 [18,5,26,24] 0 3 24
322+ 252 O 2 0 [30, 4, 3, 3] 4 58 3 0 [3,2,7,0] 0 0 26
323+ 252 R 2 0 [23, 4, 4, 4] 2 62 1 1 [1,13,0,0] 0 2 27
324+ 253 O 2 0 [28, 2, 3, 5] 4 59 3 1 [3,9,3,12] 0 0 36
325+ 253 R 2 0 [22, 4, 4, 4] 4 64 0 2 [18,23,18,18] 0 2 31
326+ 254 O 2 0 [26, 3, 6, 5] 4 60 3 0 [7,7,4,7] 0 0 31
327+ 254 R 2 0 [22, 3, 4, 4] 1 66 5 2 [10,10,18,19] 0 3 27
328+ 255 O 2 0 [29, 2, 2, 5] 4 58 3 0 [0,7,3,2] 0 0 29
329+ 255 R 2 0 [21, 4, 4, 4] 4 62 20 0 [7,0,7,3] 0 1 35
330+ 256 O 2 0 [30, 1, 7, 1] 4 137 3 2 [7,7,7,7] 0 0 33
331+ 256 R 2 0 [21, 5, 3, 5] 4 64 22 0 [0,0,0,0] 0 3 39
332+ 257 O 2 0 [30, 1, 7, 2] 4 136 3 1 [3,3,12,15] 0 0 28
333+ 257 R 2 0 [22, 4, 4, 4] 4 143 1 1 [10,2,0,11] 0 0 19
334+ 258 O 2 0 [28, 7, 0, 5] 4 138 3 1 [0,9,12,3] 0 0 29
335+ 258 R 2 0 [22, 4, 5, 4] 1 144 7 1 [7,0,7,10] 0 0 27
336+ 259 O 2 0 [28, 9, 0, 1] 4 210 3 1 [3,15,3,3] 0 0 31
337+ 259 R 2 0 [23, 5, 7, 2] 4 133 14 2 [7,7,28,7] 0 0 33
338+ 260 O 2 0 [28, 2, 7, 1] 4 120 3 0 [7,1,0,2] 0 0 30
339+ 260 R 1 0 [22, 5, 4, 5] 4 - - - [-,-,-,-] - 1 27
340+ 261 O 2 0 [28, 2, 4,10] 4 114 3 0 [1,0,5,7] 0 0 29
341+ 261 R 1 0 [24, 2, 4, 5] 4 - - - [-,-,-,-] - 1 22
342+ 262 O 2 0 [27, 0, 3, 3] 4 14 2 2 [7,7,19,7] 0 0 29
343+ 262 R 1 0 [28, 1, 0, 4] 4 - - - [-,-,-,-] - 1 23
344+ 263 O 2 0 [22, 3, 4, 4] 4 32 8 2 [7,7,7,10] 0 0 29
345+ 263 R 1 1 [19, 3, 4, 4] 4 - - - [-,-,-,-] - 2 31
346+ 264 O 2 0 [26, 1, 3, 5] 4 199 3 1 [10,12,3,3] 0 0 28
347+ 264 R 1 0 [18, 6, 4, 3] 4 - - - [-,-,-,-] - 1 29
348+ 265 O 2 0 [21, 0, 1, 4] 4 234 3 1 [3,3,3,3] 0 0 31
349+ 265 R 0 1 [19, 2, 2, 2] 4 - - - [-,-,-,-] - 0 25
350+ 266 O 0 0 [10, 2, 6, 2] 4 - - - [-,-,-,-] - 0 26
351+ 266 R 0 1 [12, 3, 3, 4] 4 - - - [-,-,-,-] - 1 20
352+ 267 O 2 0 [ 8, 5, 2, 4] 4 217 3 2 [7,7,7,7] 0 0 32
353+ 267 R 0 1 [10, 4, 3, 4] 4 - - - [-,-,-,-] - 1 20
354+ 268 O 2 0 [ 8, 4, 4, 3] 4 215 3 0 [4,0,1,0] 0 0 29
355+ 268 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 3 21
356+ 269 O 2 0 [ 8, 3, 4, 5] 4 197 3 2 [7,7,27,7] 0 0 34
357+ 269 R 0 1 [ 9, 4, 4, 4] 0 - - - [-,-,-,-] - 1 18
358+ 270 O 2 0 [ 9, 5, 2, 6] 4 107 3 2 [7,24,3,18] 0 0 28
359+ 270 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 2 19
360+ 271 O 0 0 [10, 2, 4, 5] 4 - - - [-,-,-,-] - 0 32
361+ 271 R 0 1 [ 9, 5, 4, 4] 4 - - - [-,-,-,-] - 1 23
362+ 272 O 2 0 [12, 3, 4, 6] 4 195 3 0 [1,0,0,1] 0 0 27
363+ 272 R 0 1 [10, 4, 4, 5] 4 - - - [-,-,-,-] - 0 24
364+ 273 O 2 0 [12, 4, 4, 4] 4 224 3 2 [0,7,31,7] 0 0 32
365+ 273 R 0 1 [12, 4, 4, 4] 4 - - - [-,-,-,-] - 0 20
366+ 274 O 2 0 [14, 3, 4, 5] 4 82 3 2 [7,7,7,25] 0 0 25
367+ 274 R 0 1 [12, 4, 4, 4] 4 - - - [-,-,-,-] - 0 22
368+ 275 O 2 0 [12, 4, 3, 3] 4 84 3 1 [9,10,12,15] 0 0 34
369+ 275 R 0 1 [12, 4, 4, 4] 4 - - - [-,-,-,-] - 0 22
370+ 276 O 2 0 [11, 5, 2, 4] 4 225 3 1 [3,3,3,12] 0 0 30
371+ 276 R 0 1 [12, 4, 4, 3] 4 - - - [-,-,-,-] - 0 20
372+ 277 O 2 0 [10, 5, 4, 3] 4 240 3 2 [7,2,7,7] 0 0 32
373+ 277 R 0 1 [11, 4, 4, 4] 4 - - - [-,-,-,-] - 0 22
374+ 278 O 2 0 [12, 3, 4, 5] 4 80 3 0 [3,0,0,1] 0 0 25
375+ 278 R 0 1 [11, 4, 4, 4] 4 - - - [-,-,-,-] - 3 21
376+ 279 O 2 0 [10, 4, 5, 2] 4 253 3 0 [0,1,1,1] 0 0 30
377+ 279 R 0 1 [11, 4, 4, 4] 4 - - - [-,-,-,-] - 2 19
378+ 280 O 2 0 [10, 5, 3, 4] 4 152 3 0 [1,3,0,1] 0 0 30
379+ 280 R 0 1 [11, 4, 4, 4] 4 - - - [-,-,-,-] - 0 15
380+ 281 O 2 0 [11, 3, 4, 4] 4 172 3 0 [1,1,1,0] 0 0 35
381+ 281 R 0 1 [11, 4, 4, 4] 4 - - - [-,-,-,-] - 0 23
382+ 282 O 2 0 [ 9, 4, 4, 2] 4 247 3 2 [7,7,7,30] 0 0 29
383+ 282 R 0 1 [11, 3, 4, 4] 4 - - - [-,-,-,-] - 3 22
384+ 283 O 2 0 [ 7, 3, 5, 3] 4 247 3 0 [1,1,1,0] 0 0 27
385+ 283 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 0 16
386+ 284 O 2 0 [ 6, 3, 4, 4] 4 155 3 0 [7,1,1,1] 0 0 32
387+ 284 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 3 20
388+ 285 O 2 0 [ 8, 4, 4, 4] 4 188 3 0 [1,1,3,0] 0 0 26
389+ 285 R 0 1 [ 8, 4, 4, 4] 1 - - - [-,-,-,-] - 0 21
390+ 286 O 2 0 [ 7, 4, 4, 3] 4 236 3 2 [7,7,7,7] 0 0 34
391+ 286 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 3 17
392+ 287 O 2 0 [ 8, 4, 4, 5] 4 84 3 0 [1,0,3,0] 0 0 25
393+ 287 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 2 21
394+ 288 O 2 0 [ 6, 4, 4, 4] 4 54 3 2 [7,7,7,25] 0 0 33
395+ 288 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 0 24
396+ 289 O 2 0 [ 7, 4, 6, 2] 4 246 3 0 [7,2,1,1] 0 0 30
397+ 289 R 0 1 [ 8, 4, 4, 5] 4 - - - [-,-,-,-] - 1 24
398+ 290 O 2 0 [ 8, 3, 5, 3] 4 194 3 2 [7,7,30,20] 0 0 27
399+ 290 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 0 15
400+ 291 O 2 0 [ 5, 5, 4, 5] 4 171 3 2 [18,7,7,20] 0 0 36
401+ 291 R 0 1 [ 8, 4, 4, 4] 4 - - - [-,-,-,-] - 1 19
402+ 292 O 2 0 [ 7, 3, 6, 4] 4 101 3 1 [3,10,3,3] 0 0 31
403+ 292 R 0 1 [ 8, 4, 4, 5] 2 - - - [-,-,-,-] - 2 21
404+ 293 O 2 0 [ 9, 3, 4, 5] 4 0 11 0 [1,1,1,1] 0 0 24
405+ 293 R 0 1 [ 9, 4, 4, 4] 0 - - - [-,-,-,-] - 2 16
406+ 294 O 2 0 [ 7, 5, 3, 4] 4 252 3 1 [3,10,3,15] 0 0 28
407+ 294 R 0 1 [ 9, 4, 4, 4] 4 - - - [-,-,-,-] - 0 17
408+ 295 O 2 0 [ 6, 4, 4, 3] 4 0 4 0 [3,0,1,0] 0 0 31
409+ 295 R 0 1 [ 9, 3, 4, 4] 2 - - - [-,-,-,-] - 0 18
410+ 296 O 2 0 [10, 9,16, 0] 4 216 3 0 [0,1,7,2] 0 0 33
411+ 296 R 1 0 [ 8, 4,14,12] 1 - - - [-,-,-,-] - 3 21
412+ 297 O 1 0 [29, 0, 6, 3] 4 - - - [-,-,-,-] - 0 34
413+ 297 R 1 0 [26, 7, 4, 3] 0 - - - [-,-,-,-] - 0 22
414+ 298 O 2 0 [32, 4, 5, 5] 4 44 1 2 [1,18,7,7] 0 0 30
415+ 298 R 1 0 [28, 5, 4, 5] 4 - - - [-,-,-,-] - 2 28
416+ 299 O 2 0 [34, 0, 2, 5] 4 51 3 1 [10,3,0,0] 0 0 30
417+ 299 R 2 0 [29, 4, 2, 3] 4 54 13 0 [3,2,0,2] 0 0 34
418+
419+=== second 1 (frames 50–99) ===
420+frame side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
421+ 50 O 0 0 [17, 3, 3, 3] 4 - - - [-,-,-,-] - 0 27
422+ 50 R 0 0 [16, 4, 4, 4] 4 - - - [-,-,-,-] - 2 22
423+ 51 O 0 0 [15, 4, 3, 4] 4 - - - [-,-,-,-] - 0 31
424+ 51 R 0 1 [16, 4, 4, 3] 4 - - - [-,-,-,-] - 0 22
425+ 52 O 2 0 [15, 2, 6, 3] 4 224 3 1 [3,3,3,13] 0 0 32
426+ 52 R 0 1 [15, 4, 3, 4] 4 - - - [-,-,-,-] - 0 27
427+ 53 O 2 0 [16, 4, 5, 5] 4 3 2 2 [7,18,18,25] 0 0 27
428+ 53 R 0 1 [14, 4, 4, 6] 1 - - - [-,-,-,-] - 0 26
429+ 54 O 2 0 [21, 4, 2, 5] 4 4 8 0 [7,0,1,1] 0 0 38
430+ 54 R 1 0 [17, 6, 4, 3] 4 - - - [-,-,-,-] - 0 27
431+ 55 O 2 0 [19, 2, 5, 1] 4 190 3 0 [1,7,1,1] 0 0 23
432+ 55 R 0 1 [18, 3, 4, 3] 4 - - - [-,-,-,-] - 3 25
433+ 56 O 2 0 [14, 6, 5, 6] 4 7 10 2 [27,7,7,30] 0 0 33
434+ 56 R 0 1 [14, 4, 5, 5] 4 - - - [-,-,-,-] - 1 27
435+ 57 O 2 0 [23, 5, 3, 9] 4 19 12 2 [10,19,10,8] 0 0 24
436+ 57 R 1 1 [18, 6, 4, 4] 4 - - - [-,-,-,-] - 0 31
437+ 58 O 2 0 [33, 0, 7, 3] 4 244 3 0 [7,1,4,4] 0 0 37
438+ 58 R 1 0 [27, 7, 1, 7] 4 - - - [-,-,-,-] - 2 25
439+ 59 O 2 0 [36, 6, 3, 2] 4 29 2 2 [8,31,18,31] 0 0 29
440+ 59 R 2 0 [30, 6, 5, 4] 4 31 1 2 [3,29,24,5] 0 2 29
441+ 60 O 2 0 [38, 2, 7, 4] 4 28 2 2 [18,31,31,31] 0 0 32
442+ 60 R 2 0 [32, 4, 5, 5] 4 31 5 2 [1,22,16,11] 0 2 28
443+ 61 O 2 0 [45, 0, 0, 7] 4 29 1 2 [31,31,25,18] 0 0 28
444+ 61 R 2 0 [35, 4, 4, 3] 2 31 6 2 [8,29,19,4] 0 0 21
445+ 62 O 2 0 [39, 0, 2, 0] 4 32 22 0 [2,0,3,1] 0 0 26
446+ 62 R 2 0 [34, 3, 2, 3] 4 37 19 1 [1,12,10,3] 0 2 31
447+ 63 O 2 0 [30, 5, 2, 0] 4 227 3 2 [7,7,7,7] 0 0 33
448+ 63 R 2 0 [28, 4, 4, 4] 2 91 15 1 [3,9,11,6] 0 1 31
449+ 64 O 2 0 [29, 2,16, 0] 4 255 3 0 [1,1,1,1] 0 0 32
450+ 64 R 1 0 [25, 5, 9,12] 4 - - - [-,-,-,-] - 3 32
451+ 65 O 2 0 [34, 0, 0,18] 4 224 3 1 [3,3,3,4] 0 0 28
452+ 65 R 1 0 [35, 0, 0, 6] 4 - - - [-,-,-,-] - 1 19
453+ 66 O 2 0 [37,10, 4, 7] 4 240 3 1 [14,10,3,4] 0 0 32
454+ 66 R 1 0 [34, 4, 7, 6] 4 - - - [-,-,-,-] - 2 29
455+ 67 O 2 0 [47, 0, 0, 5] 4 28 2 2 [7,7,7,0] 0 0 27
456+ 67 R 2 0 [40, 3, 2, 2] 4 32 1 2 [23,3,0,0] 0 3 33
457+ 68 O 2 0 [42, 2, 5, 5] 4 30 2 1 [15,2,10,15] 0 0 35
458+ 68 R 2 0 [35, 4, 4, 5] 4 33 4 2 [16,3,10,2] 0 3 34
459+ 69 O 2 0 [44, 4, 4, 5] 4 28 2 1 [10,10,10,0] 0 0 27
460+ 69 R 2 0 [36, 5, 4, 5] 4 32 2 2 [18,10,22,12] 0 3 36
461+ 70 O 2 0 [46, 3, 4, 6] 4 26 1 2 [0,23,31,7] 0 0 29
462+ 70 R 2 0 [39, 5, 4, 3] 4 31 9 2 [2,0,2,0] 0 1 30
463+ 71 O 2 0 [50, 0, 1, 6] 4 30 1 2 [0,6,21,0] 0 0 26
464+ 71 R 2 0 [39, 4, 4, 4] 1 31 3 2 [14,2,2,1] 0 1 31
465+ 72 O 2 0 [47, 2, 2, 5] 4 31 8 0 [3,3,3,4] 0 0 39
466+ 72 R 2 0 [40, 4, 4, 4] 4 32 6 2 [15,22,0,22] 0 2 24
467+ 73 O 2 0 [48, 2, 4, 5] 4 35 8 1 [4,1,14,7] 0 0 22
468+ 73 R 2 0 [40, 5, 4, 4] 1 35 8 1 [1,1,1,7] 0 0 24
469+ 74 O 2 0 [48, 6, 0, 5] 4 39 1 1 [7,2,5,4] 0 0 30
470+ 74 R 2 0 [41, 5, 7, 5] 1 38 8 2 [24,28,13,16] 0 2 27
471+ 75 O 2 0 [47, 0, 0, 5] 4 42 8 2 [1,5,14,0] 0 0 35
472+ 75 R 2 0 [46, 3, 3, 2] 4 41 1 2 [5,5,5,25] 0 0 25
473+ 76 O 2 0 [44, 4, 3, 6] 4 48 3 1 [5,1,15,15] 0 0 26
474+ 76 R 2 0 [41, 3, 4, 3] 4 47 15 2 [0,3,15,20] 0 2 33
475+ 77 O 2 0 [47, 1, 4, 4] 4 50 3 0 [1,3,4,2] 0 0 31
476+ 77 R 2 0 [39, 4, 4, 4] 3 51 0 2 [1,24,3,4] 0 0 32
477+ 78 O 2 0 [47, 1, 4, 4] 4 45 2 1 [15,15,2,5] 1 0 29
478+ 78 R 2 0 [39, 5, 4, 4] 1 48 16 2 [2,16,1,4] 0 1 29
479+ 79 O 2 0 [50, 3, 3, 2] 4 43 1 2 [4,25,30,11] 0 0 21
480+ 79 R 2 0 [41, 6, 4, 4] 4 44 9 2 [29,26,16,13] 0 1 28
481+ 80 O 2 0 [49, 0, 0, 0] 4 43 1 2 [25,24,10,0] 0 0 35
482+ 80 R 2 0 [43, 3, 2, 3] 4 44 7 2 [11,12,1,0] 0 2 23
483+ 81 O 2 0 [39, 5, 5, 3] 4 45 1 2 [26,29,26,27] 0 0 32
484+ 81 R 2 0 [39, 4, 7, 4] 4 44 1 2 [3,6,16,28] 0 2 24
485+ 82 O 2 0 [43, 1, 4, 2] 4 45 5 1 [14,6,4,4] 0 0 32
486+ 82 R 2 0 [42, 2, 3, 4] 4 45 1 2 [14,1,2,2] 0 0 25
487+ 83 O 2 0 [42, 1, 3, 8] 4 45 1 2 [3,15,26,27] 0 0 33
488+ 83 R 2 0 [38, 4, 4, 4] 4 45 2 2 [12,17,15,8] 0 1 18
489+ 84 O 2 0 [43, 0, 2, 1] 4 44 8 2 [19,14,18,10] 0 0 32
490+ 84 R 2 0 [40, 4, 2, 2] 2 44 5 1 [11,13,2,2] 0 0 30
491+ 85 O 2 0 [40, 2, 2, 1] 4 245 3 2 [7,7,7,7] 0 0 26
492+ 85 R 2 0 [36, 6, 4, 1] 2 47 7 0 [7,4,0,0] 0 1 32
493+ 86 O 2 0 [29, 3, 3, 5] 4 115 3 0 [1,1,0,4] 0 0 25
494+ 86 R 1 1 [33, 1, 3, 3] 4 - - - [-,-,-,-] - 2 32
495+ 87 O 0 0 [27, 3, 6, 6] 4 - - - [-,-,-,-] - 0 40
496+ 87 R 1 1 [28, 5, 5, 5] 0 - - - [-,-,-,-] - 3 34
497+ 88 O 1 1 [36, 6, 7, 3] 4 - - - [-,-,-,-] - 0 23
498+ 88 R 1 0 [34, 5, 7, 6] 2 - - - [-,-,-,-] - 0 26
499+ 89 O 2 0 [30, 1, 0, 0] 4 127 3 0 [1,1,1,7] 0 0 27
500+ 89 R 1 0 [41, 0, 0, 0] 4 - - - [-,-,-,-] - 0 20
501+ 90 O 2 0 [17, 2, 5, 1] 4 246 3 1 [3,3,3,3] 0 0 34
502+ 90 R 0 0 [25, 0, 2, 3] 1 - - - [-,-,-,-] - 1 14
503+ 91 O 2 0 [17,21, 6, 3] 4 128 3 1 [15,3,3,6] 1 0 32
504+ 91 R 1 0 [16, 8,17, 7] 1 - - - [-,-,-,-] - 1 28
505+ 92 O 2 0 [36, 6, 2, 5] 4 231 3 1 [14,3,3,3] 0 0 24
506+ 92 R 1 0 [36, 4, 4, 4] 1 - - - [-,-,-,-] - 0 25
507+ 93 O 1 1 [39, 4, 3, 2] 4 - - - [-,-,-,-] - 0 32
508+ 93 R 1 1 [36, 5, 5, 4] 3 - - - [-,-,-,-] - 2 36
509+ 94 O 2 0 [40, 3, 5, 3] 4 26 2 1 [12,3,9,10] 0 0 33
510+ 94 R 1 1 [37, 4, 4, 4] 4 - - - [-,-,-,-] - 0 35
511+ 95 O 2 0 [41, 4, 7, 1] 4 30 2 2 [27,25,31,0] 0 0 31
512+ 95 R 2 0 [38, 4, 4, 5] 4 32 1 1 [3,0,8,1] 0 1 36
513+ 96 O 2 0 [44, 6, 0, 2] 4 26 11 2 [8,1,26,17] 0 0 38
514+ 96 R 2 0 [39, 4, 6, 4] 4 28 14 2 [19,16,17,4] 0 1 29
515+ 97 O 2 0 [45, 0, 7, 0] 4 23 9 2 [8,14,1,1] 0 0 28
516+ 97 R 2 0 [41, 4, 4, 3] 4 24 9 2 [6,8,21,1] 0 0 23
517+ 98 O 2 0 [46, 1, 2, 1] 4 18 2 2 [31,7,31,18] 0 0 24
518+ 98 R 2 0 [39, 3, 2, 2] 2 21 9 2 [14,14,18,3] 0 2 31
519+ 99 O 2 0 [41, 2, 4, 4] 4 14 2 1 [3,3,3,15] 0 0 34
520+ 99 R 2 0 [33, 3, 3, 4] 4 19 9 1 [11,6,14,5] 0 1 30
521+
522+=== divergence summary (all frames) ===
523+frames compared: 6000
524+signal_type mismatch: 2778 (46.3%)
525+quant_offset mismatch: 1920 (32.0%)
526+avg |gain diff| per subframe: 2.67
527+nlsf_interp mismatch: 1606 (26.8%)
528+voiced_both: 2913
529+ LTP per_index mismatch: 1777 (61.0%)
530+ avg |ltp_index diff| per subframe: 9.66
531+ avg |lag diff|: 11.56
532+total bytes: ours=180009 ref=164253 ratio=1.096
lanes/opus-silkq-r1.seconds.txtadded+655 -0
@@ -0,0 +1,655 @@
1+# reelm@12k SILK per-second diagnostic (r1)
2+# mono, 120s cap, 20ms frames, VBR constrained, 48kHz, Application::Voip
3+# total frames: ours=6000 ref=6001
4+# avg corr: ours=0.8197 ref=0.8010 gap=-0.0186 ref_kbps=12.0 ours_kbps=12.4
5+
6+# sec corr_o corr_r gap gain_idx_mean voiced_n nlsf_interp avg_B_o avg_B_r ltp_gain_mean pitch_l_mean
7+0 0.8247 0.8502 +0.0255 23.3 38 4 30.0 26.0 0.469 179.4
8+1 0.9198 0.9268 +0.0070 36.3 45 4 30.1 28.8 0.753 113.8
9+2 0.8531 0.9519 +0.0988 33.5 50 4 29.9 29.1 0.785 120.0
10+3 0.5669 0.9353 +0.3684 38.3 50 4 30.6 31.2 0.850 97.2
11+4 0.8177 0.9165 +0.0988 25.0 49 4 29.2 24.9 0.723 172.3
12+5 0.9809 0.8886 -0.0923 16.3 47 4 30.0 24.1 0.567 172.2
13+6 0.7734 0.6995 -0.0738 32.8 40 4 30.0 29.1 0.570 121.8
14+7 0.9481 0.9396 -0.0085 20.5 49 4 29.9 24.3 0.725 173.5
15+8 0.8356 0.6833 -0.1523 38.0 46 4 30.2 29.1 0.774 95.3
16+9 0.7899 0.8454 +0.0556 36.8 49 4 29.8 24.9 0.748 150.7
17+10 0.8553 0.8014 -0.0539 31.1 35 4 29.9 28.5 0.519 153.2
18+11 0.9439 0.9069 -0.0370 37.4 45 4 29.9 30.2 0.774 67.2
19+12 0.9410 0.9599 +0.0188 34.5 48 4 30.0 27.5 0.761 94.3
20+13 0.9281 0.9249 -0.0032 27.4 47 4 30.0 25.7 0.616 153.4
21+14 0.9621 0.9618 -0.0003 18.4 48 4 29.9 24.1 0.647 171.2
22+15 0.7875 0.7502 -0.0373 38.4 39 4 30.0 30.1 0.637 100.2
23+16 0.5570 0.2079 -0.3491 28.7 45 4 30.0 28.2 0.632 138.9
24+17 0.5736 0.2644 -0.3092 32.7 48 4 29.8 30.2 0.686 132.6
25+18 0.7159 0.3400 -0.3759 27.8 44 4 30.0 26.5 0.573 161.5
26+19 0.8888 0.7884 -0.1004 33.3 43 4 29.9 28.5 0.607 171.0
27+20 0.7558 0.3615 -0.3942 21.4 47 4 30.1 25.0 0.580 200.4
28+21 0.4141 0.9460 +0.5319 28.5 44 4 29.8 25.0 0.608 143.2
29+22 0.9322 0.9264 -0.0057 36.2 48 4 30.1 29.7 0.774 117.4
30+23 0.8556 0.8269 -0.0286 34.6 45 4 29.8 29.5 0.748 147.3
31+24 0.9114 0.9419 +0.0305 31.2 48 4 30.1 29.3 0.736 144.4
32+25 0.8961 0.8377 -0.0584 34.3 46 4 29.8 28.7 0.663 133.7
33+26 0.6878 0.8346 +0.1468 34.4 46 4 29.9 28.6 0.683 126.1
34+27 0.8907 0.9581 +0.0674 26.3 47 4 30.1 25.8 0.736 129.8
35+28 0.7228 0.5837 -0.1391 30.0 38 4 29.8 27.9 0.431 158.9
36+29 0.7742 0.6401 -0.1341 37.9 45 4 29.9 30.1 0.758 101.3
37+30 0.8782 0.7973 -0.0809 21.8 40 4 30.1 27.0 0.495 228.0
38+31 0.7263 0.4536 -0.2726 36.2 42 4 29.8 30.1 0.620 135.2
39+32 0.7227 0.5152 -0.2074 25.1 43 4 30.0 26.3 0.479 198.4
40+33 0.8002 0.7558 -0.0444 32.0 42 4 30.0 28.0 0.578 128.6
41+34 0.9353 0.9336 -0.0017 34.5 49 4 29.9 29.2 0.713 130.7
42+35 0.7784 0.6648 -0.1136 27.9 39 4 30.0 28.3 0.563 181.1
43+36 0.2867 0.4971 +0.2104 35.1 41 4 30.0 28.7 0.571 148.1
44+37 0.7839 0.7338 -0.0501 37.5 42 4 30.0 29.2 0.641 150.4
45+38 0.9043 0.8528 -0.0515 35.5 46 4 29.7 29.9 0.697 98.2
46+39 0.6942 0.9528 +0.2586 32.6 47 4 30.0 27.4 0.750 132.1
47+40 0.8157 0.7343 -0.0814 35.4 36 4 30.0 29.7 0.568 142.4
48+41 0.9648 0.9464 -0.0184 35.7 48 4 29.9 29.3 0.777 101.8
49+42 0.9616 0.9304 -0.0312 34.0 50 4 30.0 28.6 0.817 108.6
50+43 0.8211 0.6608 -0.1603 41.0 42 4 29.9 30.2 0.714 88.9
51+44 0.9500 0.9115 -0.0385 32.2 37 4 29.9 27.8 0.627 109.4
52+45 0.9727 0.9346 -0.0381 35.6 50 4 29.9 28.9 0.876 94.8
53+46 0.9174 0.9251 +0.0077 33.1 39 4 30.3 28.4 0.583 119.7
54+47 0.8824 0.8356 -0.0469 37.0 38 4 29.6 29.1 0.553 105.4
55+48 0.7033 0.6620 -0.0413 37.1 44 4 30.0 30.1 0.656 116.0
56+49 0.8185 0.7615 -0.0571 37.4 44 4 29.9 28.6 0.614 150.2
57+50 0.9593 0.9530 -0.0063 27.4 47 4 30.1 26.9 0.652 134.2
58+51 0.6141 0.9269 +0.3128 39.5 50 4 30.0 29.4 0.845 107.0
59+52 0.5787 0.7970 +0.2183 38.0 40 4 29.7 30.0 0.620 131.1
60+53 0.3918 0.3167 -0.0751 25.7 34 4 29.9 24.7 0.295 169.8
61+54 0.8613 0.8378 -0.0235 38.0 43 4 30.0 29.2 0.684 105.6
62+55 0.9282 0.9403 +0.0121 32.8 48 4 29.9 26.1 0.733 103.3
63+56 0.8919 0.9074 +0.0156 41.6 48 4 29.9 30.3 0.716 111.4
64+57 0.8958 0.8877 -0.0081 40.5 45 4 29.9 30.5 0.759 100.4
65+58 0.6867 0.9279 +0.2412 38.1 44 4 30.2 26.8 0.700 124.9
66+59 0.6639 0.6228 -0.0412 31.5 38 4 29.8 28.9 0.534 186.4
67+60 0.8885 0.8682 -0.0203 36.9 44 4 30.2 28.9 0.717 107.9
68+61 0.9123 0.8184 -0.0939 34.3 46 4 29.7 27.6 0.741 128.9
69+62 0.9189 0.9456 +0.0266 28.4 49 4 30.1 27.0 0.667 142.2
70+63 0.9281 0.9344 +0.0063 36.2 48 4 29.8 29.0 0.801 93.8
71+64 0.8017 0.8734 +0.0716 40.5 44 4 29.8 29.9 0.698 150.5
72+65 0.8081 0.9124 +0.1043 38.1 46 4 30.4 28.5 0.718 124.9
73+66 0.7671 0.9463 +0.1792 26.3 48 4 30.0 26.7 0.648 143.2
74+67 0.8860 0.9326 +0.0465 28.6 41 4 29.5 28.1 0.569 188.7
75+68 0.8851 0.8452 -0.0399 38.2 45 4 29.9 29.5 0.701 119.5
76+69 0.6321 0.9361 +0.3040 36.3 45 4 30.0 29.1 0.667 124.2
77+70 0.9286 0.9480 +0.0195 33.3 48 4 30.1 28.6 0.742 113.6
78+71 0.9244 0.9362 +0.0118 37.2 47 4 29.9 29.7 0.787 131.8
79+72 0.9428 0.9102 -0.0326 32.4 45 4 29.7 29.2 0.706 104.7
80+73 0.9506 0.9439 -0.0067 39.0 50 4 30.1 29.9 0.901 88.7
81+74 0.9256 0.9084 -0.0171 28.0 48 4 29.8 28.1 0.526 140.0
82+75 0.9336 0.9484 +0.0148 27.1 50 4 30.1 25.7 0.668 160.4
83+76 0.8474 0.8076 -0.0398 40.9 37 4 29.9 30.5 0.599 89.4
84+77 0.9612 0.9439 -0.0173 30.2 45 4 29.9 27.5 0.689 129.4
85+78 0.9306 0.9444 +0.0138 28.1 47 4 30.1 25.9 0.678 142.4
86+79 0.7988 0.7307 -0.0681 38.5 45 4 30.1 30.2 0.684 126.7
87+80 0.7712 0.6911 -0.0801 26.2 43 4 29.7 26.1 0.555 181.9
88+81 0.9580 0.9279 -0.0301 28.6 46 4 29.9 28.0 0.648 134.0
89+82 0.7799 0.7055 -0.0743 39.7 41 4 30.0 29.4 0.597 136.0
90+83 0.7745 0.7672 -0.0073 40.2 42 4 29.9 30.7 0.612 119.7
91+84 0.8723 0.8918 +0.0195 38.0 48 4 30.0 29.5 0.750 84.3
92+85 0.7744 0.6859 -0.0885 31.5 45 4 29.9 29.0 0.649 134.2
93+86 0.9394 0.9442 +0.0048 38.7 47 4 30.1 29.7 0.777 111.8
94+87 0.6874 0.7982 +0.1108 40.7 43 4 29.8 29.2 0.577 129.6
95+88 0.7890 0.5988 -0.1902 35.8 40 4 29.9 29.9 0.612 126.0
96+89 0.8913 0.8625 -0.0288 35.4 49 4 30.0 28.4 0.664 144.2
97+90 0.9782 0.9556 -0.0226 32.4 37 4 30.1 30.0 0.510 179.0
98+91 0.9731 0.9647 -0.0084 40.6 49 4 29.9 29.5 0.865 93.7
99+92 0.8500 0.8520 +0.0020 35.5 46 4 29.9 27.8 0.632 140.5
100+93 0.6905 0.5236 -0.1668 14.2 49 4 29.9 21.6 0.556 229.3
101+94 0.8003 0.7910 -0.0093 27.0 42 4 30.0 25.9 0.504 172.8
102+95 0.7230 0.5845 -0.1385 39.5 40 4 29.9 29.4 0.582 123.5
103+96 0.7994 0.6902 -0.1091 40.6 46 4 30.1 29.8 0.750 106.5
104+97 0.9464 0.9284 -0.0180 33.1 49 4 29.8 28.6 0.683 127.0
105+98 0.8912 0.8138 -0.0774 34.4 45 4 30.1 29.5 0.698 128.4
106+99 0.7576 0.7480 -0.0096 35.3 45 4 29.9 30.7 0.658 161.6
107+100 0.7547 0.5699 -0.1848 38.6 45 4 30.0 30.0 0.723 136.2
108+101 0.8651 0.8328 -0.0323 33.4 43 4 29.8 29.3 0.672 188.6
109+102 0.8473 0.7527 -0.0946 35.3 43 4 30.0 29.7 0.649 101.3
110+103 0.8296 0.7442 -0.0854 36.4 44 4 30.2 29.4 0.579 153.4
111+104 0.7923 0.7224 -0.0699 28.1 40 4 29.7 27.4 0.486 193.9
112+105 0.9536 0.9237 -0.0299 37.4 46 4 30.1 29.5 0.714 109.5
113+106 0.6510 0.8945 +0.2435 41.5 43 4 30.0 29.3 0.715 101.4
114+107 0.9480 0.9271 -0.0209 36.5 50 4 29.9 28.7 0.743 103.6
115+108 0.9425 0.8806 -0.0619 29.2 47 4 29.8 28.6 0.634 162.3
116+109 0.8979 0.9130 +0.0151 25.7 47 4 30.0 27.4 0.511 211.8
117+110 0.4876 0.4715 -0.0161 37.2 45 4 30.0 29.2 0.595 144.8
118+111 0.6997 0.5212 -0.1786 28.9 41 4 29.9 27.6 0.540 184.0
119+112 0.5363 0.9487 +0.4124 34.0 47 4 29.9 29.5 0.769 108.7
120+113 0.9393 0.9127 -0.0267 23.7 48 4 30.0 26.7 0.619 165.7
121+114 0.9759 0.9356 -0.0403 24.7 48 4 29.9 26.8 0.596 150.0
122+115 0.6325 0.4761 -0.1564 39.9 33 4 30.1 29.4 0.507 108.7
123+116 0.6736 0.6310 -0.0427 38.4 42 4 29.9 29.5 0.588 131.7
124+117 0.7680 0.5467 -0.2213 34.7 42 4 30.0 29.4 0.563 147.5
125+118 0.8985 0.8687 -0.0297 32.8 45 4 29.9 29.5 0.601 166.3
126+119 0.9527 0.9166 -0.0361 28.6 49 4 30.0 27.1 0.693 172.1
127+
128+# --- 10 worst seconds by gap (per-frame SILK diag) ---
129+# frame t_ms B_o B_r voiced sig_type gain[0] lag_idx pitch_l nlsf_int ltp_gain nb_subfr
130+# second 21 gap=+0.5319
131+1050 21000 24 24 1 2 34 120 151 4 0.180 4
132+1051 21020 31 25 1 2 25 176 207 4 0.180 4
133+1052 21040 32 30 1 2 17 21 53 4 0.180 4
134+1053 21060 25 21 1 2 14 181 212 4 0.180 4
135+1054 21080 24 18 1 2 11 186 217 4 0.180 4
136+1055 21100 36 20 1 2 8 255 286 4 0.789 4
137+1056 21120 26 20 0 0 9 0 0 4 0.000 4
138+1057 21140 33 26 1 2 11 216 247 4 0.961 4
139+1058 21160 27 22 1 2 13 212 243 4 0.992 4
140+1059 21180 29 20 1 2 10 210 241 4 0.930 4
141+1060 21200 32 22 1 2 10 206 237 4 0.180 4
142+1061 21220 29 22 1 2 9 247 278 4 0.180 4
143+1062 21240 30 18 1 2 9 200 231 4 0.633 4
144+1063 21260 34 21 1 2 9 80 111 4 0.180 4
145+1064 21280 29 25 1 2 10 80 111 4 0.789 4
146+1065 21300 28 16 1 2 10 107 138 4 0.180 4
147+1066 21320 27 17 1 2 9 212 243 4 0.180 4
148+1067 21340 32 16 0 0 19 0 0 4 0.000 4
149+1068 21360 25 16 1 2 12 84 115 4 0.938 4
150+1069 21380 35 20 1 2 8 236 267 4 0.180 4
151+1070 21400 30 15 0 0 7 0 0 4 0.000 4
152+1071 21420 34 17 1 2 9 156 187 4 0.922 4
153+1072 21440 30 16 1 2 8 172 203 4 0.180 4
154+1073 21460 26 24 0 1 20 0 0 4 0.000 4
155+1074 21480 27 30 0 1 36 0 0 4 0.000 4
156+1075 21500 38 30 0 0 34 0 0 4 0.000 4
157+1076 21520 27 32 1 2 32 251 282 4 0.180 4
158+1077 21540 52 32 1 2 38 253 284 4 0.922 4
159+1078 21560 16 35 1 2 63 42 76 4 0.852 4
160+1079 21580 14 30 1 2 63 46 78 4 0.984 4
161+1080 21600 30 28 1 2 52 47 79 4 0.938 4
162+1081 21620 41 23 1 2 43 49 80 4 0.969 4
163+1082 21640 34 28 1 2 53 51 83 4 0.977 4
164+1083 21660 14 34 1 2 63 51 82 4 0.789 4
165+1084 21680 17 33 1 2 10 47 77 4 0.938 4
166+1085 21700 50 33 1 2 28 43 75 4 0.852 4
167+1086 21720 23 30 1 2 41 45 77 4 0.992 4
168+1087 21740 42 29 1 2 38 46 78 4 0.969 4
169+1088 21760 34 28 1 2 44 47 79 4 0.984 4
170+1089 21780 24 28 1 2 44 48 79 4 0.938 4
171+1090 21800 35 32 1 2 44 48 79 4 0.938 4
172+1091 21820 30 20 1 2 42 49 80 4 0.938 4
173+1092 21840 31 33 1 2 39 47 79 4 0.852 4
174+1093 21860 29 36 1 2 41 49 80 4 0.852 4
175+1094 21880 30 27 1 2 40 49 80 4 0.852 4
176+1095 21900 34 25 1 2 41 49 81 4 0.789 4
177+1096 21920 16 34 1 2 57 51 82 4 0.938 4
178+1097 21940 16 30 1 2 53 52 83 4 0.938 4
179+1098 21960 41 22 1 2 42 53 84 4 0.969 4
180+1099 21980 38 19 1 2 44 53 84 4 0.969 4
181+
182+# second 112 gap=+0.4124
183+5600 112000 32 20 1 2 10 138 169 4 0.180 4
184+5601 112020 30 22 1 2 11 241 272 4 0.984 4
185+5602 112040 26 22 1 2 12 237 268 4 0.633 4
186+5603 112060 33 21 1 2 29 159 190 4 1.039 4
187+5604 112080 31 36 1 2 37 49 80 4 0.852 4
188+5605 112100 28 34 1 2 38 52 83 4 0.969 4
189+5606 112120 31 36 1 2 42 53 84 4 0.852 4
190+5607 112140 33 28 1 2 37 53 84 4 0.938 4
191+5608 112160 28 32 1 2 34 53 84 4 0.852 4
192+5609 112180 31 30 1 2 31 49 81 4 0.789 4
193+5610 112200 25 25 1 2 29 219 250 4 0.789 4
194+5611 112220 32 25 1 2 29 216 247 4 0.961 4
195+5612 112240 41 42 1 2 36 50 81 4 0.938 4
196+5613 112260 28 36 1 2 42 56 87 4 0.938 4
197+5614 112280 25 38 1 2 41 60 91 4 0.992 4
198+5615 112300 27 30 1 2 41 59 90 4 0.977 4
199+5616 112320 32 31 1 2 44 59 90 4 0.992 4
200+5617 112340 31 31 1 2 38 57 88 4 0.938 4
201+5618 112360 34 35 1 2 40 56 87 4 0.938 4
202+5619 112380 24 33 1 2 40 55 86 4 0.969 4
203+5620 112400 29 27 1 2 37 56 87 4 0.633 4
204+5621 112420 29 31 1 2 35 39 69 4 0.961 4
205+5622 112440 34 35 1 2 41 52 83 4 0.852 4
206+5623 112460 36 32 1 2 47 54 85 4 0.969 4
207+5624 112480 14 25 1 2 63 54 85 4 0.984 4
208+5625 112500 37 21 1 2 12 52 83 4 0.852 4
209+5626 112520 40 24 1 2 40 51 82 4 0.938 4
210+5627 112540 22 27 1 2 48 50 81 4 0.938 4
211+5628 112560 35 29 1 2 46 49 81 4 0.992 4
212+5629 112580 24 23 1 2 48 47 79 4 0.977 4
213+5630 112600 42 24 1 2 47 45 77 4 0.969 4
214+5631 112620 22 26 1 2 58 43 75 4 0.977 4
215+5632 112640 29 31 1 2 45 41 75 4 0.992 4
216+5633 112660 29 33 1 2 42 39 71 4 0.938 4
217+5634 112680 28 34 1 2 38 38 69 4 0.852 4
218+5635 112700 30 29 1 2 28 38 70 4 0.789 4
219+5636 112720 27 20 1 2 20 37 69 4 0.789 4
220+5637 112740 30 28 1 2 20 111 142 4 0.180 4
221+5638 112760 23 32 1 2 25 254 285 4 0.852 4
222+5639 112780 36 33 0 0 23 0 0 4 0.000 4
223+5640 112800 27 32 1 2 27 255 286 4 0.984 4
224+5641 112820 28 30 1 2 28 255 286 4 0.930 4
225+5642 112840 35 30 0 0 27 0 0 4 0.000 4
226+5643 112860 26 31 0 1 28 0 0 4 0.000 4
227+5644 112880 31 30 1 2 29 3 36 4 0.922 4
228+5645 112900 32 32 1 2 28 0 33 4 0.180 4
229+5646 112920 29 32 1 2 28 0 32 4 0.180 4
230+5647 112940 28 33 1 2 29 0 33 4 0.930 4
231+5648 112960 35 24 1 2 26 0 32 4 0.180 4
232+5649 112980 26 31 1 2 28 1 33 4 0.180 4
233+
234+# second 3 gap=+0.3684
235+150 3000 29 31 1 2 34 40 73 4 0.789 4
236+151 3020 33 33 1 2 40 39 71 4 0.938 4
237+152 3040 32 34 1 2 44 39 70 4 0.180 4
238+153 3060 25 29 1 2 50 40 70 4 0.984 4
239+154 3080 31 29 1 2 48 40 72 4 0.969 4
240+155 3100 33 33 1 2 43 40 72 4 0.938 4
241+156 3120 21 32 1 2 41 39 71 4 0.180 4
242+157 3140 31 22 1 2 38 39 71 4 0.180 4
243+158 3160 33 29 1 2 35 42 74 4 0.789 4
244+159 3180 28 34 1 2 30 48 80 4 0.852 4
245+160 3200 29 33 1 2 44 44 76 4 0.992 4
246+161 3220 31 29 1 2 40 44 76 4 0.938 4
247+162 3240 29 22 1 2 40 46 78 4 0.938 4
248+163 3260 34 24 1 2 37 50 81 4 0.852 4
249+164 3280 27 26 1 2 34 52 83 4 0.852 4
250+165 3300 29 22 1 2 33 51 82 4 0.180 4
251+166 3320 29 35 1 2 32 50 81 4 0.180 4
252+167 3340 26 31 1 2 37 51 82 4 0.789 4
253+168 3360 31 37 1 2 37 51 82 4 0.852 4
254+169 3380 30 34 1 2 34 54 85 4 0.969 4
255+170 3400 34 40 1 2 37 51 83 4 0.789 4
256+171 3420 28 31 1 2 36 52 83 4 0.836 4
257+172 3440 27 30 1 2 33 52 83 4 0.922 4
258+173 3460 36 34 1 2 31 53 84 4 0.992 4
259+174 3480 24 32 1 2 31 54 85 4 0.930 4
260+175 3500 29 31 1 2 34 51 82 4 0.984 4
261+176 3520 32 33 1 2 37 50 81 4 0.977 4
262+177 3540 32 32 1 2 34 49 81 4 0.992 4
263+178 3560 30 30 1 2 36 47 79 4 0.992 4
264+179 3580 31 34 1 2 36 48 79 4 0.984 4
265+180 3600 29 31 1 2 36 47 79 4 0.930 4
266+181 3620 33 39 1 2 38 47 79 4 0.922 4
267+182 3640 28 35 1 2 38 47 80 4 0.992 4
268+183 3660 30 32 1 2 40 46 78 4 0.992 4
269+184 3680 31 32 1 2 42 47 79 4 0.992 4
270+185 3700 23 31 1 2 43 50 81 4 0.938 4
271+186 3720 36 34 1 2 40 51 82 4 0.938 4
272+187 3740 15 31 1 2 63 51 82 4 0.938 4
273+188 3760 50 33 1 2 15 53 84 4 0.938 4
274+189 3780 24 32 1 2 43 55 86 4 0.969 4
275+190 3800 38 29 1 2 40 57 88 4 0.930 4
276+191 3820 29 32 1 2 41 146 177 4 0.938 4
277+192 3840 35 29 1 2 39 150 181 4 0.984 4
278+193 3860 23 27 1 2 43 151 182 4 0.789 4
279+194 3880 35 36 1 2 41 153 184 4 0.992 4
280+195 3900 32 33 1 2 43 149 180 4 0.938 4
281+196 3920 14 26 1 2 63 147 178 4 0.938 4
282+197 3940 68 31 1 2 19 146 177 4 0.969 4
283+198 3960 15 30 1 2 63 145 176 4 0.789 4
284+199 3980 48 30 1 2 11 144 175 4 0.969 4
285+
286+# second 51 gap=+0.3128
287+2550 51000 14 34 1 2 60 39 71 4 0.969 4
288+2551 51020 50 32 1 2 57 41 73 4 0.969 4
289+2552 51040 18 30 1 2 63 42 76 4 0.969 4
290+2553 51060 37 34 1 2 49 43 75 4 0.969 4
291+2554 51080 35 34 1 2 47 43 76 4 0.992 4
292+2555 51100 28 28 1 2 46 42 74 4 0.969 4
293+2556 51120 26 26 1 2 44 41 74 4 0.852 4
294+2557 51140 22 23 1 2 39 41 76 4 0.992 4
295+2558 51160 35 30 1 2 39 40 73 4 0.852 4
296+2559 51180 29 27 1 2 41 39 71 4 0.852 4
297+2560 51200 39 24 1 2 36 39 71 4 0.852 4
298+2561 51220 21 33 1 2 40 38 70 4 0.852 4
299+2562 51240 29 19 1 2 38 37 69 4 0.852 4
300+2563 51260 29 28 1 2 38 37 69 4 0.961 4
301+2564 51280 35 25 1 2 37 37 69 4 0.836 4
302+2565 51300 29 22 1 2 36 37 69 4 0.836 4
303+2566 51320 32 26 1 2 37 38 70 4 0.930 4
304+2567 51340 33 38 1 2 33 39 71 4 0.789 4
305+2568 51360 24 35 1 2 32 40 75 4 0.969 4
306+2569 51380 33 25 1 2 25 38 71 4 0.180 4
307+2570 51400 24 20 1 2 18 40 75 4 0.789 4
308+2571 51420 32 35 1 2 25 145 176 4 1.039 4
309+2572 51440 23 28 1 2 45 241 272 4 0.922 4
310+2573 51460 36 32 1 2 44 244 275 4 0.938 4
311+2574 51480 30 28 1 2 42 28 60 4 0.938 4
312+2575 51500 29 29 1 2 38 41 76 4 0.992 4
313+2576 51520 31 36 1 2 28 47 79 4 0.789 4
314+2577 51540 30 28 1 2 24 45 77 4 0.992 4
315+2578 51560 31 27 1 2 17 226 257 4 0.180 4
316+2579 51580 28 20 1 2 15 195 226 4 0.180 4
317+2580 51600 32 31 1 2 38 23 53 4 0.938 4
318+2581 51620 30 39 1 2 44 39 69 4 0.938 4
319+2582 51640 28 36 1 2 45 46 76 4 0.992 4
320+2583 51660 33 23 1 2 46 48 79 4 0.969 4
321+2584 51680 29 21 1 2 43 48 79 4 0.992 4
322+2585 51700 28 25 1 2 44 47 79 4 0.984 4
323+2586 51720 31 29 1 2 46 46 78 4 0.984 4
324+2587 51740 33 38 1 2 43 48 79 4 0.852 4
325+2588 51760 30 40 1 2 33 47 79 4 0.992 4
326+2589 51780 30 33 1 2 37 47 77 4 0.852 4
327+2590 51800 28 28 1 2 33 43 76 4 0.836 4
328+2591 51820 30 31 1 2 29 226 257 4 0.961 4
329+2592 51840 37 34 1 2 39 51 83 4 0.938 4
330+2593 51860 22 23 1 2 45 52 83 4 0.852 4
331+2594 51880 24 25 1 2 43 57 88 4 1.039 4
332+2595 51900 56 33 1 2 37 57 88 4 0.789 4
333+2596 51920 18 35 1 2 54 229 260 4 0.180 4
334+2597 51940 15 25 1 2 63 200 231 4 0.992 4
335+2598 51960 15 36 1 2 63 210 241 4 0.180 4
336+2599 51980 61 31 1 2 15 146 177 4 0.789 4
337+
338+# second 69 gap=+0.3040
339+3450 69000 30 34 1 2 34 220 251 4 0.180 4
340+3451 69020 32 21 1 2 31 30 62 4 0.992 4
341+3452 69040 50 33 1 2 36 42 75 4 0.930 4
342+3453 69060 22 27 1 2 45 46 78 4 0.992 4
343+3454 69080 35 31 1 2 46 48 79 4 0.977 4
344+3455 69100 14 23 1 2 54 48 80 4 0.938 4
345+3456 69120 16 32 1 2 63 49 80 4 0.938 4
346+3457 69140 35 23 1 2 49 48 80 4 0.938 4
347+3458 69160 41 31 1 2 42 48 79 4 0.938 4
348+3459 69180 15 22 1 2 58 48 80 4 0.938 4
349+3460 69200 56 24 1 2 45 48 79 4 0.938 4
350+3461 69220 19 28 1 2 45 48 79 4 0.938 4
351+3462 69240 29 32 1 2 40 47 79 4 0.984 4
352+3463 69260 28 25 1 2 42 47 79 4 0.938 4
353+3464 69280 21 36 1 2 44 46 78 4 0.969 4
354+3465 69300 39 31 1 2 45 46 78 4 1.039 4
355+3466 69320 35 27 1 2 43 46 78 4 0.984 4
356+3467 69340 28 34 1 2 42 47 81 4 0.930 4
357+3468 69360 27 34 1 2 38 134 165 4 0.984 4
358+3469 69380 27 23 1 2 29 226 257 4 0.836 4
359+3470 69400 26 21 1 2 26 222 253 4 0.180 4
360+3471 69420 41 25 1 2 15 227 258 4 0.180 4
361+3472 69440 27 23 1 2 14 24 54 4 0.992 4
362+3473 69460 30 32 1 2 33 122 153 4 0.852 4
363+3474 69480 32 37 1 2 36 47 79 4 0.922 4
364+3475 69500 29 38 1 2 31 46 78 4 0.180 4
365+3476 69520 27 29 1 2 31 47 80 4 0.852 4
366+3477 69540 27 26 1 2 31 48 79 4 0.852 4
367+3478 69560 32 37 1 2 31 47 81 4 0.180 4
368+3479 69580 25 37 0 1 39 0 0 4 0.000 4
369+3480 69600 37 32 1 2 42 244 275 4 0.180 4
370+3481 69620 29 30 1 2 42 242 273 4 0.180 4
371+3482 69640 26 31 1 2 44 241 272 4 0.938 4
372+3483 69660 33 32 0 0 41 0 0 4 0.000 4
373+3484 69680 33 32 1 2 37 39 70 4 0.852 4
374+3485 69700 29 26 1 2 37 42 73 4 0.852 4
375+3486 69720 31 30 1 2 30 242 273 4 0.180 4
376+3487 69740 27 26 1 2 19 41 73 4 0.180 4
377+3488 69760 28 21 1 2 13 236 267 4 0.180 4
378+3489 69780 35 18 1 2 11 146 177 4 0.961 4
379+3490 69800 26 29 1 2 26 68 99 4 0.969 4
380+3491 69820 32 35 1 2 32 39 69 4 0.852 4
381+3492 69840 32 33 1 2 36 45 77 4 0.969 4
382+3493 69860 31 30 1 2 35 54 85 4 0.789 4
383+3494 69880 28 23 1 2 22 50 81 4 0.789 4
384+3495 69900 28 27 0 0 24 0 0 4 0.000 4
385+3496 69920 26 38 0 1 41 0 0 4 0.000 4
386+3497 69940 34 34 1 2 42 242 273 4 0.836 4
387+3498 69960 30 31 0 1 45 0 0 4 0.000 4
388+3499 69980 30 23 1 2 37 4 38 4 0.180 4
389+
390+# second 39 gap=+0.2586
391+1950 39000 36 28 1 2 27 110 141 4 0.992 4
392+1951 39020 34 35 1 2 35 45 76 4 0.992 4
393+1952 39040 24 28 1 2 42 47 79 4 0.180 4
394+1953 39060 27 32 1 2 39 49 81 4 0.938 4
395+1954 39080 33 30 1 2 39 49 80 4 0.852 4
396+1955 39100 32 28 1 2 38 50 81 4 0.852 4
397+1956 39120 32 35 1 2 39 50 81 4 0.984 4
398+1957 39140 34 33 1 2 42 51 82 4 0.938 4
399+1958 39160 27 24 1 2 46 54 85 4 0.922 4
400+1959 39180 31 36 1 2 40 55 86 4 0.922 4
401+1960 39200 32 31 1 2 37 53 84 4 0.180 4
402+1961 39220 28 32 1 2 36 242 273 4 0.180 4
403+1962 39240 31 26 1 2 24 238 269 4 0.180 4
404+1963 39260 23 26 0 0 24 0 0 4 0.000 4
405+1964 39280 26 22 0 0 28 0 0 4 0.000 4
406+1965 39300 35 29 1 2 32 220 251 4 0.938 4
407+1966 39320 29 34 0 0 34 0 0 4 0.000 4
408+1967 39340 32 34 1 2 39 48 80 4 0.789 4
409+1968 39360 29 35 1 2 40 52 83 4 0.992 4
410+1969 39380 30 28 1 2 37 53 84 4 0.836 4
411+1970 39400 32 27 1 2 37 54 85 4 0.852 4
412+1971 39420 40 31 1 2 39 56 87 4 0.852 4
413+1972 39440 28 23 1 2 43 57 88 4 0.852 4
414+1973 39460 29 30 1 2 42 57 88 4 0.938 4
415+1974 39480 15 26 1 2 63 59 90 4 0.992 4
416+1975 39500 36 24 1 2 12 58 89 4 0.969 4
417+1976 39520 32 27 1 2 38 57 88 4 0.977 4
418+1977 39540 34 20 1 2 38 56 87 4 0.938 4
419+1978 39560 25 22 1 2 36 56 87 4 0.969 4
420+1979 39580 29 21 1 2 36 56 87 4 0.969 4
421+1980 39600 44 31 1 2 39 219 250 4 0.938 4
422+1981 39620 21 34 1 2 46 143 174 4 0.852 4
423+1982 39640 26 32 1 2 43 155 186 4 0.938 4
424+1983 39660 35 22 1 2 42 142 173 4 0.789 4
425+1984 39680 28 28 1 2 34 106 137 4 0.938 4
426+1985 39700 29 28 1 2 32 105 136 4 0.984 4
427+1986 39720 26 28 1 2 30 35 67 4 0.930 4
428+1987 39740 34 27 1 2 23 221 252 4 0.969 4
429+1988 39760 30 24 1 2 22 193 224 4 0.180 4
430+1989 39780 24 22 1 2 13 189 220 4 0.180 4
431+1990 39800 33 20 1 2 13 26 61 4 0.789 4
432+1991 39820 29 21 1 2 10 237 268 4 0.180 4
433+1992 39840 27 21 1 2 9 129 160 4 0.180 4
434+1993 39860 28 21 1 2 8 230 261 4 0.992 4
435+1994 39880 29 22 1 2 7 174 205 4 0.836 4
436+1995 39900 30 17 1 2 5 234 265 4 0.992 4
437+1996 39920 36 22 1 2 29 24 56 4 0.969 4
438+1997 39940 37 39 1 2 37 47 79 4 0.984 4
439+1998 39960 23 35 1 2 44 49 80 4 0.969 4
440+1999 39980 28 21 1 2 44 50 81 4 0.938 4
441+
442+# second 106 gap=+0.2435
443+5300 106000 22 24 1 2 48 48 79 4 0.852 4
444+5301 106020 33 27 1 2 44 48 79 4 0.852 4
445+5302 106040 26 26 1 2 48 49 81 4 0.938 4
446+5303 106060 29 34 1 2 49 51 82 4 0.969 4
447+5304 106080 32 30 1 2 46 50 82 4 0.938 4
448+5305 106100 32 34 1 2 45 49 80 4 0.969 4
449+5306 106120 30 34 1 2 45 47 79 4 0.969 4
450+5307 106140 41 32 1 2 45 47 80 4 0.977 4
451+5308 106160 19 34 1 2 39 47 79 4 0.969 4
452+5309 106180 29 31 1 2 45 43 77 4 0.992 4
453+5310 106200 33 33 1 2 45 45 78 4 0.992 4
454+5311 106220 36 25 1 2 48 49 80 4 0.984 4
455+5312 106240 29 23 1 2 50 51 82 4 0.969 4
456+5313 106260 47 24 1 2 52 50 81 4 0.938 4
457+5314 106280 24 25 1 2 48 50 81 4 0.938 4
458+5315 106300 18 32 1 2 43 47 79 4 0.852 4
459+5316 106320 28 30 1 2 41 48 79 4 0.938 4
460+5317 106340 29 29 1 2 37 48 79 4 0.922 4
461+5318 106360 25 41 1 2 40 49 80 4 0.984 4
462+5319 106380 34 31 1 2 41 50 82 4 0.938 4
463+5320 106400 27 29 1 2 41 50 81 4 0.938 4
464+5321 106420 30 36 1 2 34 51 82 4 0.984 4
465+5322 106440 29 34 0 0 43 0 0 4 0.000 4
466+5323 106460 21 27 1 2 44 248 279 4 0.180 4
467+5324 106480 40 27 0 1 45 0 0 4 0.000 4
468+5325 106500 25 23 1 2 35 225 256 4 0.180 4
469+5326 106520 30 24 1 2 21 126 157 4 0.180 4
470+5327 106540 34 32 1 2 23 0 33 4 0.969 4
471+5328 106560 28 35 0 1 37 0 0 4 0.000 4
472+5329 106580 29 32 1 2 41 227 258 4 0.180 4
473+5330 106600 32 31 1 2 38 227 258 4 0.992 4
474+5331 106620 25 33 1 2 39 31 62 4 0.180 4
475+5332 106640 36 37 1 2 38 43 76 4 0.922 4
476+5333 106660 14 30 1 2 60 48 79 4 0.969 4
477+5334 106680 77 29 1 2 53 48 79 4 0.984 4
478+5335 106700 15 31 1 2 63 47 79 4 0.977 4
479+5336 106720 15 23 1 2 62 46 78 4 0.969 4
480+5337 106740 16 28 1 2 63 47 79 4 0.992 4
481+5338 106760 84 29 1 2 5 49 81 4 0.852 4
482+5339 106780 16 33 1 2 37 47 79 4 0.789 4
483+5340 106800 15 29 1 2 28 47 79 4 0.789 4
484+5341 106820 20 28 0 1 27 0 0 4 0.000 4
485+5342 106840 24 29 0 1 35 0 0 4 0.000 4
486+5343 106860 30 15 1 2 16 241 272 4 0.180 4
487+5344 106880 32 28 0 1 17 0 0 4 0.000 4
488+5345 106900 31 31 0 1 37 0 0 4 0.000 4
489+5346 106920 31 33 1 2 46 44 76 4 0.938 4
490+5347 106940 27 29 1 2 48 46 80 4 0.938 4
491+5348 106960 54 23 1 2 50 47 81 4 0.938 4
492+5349 106980 15 19 1 2 52 47 79 4 0.852 4
493+
494+# second 58 gap=+0.2412
495+2900 58000 28 28 1 2 46 37 70 4 0.969 4
496+2901 58020 35 36 1 2 42 38 69 4 0.938 4
497+2902 58040 35 31 1 2 31 39 73 4 0.938 4
498+2903 58060 26 25 0 0 40 0 0 4 0.000 4
499+2904 58080 26 32 1 2 44 116 147 4 0.180 4
500+2905 58100 29 32 1 2 46 247 278 4 0.180 4
501+2906 58120 28 29 0 0 43 0 0 4 0.000 4
502+2907 58140 34 28 0 0 37 0 0 4 0.000 4
503+2908 58160 28 29 0 0 33 0 0 4 0.000 4
504+2909 58180 35 27 1 2 28 213 244 4 0.180 4
505+2910 58200 31 28 0 0 26 0 0 4 0.000 4
506+2911 58220 32 23 1 2 36 33 62 4 0.930 4
507+2912 58240 28 28 1 2 43 40 71 4 0.984 4
508+2913 58260 37 25 1 2 45 43 76 4 0.969 4
509+2914 58280 27 25 1 2 48 44 76 4 1.039 4
510+2915 58300 28 23 1 2 45 46 78 4 0.992 4
511+2916 58320 31 22 1 2 48 46 78 4 0.992 4
512+2917 58340 14 20 1 2 61 47 79 4 0.984 4
513+2918 58360 16 28 1 2 63 48 80 4 0.984 4
514+2919 58380 57 21 1 2 56 49 80 4 0.992 4
515+2920 58400 52 19 1 2 46 50 81 4 0.992 4
516+2921 58420 13 20 1 2 63 50 81 4 0.969 4
517+2922 58440 34 26 1 2 55 50 81 4 0.992 4
518+2923 58460 20 22 1 2 50 50 81 4 0.969 4
519+2924 58480 35 33 1 2 41 49 80 4 0.938 4
520+2925 58500 31 25 1 2 38 47 80 4 0.852 4
521+2926 58520 23 22 1 2 38 45 77 4 0.922 4
522+2927 58540 24 35 1 2 47 49 80 4 0.992 4
523+2928 58560 44 29 1 2 41 159 190 4 0.180 4
524+2929 58580 24 28 1 2 35 250 281 4 0.180 4
525+2930 58600 27 27 1 2 25 207 238 4 0.180 4
526+2931 58620 26 25 1 2 17 165 196 4 0.180 4
527+2932 58640 35 21 1 2 14 241 272 4 0.180 4
528+2933 58660 28 26 1 2 14 237 268 4 0.180 4
529+2934 58680 26 24 0 0 13 0 0 4 0.000 4
530+2935 58700 35 20 1 2 13 218 249 4 0.852 4
531+2936 58720 26 19 1 2 14 221 252 4 0.836 4
532+2937 58740 36 32 1 2 20 217 248 4 0.984 4
533+2938 58760 29 32 1 2 22 39 69 4 0.938 4
534+2939 58780 31 27 1 2 21 42 77 4 0.836 4
535+2940 58800 23 22 1 2 20 208 239 4 0.789 4
536+2941 58820 35 29 1 2 33 39 71 4 0.992 4
537+2942 58840 39 36 1 2 39 43 77 4 0.938 4
538+2943 58860 24 28 1 2 45 45 77 4 0.984 4
539+2944 58880 28 33 1 2 49 46 78 4 0.984 4
540+2945 58900 31 27 1 2 47 48 79 4 0.969 4
541+2946 58920 36 27 1 2 44 50 81 4 0.969 4
542+2947 58940 34 29 1 2 47 51 82 4 0.938 4
543+2948 58960 27 32 1 2 48 52 83 4 0.992 4
544+2949 58980 27 26 1 2 47 56 87 4 1.039 4
545+
546+# second 52 gap=+0.2183
547+2600 52000 16 33 1 2 63 125 156 4 0.938 4
548+2601 52020 41 33 1 2 7 196 227 4 0.789 4
549+2602 52040 31 33 1 2 40 180 211 4 0.969 4
550+2603 52060 31 36 1 2 38 186 217 4 0.992 4
551+2604 52080 39 39 1 2 50 107 138 4 0.992 4
552+2605 52100 23 31 1 2 46 106 137 4 0.938 4
553+2606 52120 23 33 1 2 44 102 133 4 0.938 4
554+2607 52140 26 29 1 2 38 173 204 4 0.180 4
555+2608 52160 30 26 1 2 29 206 237 4 0.180 4
556+2609 52180 27 27 1 2 26 247 278 4 0.969 4
557+2610 52200 32 33 1 2 27 245 276 4 0.180 4
558+2611 52220 30 18 1 2 19 246 277 4 0.180 4
559+2612 52240 29 28 1 2 26 10 43 4 0.969 4
560+2613 52260 34 22 1 2 14 203 234 4 0.180 4
561+2614 52280 26 20 1 2 10 227 258 4 0.180 4
562+2615 52300 34 19 1 2 12 223 254 4 0.930 4
563+2616 52320 20 23 0 1 20 0 0 4 0.000 4
564+2617 52340 37 30 1 2 42 40 74 4 0.961 4
565+2618 52360 26 29 1 2 44 40 71 4 0.984 4
566+2619 52380 32 33 1 2 42 42 75 4 0.992 4
567+2620 52400 30 29 1 2 44 44 75 4 0.992 4
568+2621 52420 36 36 1 2 39 46 79 4 0.992 4
569+2622 52440 30 29 1 2 38 43 75 4 0.922 4
570+2623 52460 30 33 1 2 39 44 77 4 0.180 4
571+2624 52480 27 25 1 2 35 45 77 4 0.852 4
572+2625 52500 30 24 1 2 36 45 77 4 0.938 4
573+2626 52520 30 25 1 2 35 45 77 4 0.836 4
574+2627 52540 31 29 1 2 39 45 77 4 0.938 4
575+2628 52560 28 22 1 2 34 47 79 4 0.852 4
576+2629 52580 33 29 1 2 30 47 79 4 0.789 4
577+2630 52600 27 34 1 2 28 46 79 4 0.836 4
578+2631 52620 29 35 0 0 32 0 0 4 0.000 4
579+2632 52640 26 36 0 1 44 0 0 4 0.000 4
580+2633 52660 31 36 0 1 50 0 0 4 0.000 4
581+2634 52680 32 30 1 2 51 230 261 4 0.180 4
582+2635 52700 29 34 0 1 51 0 0 4 0.000 4
583+2636 52720 24 32 0 1 51 0 0 4 0.000 4
584+2637 52740 38 29 0 0 50 0 0 4 0.000 4
585+2638 52760 26 32 0 1 50 0 0 4 0.000 4
586+2639 52780 27 28 0 0 48 0 0 4 0.000 4
587+2640 52800 36 35 1 2 44 31 60 4 0.852 4
588+2641 52820 31 30 1 2 42 37 69 4 0.977 4
589+2642 52840 32 32 1 2 43 36 69 4 0.938 4
590+2643 52860 28 37 1 2 43 43 75 4 0.992 4
591+2644 52880 25 30 1 2 40 48 82 4 0.938 4
592+2645 52900 32 26 0 0 42 0 0 4 0.000 4
593+2646 52920 26 34 1 2 49 34 65 4 0.992 4
594+2647 52940 33 39 1 2 46 36 69 4 0.789 4
595+2648 52960 34 24 1 2 44 37 69 4 0.836 4
596+2649 52980 29 30 1 2 46 40 72 4 0.938 4
597+
598+# second 36 gap=+0.2104
599+1800 36000 24 23 0 0 43 0 0 4 0.000 4
600+1801 36020 40 33 1 2 38 42 71 4 0.789 4
601+1802 36040 35 25 1 2 41 47 79 4 0.789 4
602+1803 36060 41 27 1 2 50 49 80 4 0.938 4
603+1804 36080 14 32 1 2 55 49 80 4 0.852 4
604+1805 36100 12 33 1 2 63 53 84 4 0.180 4
605+1806 36120 15 30 1 2 16 124 155 4 0.180 4
606+1807 36140 52 28 1 2 28 48 79 4 0.969 4
607+1808 36160 36 20 0 0 28 0 0 4 0.000 4
608+1809 36180 28 19 1 2 20 246 277 4 0.180 4
609+1810 36200 28 22 0 0 27 0 0 4 0.000 4
610+1811 36220 33 24 1 2 32 52 83 4 0.992 4
611+1812 36240 36 34 1 2 31 49 80 4 0.992 4
612+1813 36260 35 35 1 2 36 52 83 4 0.938 4
613+1814 36280 30 31 1 2 42 53 84 4 0.789 4
614+1815 36300 24 35 1 2 37 56 87 4 0.922 4
615+1816 36320 27 35 1 2 35 192 223 4 0.180 4
616+1817 36340 32 19 1 2 23 188 219 4 0.180 4
617+1818 36360 29 23 1 2 21 0 32 4 0.930 4
618+1819 36380 26 29 1 2 35 0 32 4 0.180 4
619+1820 36400 26 33 1 2 35 237 268 4 0.789 4
620+1821 36420 35 34 0 1 42 0 0 4 0.000 4
621+1822 36440 30 32 1 2 47 249 280 4 0.180 4
622+1823 36460 30 31 1 2 45 250 281 4 0.180 4
623+1824 36480 31 32 1 2 46 251 282 4 0.836 4
624+1825 36500 29 35 0 1 47 0 0 4 0.000 4
625+1826 36520 32 29 0 0 43 0 0 4 0.000 4
626+1827 36540 35 25 1 2 39 45 77 4 0.984 4
627+1828 36560 27 24 1 2 43 52 83 4 0.969 4
628+1829 36580 29 30 1 2 38 51 82 4 0.992 4
629+1830 36600 35 33 1 2 36 55 86 4 0.992 4
630+1831 36620 32 31 1 2 37 56 87 4 0.180 4
631+1832 36640 26 37 1 2 36 55 86 4 0.930 4
632+1833 36660 26 36 1 2 38 51 82 4 0.852 4
633+1834 36680 31 28 0 0 38 0 0 4 0.000 4
634+1835 36700 25 35 0 0 43 0 0 4 0.000 4
635+1836 36720 32 31 0 0 42 0 0 4 0.000 4
636+1837 36740 28 31 1 2 36 250 281 4 0.984 4
637+1838 36760 30 23 1 2 32 201 232 4 0.180 4
638+1839 36780 39 20 1 2 36 51 82 4 0.930 4
639+1840 36800 29 27 1 2 32 106 137 4 0.938 4
640+1841 36820 26 21 1 2 32 102 133 4 0.938 4
641+1842 36840 30 23 1 2 30 48 79 4 0.789 4
642+1843 36860 34 29 1 2 24 246 277 4 0.180 4
643+1844 36880 30 28 1 2 17 88 119 4 0.836 4
644+1845 36900 27 25 1 2 24 140 171 4 0.852 4
645+1846 36920 29 28 1 2 28 249 280 4 0.953 4
646+1847 36940 29 30 1 2 19 245 276 4 0.180 4
647+1848 36960 31 31 1 2 20 180 211 4 0.992 4
648+1849 36980 32 27 1 2 27 242 273 4 0.930 4
649+
650+# --- global stats ---
651+# voiced frames: 5353/6000
652+# gain_idx[0] histogram: [(0, 1), (5, 6), (6, 22), (7, 46), (8, 87), (9, 109), (10, 132), (11, 108), (12, 84), (13, 61), (14, 69), (15, 81), (16, 72), (17, 82), (18, 56), (19, 70), (20, 68), (21, 86), (22, 81), (23, 65), (24, 78), (25, 77), (26, 86), (27, 93), (28, 79), (29, 104), (30, 123), (31, 129), (32, 156), (33, 118), (34, 165), (35, 171), (36, 210), (37, 248), (38, 219), (39, 270), (40, 280), (41, 269), (42, 260), (43, 266), (44, 247), (45, 235), (46, 196), (47, 112), (48, 126), (49, 86), (50, 68), (51, 37), (52, 30), (53, 16), (54, 14), (55, 8), (56, 2), (57, 4), (58, 4), (59, 1), (60, 3), (61, 1), (62, 2), (63, 21)]
653+# nlsf_interp histogram: [(4, 6000)]
654+# avg bytes/frame: ours=29.9 ref=28.4
655+# mean ltp_gain: 0.6571
lanes/opus-silkq-r2.bands.txtadded+77 -0
@@ -0,0 +1,77 @@
1+# reelm@12k SILK per-band divergence: ours vs ffmpeg-libopus (r2)
2+# mono, 120s, 20ms frames, VBR constrained, 48kHz, Application::Voip
3+# rates: ours 12.38 kbps, ref 11.98 kbps; err ours=27.421 ref=2.407 ratio=11.39; nframes=47997
4+# eb2 = band's mean share of the pre-squared frame error; dln = mean ln(E_test/E_src); band i ends at CELT_EBANDS[i+1]*240 Hz
5+# band lo_hz hi_hz dln_o dln_r eb2_o eb2_r ratio share_o share_r
6+ 0 0 240 -0.404 -1.015 9.001e2 8.256e-2 10901.483587521187 8.1% 4.5%
7+ 1 240 480 -0.555 -0.822 1.503e2 3.133e-2 4798.8320168752825 1.4% 1.7%
8+ 2 480 720 -0.321 -0.719 2.740e2 3.078e-2 8903.992616391502 2.5% 1.7%
9+ 3 720 960 -0.203 -0.727 1.979e1 6.301e-2 314.11641684740283 0.2% 3.4%
10+ 4 960 1200 +0.086 -0.653 7.565e2 1.271e-1 5949.7190716845535 6.8% 6.9%
11+ 5 1200 1440 -0.100 -0.722 2.464e2 6.096e-2 4041.469210559519 2.2% 3.3%
12+ 6 1440 1680 -0.053 -0.669 6.312e1 6.228e-2 1013.5273671435615 0.6% 3.4%
13+ 7 1680 1920 +0.090 -0.590 6.521e1 1.371e-1 475.68774048015473 0.6% 7.4%
14+ 8 1920 2400 -0.061 -0.686 6.777e2 1.671e-1 4056.5361856691347 6.1% 9.0%
15+ 9 2400 2880 -0.053 -0.685 3.503e3 7.006e-2 50002.415780327836 31.5% 3.8%
16+ 10 2880 3360 -0.159 -0.713 1.983e3 1.380e-1 14374.382059534017 17.9% 7.5%
17+ 11 3360 3840 -0.193 -0.711 1.443e3 1.083e-1 13319.398793662045 13.0% 5.9%
18+ 12 3840 4800 -0.090 -0.640 7.548e2 1.246e-1 6057.742411724968 6.8% 6.7%
19+ 13 4800 5760 -0.377 -0.734 1.358e2 1.598e-1 850.1916761988703 1.2% 8.6%
20+ 14 5760 6720 -0.345 -0.685 5.009e1 7.785e-2 643.3793387719822 0.5% 4.2%
21+ 15 6720 8160 -0.203 -0.594 3.432e1 7.665e-2 447.77759764424064 0.3% 4.1%
22+ 16 8160 9600 +0.074 -0.366 5.147e1 3.265e-2 1576.4684713915938 0.5% 1.8%
23+ 17 9600 11520 -1.565 -1.530 1.430e-1 1.325e-1 1.0791172707432997 0.0% 7.2%
24+ 18 11520 14400 -1.910 -1.910 1.345e-1 1.226e-1 1.0965271211155312 0.0% 6.6%
25+ 19 14400 18720 -1.103 -1.104 4.699e-2 4.612e-2 1.0188001325977802 0.0% 2.5%
26+ 20 18720 24000 -0.046 -0.046 3.853e-5 3.768e-5 1.0225011087163844 0.0% 0.0%
27+
28+# top-15 frames by ef2(ours) (ef2 = frame's squared opus_compare error); dom = argmax_b (lnE_o - lnE_s)^2, raw bands
29+# t(s) fft pkt ef2_o ef2_r dom domband_hz | side sig qoff gains[4] nlsf_i lag cont per ltp[4] ltpscl seed bytes
30+ 2.780 1112 139 4.051e27 4.494e-8 9 2400-2880Hz
31+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=49 cont=3 per=0 ltp=[1,1,1,1] ltpscl=0 seed=0 bytes=14
32+ R sig=2 qoff=0 gains=[23,4,5,4] nlsf_i=4 lag=51 cont=0 per=2 ltp=[11,11,11,11] ltpscl=0 seed=0 bytes=37
33+ 2.777 1111 138 5.487e26 5.770e-8 9 2400-2880Hz
34+ O sig=2 qoff=0 gains=[40,2,3,5] nlsf_i=4 lag=48 cont=3 per=1 ltp=[0,3,3,3] ltpscl=0 seed=0 bytes=46
35+ R sig=2 qoff=0 gains=[21,6,4,4] nlsf_i=4 lag=50 cont=1 per=2 ltp=[15,0,10,10] ltpscl=0 seed=2 bytes=39
36+ 2.783 1113 139 2.959e26 8.289e-8 9 2400-2880Hz
37+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=49 cont=3 per=0 ltp=[1,1,1,1] ltpscl=0 seed=0 bytes=14
38+ R sig=2 qoff=0 gains=[23,4,5,4] nlsf_i=4 lag=51 cont=0 per=2 ltp=[11,11,11,11] ltpscl=0 seed=0 bytes=37
39+ 51.998 20799 2599 2.708e24 3.126e-9 8 1920-2400Hz
40+ O sig=2 qoff=0 gains=[44,0,0,5] nlsf_i=4 lag=146 cont=3 per=0 ltp=[1,1,0,1] ltpscl=0 seed=0 bytes=44
41+ R sig=2 qoff=0 gains=[26,4,4,2] nlsf_i=4 lag=183 cont=5 per=1 ltp=[3,7,7,0] ltpscl=0 seed=2 bytes=30
42+ 52.005 20802 2600 2.003e24 1.938e-9 4 960-1200Hz
43+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
44+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
45+ 52.000 20800 2600 1.715e24 5.741e-8 4 960-1200Hz
46+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
47+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
48+ 52.002 20801 2600 5.132e23 2.970e-8 4 960-1200Hz
49+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
50+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
51+ 52.015 20806 2600 1.163e23 3.251e-9 4 960-1200Hz
52+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
53+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
54+ 2.775 1110 138 7.458e22 5.930e-8 9 2400-2880Hz
55+ O sig=2 qoff=0 gains=[40,2,3,5] nlsf_i=4 lag=48 cont=3 per=1 ltp=[0,3,3,3] ltpscl=0 seed=0 bytes=46
56+ R sig=2 qoff=0 gains=[21,6,4,4] nlsf_i=4 lag=50 cont=1 per=2 ltp=[15,0,10,10] ltpscl=0 seed=2 bytes=39
57+ 52.008 20803 2600 2.201e22 1.857e-8 7 1680-1920Hz
58+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
59+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
60+ 2.785 1114 139 8.835e21 4.607e-8 9 2400-2880Hz
61+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=49 cont=3 per=0 ltp=[1,1,1,1] ltpscl=0 seed=0 bytes=14
62+ R sig=2 qoff=0 gains=[23,4,5,4] nlsf_i=4 lag=51 cont=0 per=2 ltp=[11,11,11,11] ltpscl=0 seed=0 bytes=37
63+ 52.013 20805 2600 1.187e21 8.529e-7 4 960-1200Hz
64+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
65+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
66+ 51.995 20798 2599 7.481e20 1.221e-9 5 1200-1440Hz
67+ O sig=2 qoff=0 gains=[44,0,0,5] nlsf_i=4 lag=146 cont=3 per=0 ltp=[1,1,0,1] ltpscl=0 seed=0 bytes=44
68+ R sig=2 qoff=0 gains=[26,4,4,2] nlsf_i=4 lag=183 cont=5 per=1 ltp=[3,7,7,0] ltpscl=0 seed=2 bytes=30
69+ 52.010 20804 2600 3.759e20 3.219e-6 4 960-1200Hz
70+ O sig=2 qoff=0 gains=[63,4,4,4] nlsf_i=4 lag=125 cont=3 per=2 ltp=[7,7,7,7] ltpscl=0 seed=0 bytes=16
71+ R sig=2 qoff=0 gains=[24,3,4,4] nlsf_i=4 lag=127 cont=12 per=1 ltp=[3,3,0,3] ltpscl=0 seed=0 bytes=32
72+ 51.943 20777 2597 2.894e20 2.264e-11 5 1200-1440Hz
73+ O sig=2 qoff=0 gains=[63,0,2,7] nlsf_i=4 lag=200 cont=3 per=0 ltp=[1,1,1,1] ltpscl=0 seed=0 bytes=16
74+ R sig=1 qoff=0 gains=[29,3,1,4] nlsf_i=4 lag=- cont=- per=- ltp=[-,-,-,-] ltpscl=- seed=2 bytes=24
75+# tail: top-1% (479 frames) carry 100.00% of ours' Σef2 vs 100.00% of ref's; 50% of ours' err sits in the worst 1 frames (0.00%) vs ref's worst 1 (0.00%)
76+# de-tailed (worst 50 of 47997 FFT frames dropped per side): err ours=5.624 ref=0.812 ratio=6.93 (was 27.421/2.407/11.39)
77+# burst signature: packets with gains[0]>=60: 24/6000, mean ef2 2.266e25; gains[0]<60: mean ef2 1.154e22 || packets <=20 bytes: 141/6000, mean ef2 3.857e24; >20 bytes: mean ef2 1.177e22
lanes/opus-silkq-r2.report.mdadded+107 -0
@@ -0,0 +1,107 @@
1+# opus-silkq r2 — where the 12 kbps SILK-WB error lives
2+
3+Setup: reelm.wav @ 12 kbps target, mono, `Application::Voip`, 120 s, 20 ms frames,
4+VBR-constrained, both sides decoded through ffmpeg libopus (gate symmetry).
5+Full tables: `lanes/opus-silkq-r2.bands.txt`.
6+Reproduce: `cargo test -p ec-opus --release --test conformance silk_spectral_divergence_12k -- --ignored --nocapture`
7+
8+Headline: err ours=27.421 ref=2.407 **ratio=11.39** (reproduces the gate's ~11×);
9+rates ours 12.38 kbps vs ref 11.98 kbps (±3%); nframes=47997.
10+
11+## Mechanism (named)
12+
13+**Burst-starved constrained-VBR frames + uniform body coarseness — not a
14+bandwidth/aliasing defect.**
15+
16+1. **Tail — bit-reservoir starvation bursts.** 141/6000 packets (2.35%) are
17+ starved to ≤20 bytes (worst: 14–16 B on voiced frames libopus codes at 24–39 B).
18+ On the worst 24 of these the first-subframe gain index codes **63 (max)** →
19+ decoder emits a loud mid-band burst (dominant band 2.4–3.8 kHz) where the
20+ source is quiet: ef2 up to 4.05e27 vs ref 4.5e-8 at the same instant.
21+ These ~24 packets carry ~100% of ours' Σef2. Worst clusters: t≈2.78 s
22+ (pkt 138/139: bytes 46→14, gains[0] 40→63 — spend-then-starve alternation)
23+ and t≈51.94–52.02 s (pkts 2597–2600: 16 B, gains[0]=63).
24+2. **Body — uniform elevation.** Every band 0–16 (0–9.6 kHz) shows ours' mean
25+ eb² at 314×–50 000× ref, tracking signal energy (bands 9–11 hold 62% of
26+ the share simply because speech energy lives there). dln shows ours' mean
27+ level *closer* to source than ref's (ref over-attenuates, dln ≈ −0.6…−1.0;
28+ ours ≈ −0.05…−0.55) — so the error is noise/structure, not level. Consistent
29+ with r1's systematic first-subframe gain-index offset (ours 33–47 vs ref 26–39):
30+ over-coarse quantization everywhere, no single band mechanism.
31+3. **Not aliasing/bandwidth:** bands 17–20 (>9.6 kHz) ratio 1.02–1.10, ours ≈ ref
32+ (both SILK-WB, nothing up there). Band 16 (8.16–9.6 kHz) ratio 1576× is
33+ SILK's 8 kHz edge leakage, same order as body bands.
34+
35+## Table 1 — per-band mean eb² (ours/ref), dln = mean ln(E_test/E_src)
36+
37+| band | Hz | dln_o | dln_r | eb2_o | eb2_r | ratio | share_o | share_r |
38+|---|---|---|---|---|---|---|---|---|
39+| 0 | 0–240 | −0.404 | −1.015 | 9.0e2 | 8.3e−2 | 1.1e4 | 8.1% | 4.5% |
40+| 1 | 240–480 | −0.555 | −0.822 | 1.5e2 | 3.1e−2 | 4.8e3 | 1.4% | 1.7% |
41+| 2 | 480–720 | −0.321 | −0.719 | 2.7e2 | 3.1e−2 | 8.9e3 | 2.5% | 1.7% |
42+| 3 | 720–960 | −0.203 | −0.727 | 2.0e1 | 6.3e−2 | 3.1e2 | 0.2% | 3.4% |
43+| 4 | 960–1200 | +0.086 | −0.653 | 7.6e2 | 1.3e−1 | 5.9e3 | 6.8% | 6.9% |
44+| 5 | 1200–1440 | −0.100 | −0.722 | 2.5e2 | 6.1e−2 | 4.0e3 | 2.2% | 3.3% |
45+| 6 | 1440–1680 | −0.053 | −0.669 | 6.3e1 | 6.2e−2 | 1.0e3 | 0.6% | 3.4% |
46+| 7 | 1680–1920 | +0.090 | −0.590 | 6.5e1 | 1.4e−1 | 4.8e2 | 0.6% | 7.4% |
47+| 8 | 1920–2400 | −0.061 | −0.686 | 6.8e2 | 1.7e−1 | 4.1e3 | 6.1% | 9.0% |
48+| **9** | **2400–2880** | −0.053 | −0.685 | 3.5e3 | 7.0e−2 | **5.0e4** | **31.5%** | 3.8% |
49+| **10** | **2880–3360** | −0.159 | −0.713 | 2.0e3 | 1.4e−1 | **1.4e4** | **17.9%** | 7.5% |
50+| **11** | **3360–3840** | −0.193 | −0.711 | 1.4e3 | 1.1e−1 | **1.3e4** | **13.0%** | 5.9% |
51+| 12 | 3840–4800 | −0.090 | −0.640 | 7.5e2 | 1.2e−1 | 6.1e3 | 6.8% | 6.7% |
52+| 13 | 4800–5760 | −0.377 | −0.734 | 1.4e2 | 1.6e−1 | 8.5e2 | 1.2% | 8.6% |
53+| 14 | 5760–6720 | −0.345 | −0.685 | 5.0e1 | 7.8e−2 | 6.4e2 | 0.5% | 4.2% |
54+| 15 | 6720–8160 | −0.203 | −0.594 | 3.4e1 | 7.7e−2 | 4.5e2 | 0.3% | 4.1% |
55+| 16 | 8160–9600 | +0.074 | −0.366 | 5.1e1 | 3.3e−2 | 1.6e3 | 0.5% | 1.8% |
56+| 17 | 9600–11520 | −1.565 | −1.530 | 1.4e−1 | 1.3e−1 | **1.08** | 0.0% | 7.2% |
57+| 18 | 11520–14400 | −1.910 | −1.910 | 1.3e−1 | 1.2e−1 | **1.10** | 0.0% | 6.6% |
58+| 19 | 14400–18720 | −1.103 | −1.104 | 4.7e−2 | 4.6e−2 | **1.02** | 0.0% | 2.5% |
59+| 20 | 18720–24000 | −0.046 | −0.046 | 3.9e−5 | 3.8e−5 | **1.02** | 0.0% | 0.0% |
60+
61+## Table 2 — worst frames (top of 15; full table in bands.txt)
62+
63+| t(s) | pkt | ef2_ours | ef2_ref | dom band | ours: B, g0 | ref: B, g0 |
64+|---|---|---|---|---|---|---|
65+| 2.780 | 139 | 4.05e27 | 4.5e−8 | 2.4–2.9k | **14, 63** | 37, 23 |
66+| 2.777 | 138 | 5.49e26 | 5.8e−8 | 2.4–2.9k | 46, 40 | 39, 21 |
67+| 2.783 | 139 | 2.96e26 | 8.3e−8 | 2.4–2.9k | **14, 63** | 37, 23 |
68+| 51.998 | 2599 | 2.71e24 | 3.1e−9 | 1.9–2.4k | 44, 44 | 30, 26 |
69+| 52.005 | 2600 | 2.00e24 | 1.9e−9 | 1.0–1.2k | **16, 63** | 32, 24 |
70+| 52.000–52.015 | 2600 | 1.2e23–1.7e24 | ~e−9 | 1.0–1.9k | **16, 63** | 32, 24 |
71+| 51.943 | 2597 | 2.89e20 | 2.3e−11 | 1.2–1.4k | **16, 63** (lag 200) | 24, 29 |
72+
73+Oracle rows (sig/qoff/nlsf_i/lag/cont/per/ltp) in bands.txt — both sides code
74+these frames voiced (sig=2, qoff=0, nlsf_i=4); ours differs in bytes, g0, and
75+contour (ours cont=3 everywhere vs ref 0/1/5/12) — contour bookkeeping is a
76+secondary suspect, but bytes+g0 is the load-bearing difference.
77+
78+## Table 3 — tail vs body
79+
80+- top-1% (479 frames) carry 100.00% of Σef2 **both sides** (ef² is squared
81+ twice before summing — the metric is tail-dominated by construction).
82+- de-tailed (worst 50 frames dropped per side): err ours=5.624 ref=0.812 →
83+ **ratio 6.93** (was 11.39). Bursts alone explain roughly half the log-scale gap.
84+- burst signature: packets with gains[0]≥60: **24/6000**, mean ef2 2.27e25
85+ (vs 1.15e22 for the rest, ≈2000×); packets ≤20 bytes: **141/6000**, mean
86+ ef2 3.86e24 (vs 1.18e22, ≈330×).
87+- [INFERENCE] If the ≤20 B starvation were eliminated (bursts → body quality):
88+ ours' err ≈ 5.624 vs unclipped ref 2.407 → **ratio ≈ 2.3**, a −80% drop —
89+ far past the gate KEEP threshold (−20%).
90+
91+## Fix decision
92+
93+**No encoder change this round.** The table names the mechanism but does not
94+identify a ≤10-line port: the candidate libopus logic (voiced-frame minimum-bit
95+floor / constrained-VBR reservoir clamp in silk VBR bit assignment) is not
96+present locally (only opus headers installed) and porting rate-control from
97+memory is off-limits. r3 pointer: fetch libopus `silk/VBR.c` +
98+`encode_frame` bit assignment, find the per-frame min/clamp, port behind
99+`const ON`, gate, SIGN RULE. Expected effect per the inference above.
100+
101+## Verification
102+
103+- `cargo check -p ec-opus --tests` — clean.
104+- `silk_spectral_divergence_12k` (release, --ignored): ok, 29.5 s, wrote
105+ `lanes/opus-silkq-r2.bands.txt` (75 lines).
106+- `cargo test -p ec-opus --release`: **34 + 27 passed, 0 failed** (13 ignored
107+ diagnostics, incl. the new one).