Drop the b128r bisect scaffolding from the native gate
Browse files at this commit5e3125c4b486ea501b3c4d74952fd378f94fb3dcParent: 6d33df5- test
- drop the b128r bisect scaffolding from the native gate
1 changed file +0 -35
- crates/ec-av1/src/encode.rs +0 -35
crates/ec-av1/src/encode.rsmodified+0 -35
| @@ -17699,41 +17699,6 @@ mod tests { | ||
| 17699 | 17699 | ); |
| 17700 | 17700 | for (i, (d, e)) in decoded.iter().zip(&encoded.frames).enumerate() { |
| 17701 | 17701 | 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 | - ); | |
| 17737 | 17702 | panic!( |
| 17738 | 17703 | "{name} q={q} frame {i} plane {plane} sample {s}: ffmpeg decoded \ |
| 17739 | 17704 | {got}, the encoder reconstructed {want}" |