forge
Explore
Log in

Don't you dare go Hollow

diag(av1): superres gate stream dump + deblock horz-edge trace at mi_col 11

Browse files at this commit

397bfd75464fdd04b10e0a3e22d348bfc4820bffAhmet Kaan GümüşParent: 379f6c9
lane-superres r6: localized the 2-pixel gate residue to horizontal-edge
deblock filtering at the rightmost mi column (x0=44..47) of the coded
(pre-superres) frame. EC_SUPERRES_STREAM_DUMP (stream.rs) and
EC_AV1_DEBLOCK_TRACE (decode.rs, HEDGE line at x0==44) are new
env-gated diagnostics, off by default, left in place for the next round.
crates/ec-av1/src/decode.rsmodified+9 -0
@@ -4292,6 +4292,15 @@ fn deblock_plane(plane: &mut PlaneBuf, plane_idx: usize, lf: &LoopFilterParams,
42924292 let mut y0 = 4usize;
42934293 while y0 < th {
42944294 if let Some((len, level)) = edge_params(lf, n, plane_idx, 1, chroma, x0, y0) {
4295+ if std::env::var_os("EC_AV1_DEBLOCK_TRACE").is_some()
4296+ && plane_idx == 0
4297+ && x0 == 44
4298+ {
4299+ eprintln!(
4300+ "HEDGE x0={x0} y0={y0} len={len} level={level} sharpness={}",
4301+ lf.sharpness
4302+ );
4303+ }
42954304 filter_edge(
42964305 &mut plane.data,
42974306 y0 * stride + x0,
crates/ec-av1/src/stream.rsmodified+3 -0
@@ -3918,6 +3918,9 @@ mod tests {
39183918 String::from_utf8_lossy(&out.stderr)
39193919 );
39203920 let stream = out.stdout;
3921+ if let Ok(path) = std::env::var("EC_SUPERRES_STREAM_DUMP") {
3922+ std::fs::write(path, &stream).expect("dump stream");
3923+ }
39213924 let frames =
39223925 decode_stream(&stream).unwrap_or_else(|e| panic!("{NAME} refused: {e}"));
39233926 assert_eq!(frames.len(), frame_count);