forge
Explore
Log in

Don't you dare go Hollow

Drop the b128r bisect scaffolding from the native gate

Browse files at this commit

5e3125c4b486ea501b3c4d74952fd378f94fb3dcAhmet Kaan GümüşParent: 6d33df5
  • test
    • drop the b128r bisect scaffolding from the native gate
Show full message
test(av1): drop the b128r bisect scaffolding from the native gate

The mismatch map and the stream/reconstruction dump it grew were the
instruments for one open defect; that defect is closed, so the gate goes
back to its plain first-mismatch panic.
crates/ec-av1/src/encode.rsmodified+0 -35
@@ -17699,41 +17699,6 @@ mod tests {
1769917699 );
1770017700 for (i, (d, e)) in decoded.iter().zip(&encoded.frames).enumerate() {
1770117701 if let Some((plane, s, got, want)) = first_plane_mismatch(d, &e.reconstruction) {
17702- // TEMPORARY (lane-b128r bisect): the whole mismatch map.
17703- if let Ok(dir) = std::env::var("EC_B128R_DUMP") {
17704- std::fs::write(format!("{dir}/gate-q{q}.obu"), &encoded.stream).unwrap();
17705- let r = &e.reconstruction;
17706- let mut buf = Vec::new();
17707- for pl in [&r.y, &r.u, &r.v] {
17708- buf.extend(pl.iter().flat_map(|s| s.to_le_bytes()));
17709- }
17710- std::fs::write(format!("{dir}/recon-q{q}.f{i}.yuv"), &buf).unwrap();
17711- }
17712- let (l, r) = match plane {
17713- "Y" => (&d.y, &e.reconstruction.y),
17714- "U" => (&d.u, &e.reconstruction.u),
17715- _ => (&d.v, &e.reconstruction.v),
17716- };
17717- let w = if plane == "Y" { width } else { width / 2 };
17718- let bad: Vec<usize> = l
17719- .iter()
17720- .zip(r.iter())
17721- .enumerate()
17722- .filter(|(_, (a, b))| a != b)
17723- .map(|(i, _)| i)
17724- .collect();
17725- let rows: Vec<usize> = bad.iter().map(|i| i / w).collect();
17726- let cols: Vec<usize> = bad.iter().map(|i| i % w).collect();
17727- eprintln!(
17728- "B128R MISMATCH {name} q={q} frame {i} plane {plane}: {} samples, \
17729- rows {}..{}, cols {}..{}, first 8 {:?}",
17730- bad.len(),
17731- rows.iter().min().copied().unwrap_or(0),
17732- rows.iter().max().copied().unwrap_or(0),
17733- cols.iter().min().copied().unwrap_or(0),
17734- cols.iter().max().copied().unwrap_or(0),
17735- bad.iter().take(8).map(|i| (i / w, i % w)).collect::<Vec<_>>(),
17736- );
1773717702 panic!(
1773817703 "{name} q={q} frame {i} plane {plane} sample {s}: ffmpeg decoded \
1773917704 {got}, the encoder reconstructed {want}"