diff --git a/crates/ec-opus/tests/conformance.rs b/crates/ec-opus/tests/conformance.rs index 115e9a5c..bf0dc568 100644 --- a/crates/ec-opus/tests/conformance.rs +++ b/crates/ec-opus/tests/conformance.rs @@ -5272,3 +5272,244 @@ fn short_block_bits_vs_libopus() { fs::write(&out_path, &report).unwrap(); eprintln!("wrote {}", out_path.display()); } + +// --------------------------------------------------------------------------- +// her@96 opus_compare error map (lane opus-her r1). +// +// The gate's worst err_ratio row. This localises it: both encoders run through +// the gate's exact path, opus_compare's per-2.5 ms hop ef² is bucketed into +// 1 s windows, and the top-10 windows (by ours/ref window ratio and by ours +// error share) are printed with our encoder flags plus both encoders' coded +// decisions — libopus's packets decoded with our decoder, the reell-r2 method. +// Frame mapping is in source-sample time (±1 frame of codec delay). +// Output: lanes/opus-her-r1.map.txt. HER_KBPS overrides the rate (default 96). +// --------------------------------------------------------------------------- + +#[test] +#[ignore] +fn her_err_map_96k() { + const SECS: f64 = 120.0; + const FRAME: usize = 960; + const CH: usize = 2; + const HOP: usize = 120; // WIN_STEP: one opus_compare hop = 2.5 ms + const HOPS_PER_WIN: usize = 48_000 / HOP; // 1 s window = 400 hops + let kbps_env: u32 = std::env::var("HER_KBPS") + .ok() + .and_then(|v| v.parse().ok()) + .unwrap_or(96); + + let src = shellexpand("~/Music/reeli.mp3"); + if !src.exists() { + eprintln!("SKIP: missing {}", src.display()); + return; + } + let lanes_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes"); + fs::create_dir_all(&lanes_dir).unwrap(); + let scratch = lanes_dir.join("opus-her-r1.scratch.ogg"); + let out_path = lanes_dir.join("opus-her-r1.map.txt"); + + let source_pcm = ffmpeg_decode_pcm(&src, SECS); + let source_frames = source_pcm.len() / CH; + let seconds = source_frames as f64 / 48000.0; + let source_i16 = to_i16(&source_pcm); + + // Reference: ffmpeg libopus, VBR — the gate's path. + ffmpeg_encode_libopus(&src, kbps_env, &scratch, SECS); + let ref_bytes = fs::metadata(&scratch).map(|m| m.len() as usize).unwrap_or(0); + let ref_kbps = ref_bytes as f64 * 8.0 / seconds / 1000.0; + let (ref_dec, ref_ch) = decode_ogg(&scratch); + assert_eq!(ref_ch, CH, "ref not stereo"); + let (_, ref_aligned) = align_to_source(&source_pcm, &ref_dec, CH, 2000); + + // Ref per-packet decoder diag, tagged with its first source sample. + struct FD { + sample: usize, + enc: Option, + dec: ec_opus::celt::CeltDecDiag, + } + let ref_pkts: Vec> = ogg_packets(&fs::read(&scratch).unwrap()) + .into_iter() + .skip(2) + .collect(); + let mut ref_fd: Vec = Vec::new(); + { + let mut d = Decoder::new(48000, CH).unwrap(); + let mut buf = vec![0f32; 5760 * CH]; + let mut at = 0usize; + for p in &ref_pkts { + if p.is_empty() { + continue; + } + let toc = ec_opus::Toc::new(p[0]); + let got = d.decode_float(p, &mut buf).unwrap_or(0); + if toc.mode() != Mode::Silk { + ref_fd.push(FD { sample: at, enc: None, dec: d.last_celt_diag().clone() }); + } + at += got; + } + } + + // Ours at the reference's realised rate (gate path), with per-frame diags. + let mut enc = Encoder::new(48000, CH, Application::Audio).expect("encoder"); + enc.set_bitrate((ref_kbps * 1000.0).round() as u32); + enc.set_vbr_constrained(true); + let mut dec = Decoder::new(48000, CH).unwrap(); + let mut pkt = vec![0u8; 1500]; + let mut dbuf = vec![0f32; 5760 * CH]; + let mut ours_dec = Vec::new(); + let mut ours_bytes = 0usize; + let mut ours_fd: Vec = Vec::new(); + for (fi, block) in source_pcm.chunks(FRAME * CH).enumerate() { + let mut padded = block.to_vec(); + padded.resize(FRAME * CH, 0.0); + let n = enc.encode_float(&padded, FRAME, &mut pkt).unwrap(); + ours_bytes += n; + let m = dec.decode_float(&pkt[..n], &mut dbuf).unwrap(); + ours_dec.extend_from_slice(&dbuf[..m * CH]); + ours_fd.push(FD { + sample: fi * FRAME, + enc: Some(enc.last_celt_diag().clone()), + dec: dec.last_celt_diag().clone(), + }); + } + let (_, ours_aligned) = align_to_source(&source_pcm, &ours_dec, CH, 2000); + let ours_i16 = to_i16(&ours_aligned); + let ref_i16 = to_i16(&ref_aligned); + let ours_kbps = ours_bytes as f64 * 8.0 / seconds / 1000.0; + + // Per-hop ef² for both encoders (gate numerics). + let cmp_frames = (source_i16.len() / CH) + .min(ours_i16.len() / CH) + .min(ref_i16.len() / CH); + let trim = |v: &[i16]| -> Vec { v[..cmp_frames * CH].to_vec() }; + let (err_o, _, hop_o) = opus_compare_err_parts(&trim(&source_i16), &trim(&ours_i16), CH); + let (err_r, _, hop_r) = opus_compare_err_parts(&trim(&source_i16), &trim(&ref_i16), CH); + + // 1 s windows. + let nwin = hop_o.len() / HOPS_PER_WIN; + let sum = |h: &[f64], w: usize| h[w * HOPS_PER_WIN..(w + 1) * HOPS_PER_WIN].iter().sum::(); + let tot_o: f64 = hop_o.iter().sum(); + let tot_r: f64 = hop_r.iter().sum(); + let mut wins: Vec<(usize, f64, f64, f64)> = (0..nwin) + .map(|w| (w, sum(&hop_o, w), sum(&hop_r, w), 0.0)) + .collect(); + for w in wins.iter_mut() { + w.3 = w.1 / w.2.max(f64::MIN_POSITIVE); + } + let max_share = wins.iter().map(|w| w.1).fold(0.0f64, f64::max); + + let mut out = String::new(); + out.push_str(&format!( + "# her@{kbps_env}k error map: ref {ref_kbps:.1} ours {ours_kbps:.1} kbps, \ + err o={err_o:.3} r={err_r:.3} ratio {:.3}, {nwin} s windows\n", + err_o / err_r + )); + out.push_str("# window time = first hop of the 1 s bucket; ratio = ours/ref window ef² sum\n"); + out.push_str("# ratio table de-noised: windows with ours share < 1e-6·max excluded\n"); + + let fmt_fd = |f: &FD| -> String { + let e = f.enc.as_ref(); + format!( + "trans{} intra{} trim{} int{} cb{} dual{} | tf_sum {:+3} tf8 {:?} sp{} ac{} bits{}", + f.dec.transient as u8, + f.dec.intra as u8, + f.dec.alloc_trim, + f.dec.intensity, + f.dec.coded_bands, + f.dec.dual_stereo as u8, + f.dec.tf_res.iter().sum::(), + &f.dec.tf_res.iter().take(8).collect::>(), + f.dec.spread, + f.dec.anti_collapse as u8, + f.dec.total_bits, + ) + &e.map(|e| format!( + " | ENC sb{} vbr{}", e.short_blocks, e.vbr_reservoir + )).unwrap_or_default() + }; + let ref_at = |s: usize| -> Option<&FD> { + let i = ref_fd.partition_point(|f| f.sample <= s); + i.checked_sub(1).map(|i| &ref_fd[i]) + }; + + for (label, order) in [ + ("TOP-10 WINDOWS BY ours/ref RATIO", { + let mut v: Vec = (0..nwin) + .filter(|&w| wins[w].1 >= 1e-6 * max_share) + .collect(); + v.sort_by(|&a, &b| wins[b].3.total_cmp(&wins[a].3)); + v + }), + ("TOP-10 WINDOWS BY ours ERROR SHARE", { + let mut v: Vec = (0..nwin).collect(); + v.sort_by(|&a, &b| wins[b].1.total_cmp(&wins[a].1)); + v + }), + ] { + out.push_str(&format!("\n== {label} ==\n")); + for w in order.into_iter().take(10) { + let (wo, wr, ratio) = (wins[w].1, wins[w].2, wins[w].3); + out.push_str(&format!( + "t={:5.0}s: ours {:.3e} ({:4.1}% of ours) ref {:.3e} ({:4.1}% of ref) ratio {:.1}\n", + w as f64, + wo, + 100.0 * wo / tot_o, + wr, + 100.0 * wr / tot_r, + ratio, + )); + // Worst hop in the window: flags from both encoders. + let (hw, he) = (w * HOPS_PER_WIN, (w + 1) * HOPS_PER_WIN); + let hb = hop_o[hw..he] + .iter() + .enumerate() + .max_by(|a, b| a.1.total_cmp(b.1)) + .map(|(i, v)| (hw + i, *v)) + .unwrap(); + let mid = hb.0 * HOP + 240; // centre sample of the hop + let fi = mid / FRAME; + out.push_str(&format!( + " worst hop {:.1} ms (frame {fi}) ours_ef2 {:.3e}\n", + hb.0 as f64 * 2.5, + hb.1 + )); + if let Some(f) = ours_fd.get(fi) { + out.push_str(&format!(" OUR {}/{}: {}\n", fi, f.sample, fmt_fd(f))); + } + if let Some(f) = ref_at(mid) { + out.push_str(&format!(" REF @{}: {}\n", f.sample, fmt_fd(f))); + } + if let (Some(o), Some(r)) = (ours_fd.get(fi), ref_at(mid)) { + let d0: Vec = (0..ec_opus::celt::NB_BANDS) + .map(|b| format!("{:+5.1}", o.dec.old_band_e[b] - r.dec.old_band_e[b])) + .collect(); + let d1: Vec = (0..ec_opus::celt::NB_BANDS) + .map(|b| { + format!( + "{:+5.1}", + o.dec.old_band_e[ec_opus::celt::NB_BANDS + b] + - r.dec.old_band_e[ec_opus::celt::NB_BANDS + b] + ) + }) + .collect(); + out.push_str(&format!(" Δlog2E L {}\n R {}\n", d0.join(" "), d1.join(" "))); + } + } + } + + // The single worst ours window, frame by frame: where do decisions diverge. + let worst = (0..nwin).max_by(|&a, &b| wins[a].1.total_cmp(&wins[b].1)).unwrap(); + out.push_str(&format!( + "\n== WORST WINDOW t={}..{}s, ALL FRAMES (OUR | REF) ==\n", + worst, + worst + 1 + )); + for fi in worst * 50..(worst + 1) * 50 { + let our = ours_fd.get(fi).map(&fmt_fd).unwrap_or_else(|| "-".into()); + let rf = ref_at(fi * FRAME + 480).map(&fmt_fd).unwrap_or_else(|| "-".into()); + out.push_str(&format!("f{fi}: OUR {our}\n REF {rf}\n")); + } + + fs::write(&out_path, &out).unwrap(); + let _ = fs::remove_file(&scratch); + println!("wrote {}", out_path.display()); +} diff --git a/lanes/opus-her-r1.map.txt b/lanes/opus-her-r1.map.txt new file mode 100644 index 00000000..54dc2bd8 --- /dev/null +++ b/lanes/opus-her-r1.map.txt @@ -0,0 +1,229 @@ +# her@96k error map: ref 101.5 ours 101.0 kbps, err o=1.093 r=1.039 ratio 1.052, 119 s windows +# window time = first hop of the 1 s bucket; ratio = ours/ref window ef² sum +# ratio table de-noised: windows with ours share < 1e-6·max excluded + +== TOP-10 WINDOWS BY ours/ref RATIO == +t= 0s: ours 2.829e0 ( 0.0% of ours) ref 9.296e-13 ( 0.0% of ref) ratio 3043617299726.8 + worst hop 95.0 ms (frame 5) ours_ef2 2.829e0 + OUR 5/4800: trans1 intra1 trim7 int19 cb20 dual0 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits2848 | ENC sb8 vbr12528 + REF @4800: trans1 intra1 trim4 int19 cb21 dual0 | tf_sum -13 tf8 [1, 1, 1, 1, -1, -1, -1, -1] sp2 ac0 bits3496 + Δlog2E L +1.4 +1.0 +0.2 -0.5 -1.9 +0.4 +0.2 +1.1 +0.1 +0.4 -0.3 +0.2 +0.0 +0.0 +1.4 +1.6 +1.1 +0.6 +0.5 +0.2 +0.1 + R +1.2 +1.0 -0.2 +0.4 +0.9 +0.8 +0.1 +0.5 -0.0 +0.0 -0.1 +0.4 +0.0 +0.0 +1.0 +1.2 +1.2 +0.5 +0.4 +0.2 +0.2 +t= 88s: ours 1.851e5 (93.0% of ours) ref 5.256e-2 ( 0.0% of ref) ratio 3520788.0 + worst hop 88277.5 ms (frame 4414) ours_ef2 1.798e5 + OUR 4414/4237440: trans1 intra1 trim4 int19 cb20 dual0 | tf_sum +12 tf8 [0, 0, 0, 0, 3, 3, 3, 3] sp2 ac0 bits2016 | ENC sb8 vbr16128 + REF @4237440: trans1 intra0 trim3 int19 cb21 dual1 | tf_sum -11 tf8 [1, 1, 1, 1, 1, -1, -1, -1] sp2 ac0 bits3536 + Δlog2E L +0.2 +0.5 -1.1 -0.6 -0.1 +0.3 -0.3 +0.8 -0.1 +0.7 +0.1 +0.1 +1.0 +0.7 +0.1 +0.9 +0.4 +0.9 +0.8 +1.4 +2.2 + R +0.2 +0.0 +0.1 -0.4 +0.1 +0.0 -0.0 +0.4 +2.1 +0.8 +0.5 +1.1 +0.7 +1.1 +1.2 +1.5 +0.5 +1.2 +1.1 +1.2 +1.1 +t= 76s: ours 3.869e3 ( 1.9% of ours) ref 5.330e-3 ( 0.0% of ref) ratio 725916.4 + worst hop 76252.5 ms (frame 3812) ours_ef2 3.869e3 + OUR 3812/3659520: trans1 intra1 trim6 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac1 bits2120 | ENC sb8 vbr16160 + REF @3659520: trans1 intra0 trim6 int19 cb20 dual0 | tf_sum +15 tf8 [3, 3, 3, 3, 3, 0, 0, 0] sp2 ac1 bits2544 + Δlog2E L +0.9 +3.0 +1.0 -0.0 -0.1 -0.5 +0.0 -0.7 -0.1 +0.1 +0.1 -0.4 -0.1 +0.1 +0.8 -0.2 +0.4 +0.2 +0.3 +0.4 +0.5 + R +1.0 +0.7 +0.5 -0.0 +0.2 -0.5 +0.4 -0.2 -0.2 -0.2 +0.4 +0.1 +0.4 -0.0 +0.1 +0.0 +0.6 +0.1 +0.5 +0.6 -0.1 +t= 83s: ours 4.209e3 ( 2.1% of ours) ref 3.216e-1 ( 0.0% of ref) ratio 13087.8 + worst hop 83152.5 ms (frame 4157) ours_ef2 4.206e3 + OUR 4157/3990720: trans1 intra1 trim5 int19 cb20 dual1 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2496 | ENC sb8 vbr15856 + REF @3990720: trans1 intra0 trim4 int19 cb21 dual0 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2624 + Δlog2E L +0.3 -0.1 -1.1 +0.3 +0.2 +0.5 +0.4 +0.3 +0.1 +0.2 -0.5 -0.4 -0.3 -0.6 -0.2 -0.0 -0.2 -0.2 -0.1 -0.3 +0.4 + R +0.8 -1.0 -0.5 +0.6 -0.1 -0.1 -0.2 -0.3 +0.7 -0.7 -0.5 +0.1 +0.4 +0.0 +0.2 -0.2 -0.6 -0.1 -0.0 -0.0 -0.2 +t= 89s: ours 3.397e2 ( 0.2% of ours) ref 7.799e-2 ( 0.0% of ref) ratio 4355.7 + worst hop 89685.0 ms (frame 4484) ours_ef2 2.448e2 + OUR 4484/4304640: trans1 intra1 trim5 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits2024 | ENC sb8 vbr16160 + REF @4304640: trans1 intra0 trim4 int19 cb21 dual1 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3760 + Δlog2E L +0.0 +0.2 -0.0 -0.1 +0.2 -0.1 +0.7 +0.7 +2.2 +2.8 +1.3 +2.0 +1.3 +2.7 +2.6 +2.2 +1.8 +2.8 +2.6 +2.6 +1.5 + R +0.2 -0.3 +0.3 -0.1 +0.1 +0.1 +2.0 +0.7 +1.2 +1.6 +1.6 +0.9 +0.6 +0.6 +0.4 +1.1 +0.9 +1.0 +0.6 +0.7 -0.3 +t= 80s: ours 2.138e3 ( 1.1% of ours) ref 4.332e1 ( 0.0% of ref) ratio 49.4 + worst hop 80957.5 ms (frame 4048) ours_ef2 2.135e3 + OUR 4048/3886080: trans1 intra1 trim4 int19 cb20 dual1 | tf_sum +15 tf8 [3, 3, 3, 3, 3, 0, 0, 0] sp2 ac1 bits2024 | ENC sb8 vbr16160 + REF @3886080: trans1 intra0 trim2 int19 cb21 dual1 | tf_sum +6 tf8 [3, 3, 0, 0, 0, 0, 0, 0] sp2 ac1 bits3792 + Δlog2E L +0.0 -0.4 -0.6 -0.5 -0.2 -0.4 +1.2 -0.3 +0.2 +0.6 +1.9 -0.0 +0.7 +0.4 +0.5 +0.9 +1.2 +0.8 +0.7 +0.6 +0.9 + R -0.1 +0.0 +0.3 -0.5 -0.0 -0.4 -0.1 -0.2 +0.4 +0.3 +0.4 +0.1 +0.5 +0.4 +0.3 +0.9 +0.1 +0.1 +0.5 +0.3 +0.3 +t= 60s: ours 3.594e0 ( 0.0% of ours) ref 1.033e-1 ( 0.0% of ref) ratio 34.8 + worst hop 60280.0 ms (frame 3014) ours_ef2 2.316e0 + OUR 3014/2893440: trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -36 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1984 | ENC sb0 vbr-64448 + REF @2893440: trans0 intra0 trim5 int19 cb20 dual0 | tf_sum -16 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1784 + Δlog2E L -0.2 +0.4 +0.0 -0.4 +0.5 -0.4 -0.7 -0.3 +0.1 -0.0 -0.7 +0.3 +0.1 +0.9 +0.2 -0.0 +0.1 +0.2 -0.0 +0.2 +0.3 + R -1.0 +0.1 +0.3 -0.1 -0.1 +0.2 -0.1 -0.0 +0.1 -0.2 +0.0 -0.1 +0.1 +0.2 +0.3 +0.1 +0.1 +0.2 +0.1 -0.0 -0.1 +t= 66s: ours 1.463e1 ( 0.0% of ours) ref 4.368e-1 ( 0.0% of ref) ratio 33.5 + worst hop 66315.0 ms (frame 3316) ours_ef2 7.755e0 + OUR 3316/3183360: trans1 intra0 trim4 int19 cb20 dual0 | tf_sum +21 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2024 | ENC sb8 vbr16160 + REF @3183360: trans1 intra0 trim2 int19 cb21 dual0 | tf_sum +36 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac0 bits3160 + Δlog2E L +0.5 +0.3 -0.2 -0.0 -0.8 +0.1 +0.4 -0.7 -0.2 -0.1 -0.0 +0.6 +0.5 +0.6 +0.9 +0.8 +0.0 +0.1 -0.1 +0.0 +0.2 + R +0.5 +0.4 -0.2 -0.1 -0.4 +0.3 -1.5 +0.2 -0.5 +0.1 +0.3 -0.2 +0.1 -0.2 -0.2 +0.8 +0.4 +0.8 +0.6 +0.7 +0.4 +t= 90s: ours 2.848e3 ( 1.4% of ours) ref 1.078e2 ( 0.1% of ref) ratio 26.4 + worst hop 90825.0 ms (frame 4541) ours_ef2 1.771e3 + OUR 4541/4359360: trans1 intra1 trim5 int19 cb20 dual0 | tf_sum -11 tf8 [1, 1, 1, 1, 1, -1, -1, -1] sp2 ac0 bits2024 | ENC sb8 vbr16176 + REF @4359360: trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits3000 + Δlog2E L +0.8 +0.8 +0.6 -0.2 +0.0 +2.0 +0.2 +0.6 +0.4 -0.0 -0.3 -0.1 +0.0 -0.2 +0.6 +0.1 +0.2 +0.0 +0.8 +0.5 +2.6 + R +0.9 +0.3 -0.1 +1.3 +0.1 +1.3 +0.7 +0.7 +0.6 +0.4 +0.8 -0.3 +0.4 -0.1 +0.8 +0.1 +0.4 +0.2 +0.3 +0.2 +0.6 +t= 82s: ours 3.432e-1 ( 0.0% of ours) ref 1.571e-2 ( 0.0% of ref) ratio 21.8 + worst hop 82917.5 ms (frame 4146) ours_ef2 1.871e-1 + OUR 4146/3980160: trans1 intra1 trim4 int19 cb20 dual0 | tf_sum +11 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits2016 | ENC sb8 vbr16128 + REF @3980160: trans1 intra0 trim2 int19 cb21 dual1 | tf_sum +21 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3200 + Δlog2E L +0.4 +0.2 +0.3 -0.2 -0.5 -0.4 +1.0 -0.1 +0.4 +0.3 +0.2 -0.2 +0.1 +0.1 +0.2 +0.3 +0.3 +0.3 +0.5 +0.4 +0.2 + R +0.5 -0.2 -0.2 +0.3 +0.5 -0.5 +0.7 +0.4 +0.3 +0.7 +0.2 +1.4 +0.0 +0.4 +0.5 +0.5 +0.9 +0.8 +0.6 +0.6 +0.8 + +== TOP-10 WINDOWS BY ours ERROR SHARE == +t= 88s: ours 1.851e5 (93.0% of ours) ref 5.256e-2 ( 0.0% of ref) ratio 3520788.0 + worst hop 88277.5 ms (frame 4414) ours_ef2 1.798e5 + OUR 4414/4237440: trans1 intra1 trim4 int19 cb20 dual0 | tf_sum +12 tf8 [0, 0, 0, 0, 3, 3, 3, 3] sp2 ac0 bits2016 | ENC sb8 vbr16128 + REF @4237440: trans1 intra0 trim3 int19 cb21 dual1 | tf_sum -11 tf8 [1, 1, 1, 1, 1, -1, -1, -1] sp2 ac0 bits3536 + Δlog2E L +0.2 +0.5 -1.1 -0.6 -0.1 +0.3 -0.3 +0.8 -0.1 +0.7 +0.1 +0.1 +1.0 +0.7 +0.1 +0.9 +0.4 +0.9 +0.8 +1.4 +2.2 + R +0.2 +0.0 +0.1 -0.4 +0.1 +0.0 -0.0 +0.4 +2.1 +0.8 +0.5 +1.1 +0.7 +1.1 +1.2 +1.5 +0.5 +1.2 +1.1 +1.2 +1.1 +t= 83s: ours 4.209e3 ( 2.1% of ours) ref 3.216e-1 ( 0.0% of ref) ratio 13087.8 + worst hop 83152.5 ms (frame 4157) ours_ef2 4.206e3 + OUR 4157/3990720: trans1 intra1 trim5 int19 cb20 dual1 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2496 | ENC sb8 vbr15856 + REF @3990720: trans1 intra0 trim4 int19 cb21 dual0 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2624 + Δlog2E L +0.3 -0.1 -1.1 +0.3 +0.2 +0.5 +0.4 +0.3 +0.1 +0.2 -0.5 -0.4 -0.3 -0.6 -0.2 -0.0 -0.2 -0.2 -0.1 -0.3 +0.4 + R +0.8 -1.0 -0.5 +0.6 -0.1 -0.1 -0.2 -0.3 +0.7 -0.7 -0.5 +0.1 +0.4 +0.0 +0.2 -0.2 -0.6 -0.1 -0.0 -0.0 -0.2 +t= 76s: ours 3.869e3 ( 1.9% of ours) ref 5.330e-3 ( 0.0% of ref) ratio 725916.4 + worst hop 76252.5 ms (frame 3812) ours_ef2 3.869e3 + OUR 3812/3659520: trans1 intra1 trim6 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac1 bits2120 | ENC sb8 vbr16160 + REF @3659520: trans1 intra0 trim6 int19 cb20 dual0 | tf_sum +15 tf8 [3, 3, 3, 3, 3, 0, 0, 0] sp2 ac1 bits2544 + Δlog2E L +0.9 +3.0 +1.0 -0.0 -0.1 -0.5 +0.0 -0.7 -0.1 +0.1 +0.1 -0.4 -0.1 +0.1 +0.8 -0.2 +0.4 +0.2 +0.3 +0.4 +0.5 + R +1.0 +0.7 +0.5 -0.0 +0.2 -0.5 +0.4 -0.2 -0.2 -0.2 +0.4 +0.1 +0.4 -0.0 +0.1 +0.0 +0.6 +0.1 +0.5 +0.6 -0.1 +t= 90s: ours 2.848e3 ( 1.4% of ours) ref 1.078e2 ( 0.1% of ref) ratio 26.4 + worst hop 90825.0 ms (frame 4541) ours_ef2 1.771e3 + OUR 4541/4359360: trans1 intra1 trim5 int19 cb20 dual0 | tf_sum -11 tf8 [1, 1, 1, 1, 1, -1, -1, -1] sp2 ac0 bits2024 | ENC sb8 vbr16176 + REF @4359360: trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits3000 + Δlog2E L +0.8 +0.8 +0.6 -0.2 +0.0 +2.0 +0.2 +0.6 +0.4 -0.0 -0.3 -0.1 +0.0 -0.2 +0.6 +0.1 +0.2 +0.0 +0.8 +0.5 +2.6 + R +0.9 +0.3 -0.1 +1.3 +0.1 +1.3 +0.7 +0.7 +0.6 +0.4 +0.8 -0.3 +0.4 -0.1 +0.8 +0.1 +0.4 +0.2 +0.3 +0.2 +0.6 +t= 80s: ours 2.138e3 ( 1.1% of ours) ref 4.332e1 ( 0.0% of ref) ratio 49.4 + worst hop 80957.5 ms (frame 4048) ours_ef2 2.135e3 + OUR 4048/3886080: trans1 intra1 trim4 int19 cb20 dual1 | tf_sum +15 tf8 [3, 3, 3, 3, 3, 0, 0, 0] sp2 ac1 bits2024 | ENC sb8 vbr16160 + REF @3886080: trans1 intra0 trim2 int19 cb21 dual1 | tf_sum +6 tf8 [3, 3, 0, 0, 0, 0, 0, 0] sp2 ac1 bits3792 + Δlog2E L +0.0 -0.4 -0.6 -0.5 -0.2 -0.4 +1.2 -0.3 +0.2 +0.6 +1.9 -0.0 +0.7 +0.4 +0.5 +0.9 +1.2 +0.8 +0.7 +0.6 +0.9 + R -0.1 +0.0 +0.3 -0.5 -0.0 -0.4 -0.1 -0.2 +0.4 +0.3 +0.4 +0.1 +0.5 +0.4 +0.3 +0.9 +0.1 +0.1 +0.5 +0.3 +0.3 +t= 87s: ours 3.778e2 ( 0.2% of ours) ref 2.406e3 ( 2.7% of ref) ratio 0.2 + worst hop 87352.5 ms (frame 4367) ours_ef2 1.490e2 + OUR 4367/4192320: trans1 intra0 trim5 int19 cb21 dual1 | tf_sum +18 tf8 [3, 3, 3, 3, 3, 3, 0, 0] sp2 ac1 bits3112 | ENC sb8 vbr15760 + REF @4192320: trans1 intra0 trim4 int19 cb21 dual1 | tf_sum +12 tf8 [3, 3, 3, 3, 0, 0, 0, 0] sp2 ac1 bits3344 + Δlog2E L +1.2 +0.2 +0.3 +0.2 +0.2 -1.6 -1.0 -0.3 -0.6 -0.9 -0.5 +0.5 +0.8 -0.2 -0.0 +0.5 -0.6 +0.0 -0.6 -0.0 +0.4 + R +0.9 +0.7 +0.4 +0.2 -0.2 -0.5 -0.1 -0.3 +0.9 +1.5 +1.0 +2.6 +2.1 +1.5 +0.5 +1.6 +0.4 +1.9 +1.8 +0.7 +0.3 +t= 89s: ours 3.397e2 ( 0.2% of ours) ref 7.799e-2 ( 0.0% of ref) ratio 4355.7 + worst hop 89685.0 ms (frame 4484) ours_ef2 2.448e2 + OUR 4484/4304640: trans1 intra1 trim5 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits2024 | ENC sb8 vbr16160 + REF @4304640: trans1 intra0 trim4 int19 cb21 dual1 | tf_sum -1 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3760 + Δlog2E L +0.0 +0.2 -0.0 -0.1 +0.2 -0.1 +0.7 +0.7 +2.2 +2.8 +1.3 +2.0 +1.3 +2.7 +2.6 +2.2 +1.8 +2.8 +2.6 +2.6 +1.5 + R +0.2 -0.3 +0.3 -0.1 +0.1 +0.1 +2.0 +0.7 +1.2 +1.6 +1.6 +0.9 +0.6 +0.6 +0.4 +1.1 +0.9 +1.0 +0.6 +0.7 -0.3 +t= 81s: ours 1.321e2 ( 0.1% of ours) ref 2.777e4 (31.3% of ref) ratio 0.0 + worst hop 81937.5 ms (frame 4097) ours_ef2 1.003e2 + OUR 4097/3933120: trans1 intra1 trim4 int19 cb20 dual1 | tf_sum +6 tf8 [3, 3, 0, 0, 0, 0, 0, 0] sp2 ac0 bits2024 | ENC sb8 vbr16176 + REF @3933120: trans1 intra0 trim2 int19 cb21 dual1 | tf_sum -9 tf8 [1, 1, 1, 1, 1, 1, -1, -1] sp2 ac0 bits3704 + Δlog2E L +0.8 -0.2 +0.5 +0.2 +0.1 +0.5 -1.6 +0.0 +0.6 -0.0 +0.8 +0.5 +0.1 +0.2 +0.3 +0.1 +0.5 +0.0 +0.2 +0.2 +0.3 + R +0.3 -0.0 +0.4 +0.4 +1.1 -0.1 +0.6 -0.0 -0.4 +0.0 -0.1 +0.3 -0.1 -0.0 -0.1 -0.1 +0.1 +0.2 +0.3 +0.3 -0.2 +t= 92s: ours 3.088e1 ( 0.0% of ours) ref 1.436e1 ( 0.0% of ref) ratio 2.2 + worst hop 92500.0 ms (frame 4625) ours_ef2 2.543e1 + OUR 4625/4440000: trans1 intra0 trim4 int19 cb20 dual1 | tf_sum +21 tf8 [3, 3, 3, 3, 3, 3, 3, 0] sp2 ac1 bits2440 | ENC sb8 vbr6064 + REF @4440000: trans1 intra0 trim3 int19 cb20 dual1 | tf_sum +57 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac1 bits2448 + Δlog2E L -0.7 +1.3 +0.1 -0.4 +0.1 +0.4 +0.2 +1.1 -0.0 -0.9 +0.0 +0.3 +0.1 +0.1 +0.1 +0.3 -0.2 +0.1 +0.1 +0.2 +0.7 + R -0.6 -0.0 +0.3 -0.3 +0.4 +1.2 +0.9 +0.4 +0.2 -0.5 +0.4 -0.4 +0.5 +0.1 +0.5 +0.2 +0.1 +0.6 +0.3 +0.3 +0.2 +t= 93s: ours 2.976e1 ( 0.0% of ours) ref 1.068e1 ( 0.0% of ref) ratio 2.8 + worst hop 93817.5 ms (frame 4691) ours_ef2 2.609e1 + OUR 4691/4503360: trans1 intra1 trim4 int19 cb20 dual1 | tf_sum +24 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac1 bits2448 | ENC sb8 vbr12048 + REF @4503360: trans1 intra0 trim2 int19 cb21 dual1 | tf_sum +12 tf8 [3, 3, 3, 3, 0, 0, 0, 0] sp2 ac1 bits2888 + Δlog2E L -0.2 +0.4 +0.3 +0.4 +0.1 +0.3 -0.2 +0.1 +0.2 -0.4 -0.2 +0.1 +0.0 +0.2 +0.6 +0.5 +0.3 +0.7 +0.1 +0.1 -0.6 + R +1.4 -0.8 +0.3 -0.5 -0.5 +0.2 -0.4 -0.0 +0.4 +0.0 +0.4 +0.3 +0.0 +0.2 -0.1 -0.1 +0.2 +0.2 +0.2 +0.2 -0.4 + +== WORST WINDOW t=88..89s, ALL FRAMES (OUR | REF) == +f4400: OUR trans0 intra0 trim5 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1840 | ENC sb0 vbr7776 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -22 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1720 +f4401: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1832 | ENC sb0 vbr6256 + REF trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1808 +f4402: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1832 | ENC sb0 vbr4736 + REF trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1768 +f4403: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -12 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1832 | ENC sb0 vbr3216 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -12 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1760 +f4404: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -38 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1840 | ENC sb0 vbr1760 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1744 +f4405: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1824 | ENC sb0 vbr176 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1736 +f4406: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -26 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1880 | ENC sb0 vbr-960 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -30 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1768 +f4407: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -14 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1872 | ENC sb0 vbr-2160 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -32 tf8 [0, 0, 0, 0, 0, -2, -2, -2] sp2 ac0 bits1704 +f4408: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1864 | ENC sb0 vbr-3424 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -30 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1696 +f4409: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -20 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1880 | ENC sb0 vbr-4560 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum -22 tf8 [0, 0, 0, 0, -2, -2, -2, -2] sp2 ac0 bits1688 +f4410: OUR trans1 intra0 trim5 int19 cb20 dual1 | tf_sum +9 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2464 | ENC sb8 vbr-1024 + REF trans1 intra0 trim4 int19 cb20 dual1 | tf_sum +11 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2528 +f4411: OUR trans1 intra0 trim4 int19 cb21 dual0 | tf_sum +21 tf8 [3, 3, 3, 3, 3, 3, 3, 0] sp2 ac1 bits2680 | ENC sb8 vbr4240 + REF trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +13 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits3376 +f4412: OUR trans1 intra0 trim5 int19 cb21 dual1 | tf_sum -3 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3024 | ENC sb8 vbr12256 + REF trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +21 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3520 +f4413: OUR trans1 intra1 trim6 int19 cb20 dual1 | tf_sum +21 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits2512 | ENC sb8 vbr16176 + REF trans1 intra0 trim4 int19 cb21 dual1 | tf_sum +9 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3304 +f4414: OUR trans1 intra1 trim4 int19 cb20 dual0 | tf_sum +12 tf8 [0, 0, 0, 0, 3, 3, 3, 3] sp2 ac0 bits2016 | ENC sb8 vbr16128 + REF trans1 intra0 trim3 int19 cb21 dual1 | tf_sum -11 tf8 [1, 1, 1, 1, 1, -1, -1, -1] sp2 ac0 bits3536 +f4415: OUR trans1 intra1 trim3 int19 cb20 dual1 | tf_sum +18 tf8 [0, 0, 3, 3, 3, 3, 3, 3] sp2 ac0 bits2024 | ENC sb8 vbr16144 + REF trans1 intra0 trim2 int19 cb21 dual0 | tf_sum -5 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac0 bits3112 +f4416: OUR trans0 intra1 trim3 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1856 | ENC sb0 vbr14816 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum -20 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1736 +f4417: OUR trans0 intra1 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1840 | ENC sb0 vbr13360 + REF trans0 intra0 trim3 int19 cb20 dual1 | tf_sum -10 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1712 +f4418: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -10 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1872 | ENC sb0 vbr12160 + REF trans0 intra0 trim3 int19 cb20 dual1 | tf_sum -8 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1776 +f4419: OUR trans1 intra0 trim3 int19 cb21 dual0 | tf_sum +21 tf8 [0, 0, 0, 0, 3, 3, 3, 3] sp2 ac1 bits2512 | ENC sb8 vbr16080 + REF trans1 intra0 trim1 int19 cb21 dual0 | tf_sum +9 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits3008 +f4420: OUR trans0 intra1 trim4 int19 cb20 dual0 | tf_sum -18 tf8 [0, 0, 0, 0, 0, 0, -2, -2] sp2 ac0 bits1872 | ENC sb0 vbr14880 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1680 +f4421: OUR trans0 intra1 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1856 | ENC sb0 vbr13552 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1736 +f4422: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -32 tf8 [0, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1840 | ENC sb0 vbr12096 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1760 +f4423: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1840 | ENC sb0 vbr10640 + REF trans0 intra0 trim3 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1904 +f4424: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -24 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1856 | ENC sb0 vbr9312 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1816 +f4425: OUR trans0 intra0 trim5 int19 cb20 dual0 | tf_sum -18 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1856 | ENC sb0 vbr7984 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1856 +f4426: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -32 tf8 [0, 0, 0, 0, 0, -2, -2, -2] sp2 ac0 bits1832 | ENC sb0 vbr6464 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -32 tf8 [0, 0, 0, 0, 0, -2, -2, -2] sp2 ac0 bits1792 +f4427: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1816 | ENC sb0 vbr4816 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -36 tf8 [0, 0, 0, -2, -2, -2, -2, -2] sp2 ac0 bits1768 +f4428: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -32 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1840 | ENC sb0 vbr3360 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -42 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1728 +f4429: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -14 tf8 [0, 0, 0, -2, -2, -2, -2, -2] sp2 ac0 bits1824 | ENC sb0 vbr1776 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1688 +f4430: OUR trans0 intra0 trim5 int19 cb20 dual0 | tf_sum -38 tf8 [0, 0, -2, -2, -2, -2, -2, -2] sp2 ac0 bits2112 | ENC sb0 vbr2496 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -36 tf8 [0, 0, 0, -2, -2, -2, -2, -2] sp2 ac0 bits1656 +f4431: OUR trans1 intra0 trim6 int19 cb20 dual0 | tf_sum +21 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2784 | ENC sb8 vbr8592 + REF trans1 intra0 trim4 int19 cb21 dual0 | tf_sum -5 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2608 +f4432: OUR trans1 intra1 trim6 int19 cb21 dual1 | tf_sum -3 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2968 | ENC sb8 vbr16160 + REF trans1 intra0 trim4 int19 cb21 dual1 | tf_sum +21 tf8 [3, 3, 3, 3, 3, 3, 3, 0] sp2 ac1 bits3392 +f4433: OUR trans1 intra0 trim5 int19 cb20 dual0 | tf_sum +24 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac0 bits2024 | ENC sb8 vbr16176 + REF trans1 intra0 trim4 int19 cb21 dual0 | tf_sum +27 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac0 bits2856 +f4434: OUR trans0 intra1 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1856 | ENC sb0 vbr14848 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1840 +f4435: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1832 | ENC sb0 vbr13328 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -20 tf8 [0, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1840 +f4436: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1808 | ENC sb0 vbr11616 + REF trans0 intra0 trim3 int19 cb20 dual1 | tf_sum -22 tf8 [0, 0, 0, 0, 0, 0, 0, -2] sp2 ac0 bits1744 +f4437: OUR trans0 intra0 trim4 int19 cb20 dual1 | tf_sum -22 tf8 [0, 0, 0, -2, -2, -2, -2, -2] sp2 ac0 bits1856 | ENC sb0 vbr10288 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1744 +f4438: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1848 | ENC sb0 vbr8896 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1816 +f4439: OUR trans1 intra0 trim5 int19 cb20 dual1 | tf_sum +9 tf8 [3, 3, 3, 0, 0, 0, 0, 0] sp2 ac1 bits2688 | ENC sb8 vbr14224 + REF trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +15 tf8 [0, 0, 0, 0, 0, 0, 0, 3] sp2 ac1 bits2864 +f4440: OUR trans1 intra0 trim6 int19 cb20 dual1 | tf_sum +24 tf8 [3, 3, 3, 3, 3, 3, 3, 3] sp2 ac1 bits2264 | ENC sb8 vbr16160 + REF trans1 intra0 trim4 int19 cb21 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac1 bits3688 +f4441: OUR trans0 intra1 trim6 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1848 | ENC sb0 vbr14768 + REF trans0 intra0 trim7 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1800 +f4442: OUR trans1 intra1 trim5 int19 cb20 dual0 | tf_sum -5 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2192 | ENC sb8 vbr16128 + REF trans1 intra0 trim6 int19 cb21 dual1 | tf_sum +15 tf8 [3, 3, 3, 3, 3, 0, 0, 0] sp2 ac1 bits3088 +f4443: OUR trans1 intra1 trim4 int19 cb20 dual0 | tf_sum -5 tf8 [1, 1, 1, 1, 1, 1, 1, 1] sp2 ac1 bits2024 | ENC sb8 vbr16144 + REF trans1 intra0 trim3 int19 cb21 dual1 | tf_sum +12 tf8 [3, 3, 3, 3, 0, 0, 0, 0] sp2 ac1 bits3160 +f4444: OUR trans0 intra1 trim4 int19 cb20 dual0 | tf_sum -42 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1872 | ENC sb0 vbr14944 + REF trans0 intra0 trim3 int19 cb20 dual0 | tf_sum -12 tf8 [0, 0, 0, 0, 0, 0, 0, -2] sp2 ac0 bits1760 +f4445: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1848 | ENC sb0 vbr13552 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum -32 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1888 +f4446: OUR trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1848 | ENC sb0 vbr12160 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1816 +f4447: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -16 tf8 [0, 0, 0, 0, 0, 0, -2, -2] sp2 ac0 bits1848 | ENC sb0 vbr10768 + REF trans0 intra0 trim4 int19 cb20 dual0 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1840 +f4448: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -42 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1848 | ENC sb0 vbr9376 + REF trans0 intra0 trim4 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1904 +f4449: OUR trans0 intra0 trim5 int19 cb20 dual1 | tf_sum -20 tf8 [-2, -2, -2, -2, -2, -2, -2, -2] sp2 ac0 bits1824 | ENC sb0 vbr7792 + REF trans0 intra0 trim5 int19 cb20 dual1 | tf_sum +0 tf8 [0, 0, 0, 0, 0, 0, 0, 0] sp2 ac0 bits1856 diff --git a/lanes/opus-her-r1.report.md b/lanes/opus-her-r1.report.md new file mode 100644 index 00000000..ed3fdd80 --- /dev/null +++ b/lanes/opus-her-r1.report.md @@ -0,0 +1,71 @@ +# opus-her r1 — her@96k opus_compare error map + +**Verdict: no fix. The charter's premise (her@96 err_ratio 10.126, target < 5) is +superseded — `706596b` (lane-opus-64, transient_analysis port) already took her@96 +from 10.1 → 1.05 and her@64 from 4.65 → 1.10.** This lane delivers the requested +error map (`lanes/opus-her-r1.map.txt`, test `her_err_map_96k`) and the certified +current 14-row baseline. No `src` change: the gate target is met and a change would +be tuning a passing row. + +## What the map is + +`her_err_map_96k` (`#[ignore]`, `crates/ec-opus/tests/conformance.rs`, 30 s): the +gate's exact encode path for both encoders (ffmpeg libopus ref → realised ref_kbps +→ ours CVBR at that rate), `opus_compare_err_parts` per-2.5 ms-hop ef² bucketed +into 1 s windows. Prints top-10 windows by ours/ref ratio and by ours share, with +our encoder flags, both encoders' coded decisions (ref packets decoded with our +decoder, the reell-r2 method), per-band Δlog2E on the worst hop, and all 50 frames of +the worst window. `HER_KBPS` overrides the rate. + +## Map findings (her@96, ref 101.5 / ours 101.0 kbps, err_ratio 1.052) + +- 93 % of our remaining error sits in **t=88 s**, the track's biggest attack burst. + Ref's error there is 0.005 % of its total (window ratio 3.5 M). +- Frame dump f4410–f4415 (transient burst): both encoders agree on trans/sb8/ac1. + Divergence: **ours fires intra coarse-energy 3 frames running (f4413–15) where + libopus stays inter**, and **underspends the burst 2016–3024 bits/frame vs ref's + 3112–3536 with the reservoir pegged (~16100)**. `delayed_intra` (celt_enc.rs:708) + is the libopus heuristic; once rate loops diverge it fires differently. +- Startup window t=0 s: intra1 both (first frame), ref spends 3496 vs our 2848 + bits, ref codes cb21/dual on the transient — startup transient underspend, same + shape as reell-r2's tf_res finding, now small (0.0 % of total error). +- Other windows (t=76 s, t=83 s, t=89 s): flag-level agreement, ±1 alloc_trim, + Δlog2E ≤ 3 dB on isolated bands — normal two-encoder divergence, no mechanism. + +## Named residual (candidate for a future lane, not this one) + +`deferred: transient-burst VBR underspend + spurious delayed-intra at attacks +(t=88 s evidence above)` — would chase the last 1.05 → ~1.0. Gate is green at +1.052; wrong to tune a passing row. + +## Gates (this lane's certification, no `src` change so no regression risk) + +- `cargo test -p ec-opus --release` — **34 + 27 passed, 0 failed** (14 ignored as + designed). +- 14-row gate `encoder_library_gate_vs_libopus -- --ignored` — **RATE within ±5 %, + DROPOUT passed**, all rows: + +| row | ref/ours kbps | corr o / r | err_ratio | +|---|---|---|---| +| nik@64k | 69.2 / 69.1 | .9887 / .9864 | 0.708 | +| nik@96k | 101.0 / 100.9 | .9947 / .9940 | 0.982 | +| reelo@64k | 63.6 / 63.6 | .9893 / .9866 | 1.510 | +| reelo@96k | 93.9 / 93.4 | .9947 / .9937 | 0.940 | +| her@64k | 67.9 / 67.7 | .9834 / .9794 | **1.102** | +| her@96k | 101.5 / 101.0 | .9914 / .9902 | **1.052** | +| reell@64k | 71.3 / 71.3 | .9908 / .9880 | 2.697 | +| reell@96k | 105.4 / 105.3 | .9956 / .9948 | **4.499 (new worst)** | +| reelm@64k | 63.3 / 63.1 | .9866 / .9859 | 0.623 | +| reelm@96k | 84.8 / 84.7 | .9935 / .9920 | 0.660 | +| dl8a@64k | 65.8 / 65.7 | .9889 / .9865 | 0.551 | +| dl8a@96k | 96.8 / 96.5 | .9942 / .9934 | 0.374 | +| hein@64k | 64.9 / 64.8 | .9888 / .9874 | 0.855 | +| hein@96k | 86.9 / 86.8 | .9946 / .9930 | 0.528 | + +Worst row is now **reell@96 at 4.499** — the next gate lane's premise. + +## Files + +- `crates/ec-opus/tests/conformance.rs` — `her_err_map_96k` (commit 233d47e). +- `lanes/opus-her-r1.map.txt` — the map (commit 233d47e). +- `lanes/` gate artifacts restored via `git checkout --` after the runs.