forge
Explore
Log in

Don't you dare go Hollow

EC_MCB rung -- the chroma OBMC prediction before and after the blend

Browse files at this commit

aa6d5262f674c7b07344f7a9d1f3a3f2d653cb65Ahmet Kaan GümüşParent: 07b88ab
  • test
    • EC_MCB rung -- the chroma OBMC prediction before and after the blend
Show full message
test(av1): EC_MCB rung -- the chroma OBMC prediction before and after the blend

An env-gated dump matching the instrumented aomdec's own EC_MCB rung
("<plane>:<px>:<py>[:<frame>]", chroma only): it prints the block's chroma
prediction rows on entry to the OBMC blend and again on exit, so a bottom-edge
residue can be attributed to the base motion compensation or to the overlap
blend in one run. Trace only, no behaviour change.
crates/ec-av1/src/decode.rsmodified+36 -0
@@ -19535,6 +19535,36 @@ fn obmc_blend(
19535 // ABOVE pass skips chroma entirely, the LEFT pass still blends it.19535 // ABOVE pass skips chroma entirely, the LEFT pass still blends it.
19536 let skip_chroma_above = matches!((write_w, write_h), (8, 8) | (16, 8) | (8, 16));19536 let skip_chroma_above = matches!((write_w, write_h), (8, 8) | (16, 8) | (8, 16));
19537 19537
19538+ // lane-t900 r13 rung: EC_MCB="<plane>:<px>:<py>[:<frame>]" (chroma plane
19539+ // 1 only) prints this block's chroma prediction rows before and after the
19540+ // OBMC blend, matching the instrumented aomdec's EC_MCB dump.
19541+ let ec_mcb: Option<(usize, usize, i64)> = std::env::var("EC_MCB").ok().and_then(|v| {
19542+ let f: Vec<&str> = v.split(':').collect();
19543+ if f.len() < 3 || f[0] != "1" {
19544+ return None;
19545+ }
19546+ let (x, y) = (f[1].parse::<usize>().ok()?, f[2].parse::<usize>().ok()?);
19547+ let fr = f.get(3).and_then(|s| s.parse::<i64>().ok()).unwrap_or(-1);
19548+ let idx = PREFILT_PICTURE_IDX.load(std::sync::atomic::Ordering::SeqCst) as i64;
19549+ if x >= cpx && x < cpx + write_w / 2 && y >= cpy && y < cpy + write_h / 2
19550+ && (fr < 0 || fr == idx)
19551+ {
19552+ Some((x, y, idx))
19553+ } else {
19554+ None
19555+ }
19556+ });
19557+ if let Some((_, _, idx)) = ec_mcb {
19558+ eprintln!(
19559+ "OUR_MCB pre f={idx} cpx={cpx} cpy={cpy} cw={} ch={}",
19560+ write_w / 2,
19561+ write_h / 2
19562+ );
19563+ for r in 0..write_h / 2 {
19564+ let row: Vec<u16> = (0..write_w / 2).map(|c| pred_u[r * chroma_side + c]).collect();
19565+ eprintln!("OUR_MCB prerow{r}: {row:?}");
19566+ }
19567+ }
19538 for (off4, span4, nb, src4) in overlappable_above(grid, mi_row, mi_col, bw4, mi_cols, max_nb(bw4))19568 for (off4, span4, nb, src4) in overlappable_above(grid, mi_row, mi_col, bw4, mi_cols, max_nb(bw4))
19539 {19569 {
19540 // `Neighbours::above_filter` is indexed in `SUB`(16px)-wide columns19570 // `Neighbours::above_filter` is indexed in `SUB`(16px)-wide columns
@@ -19594,6 +19624,12 @@ fn obmc_blend(
19594 let tmp_v = obmc_neighbour_pred(nv, cpx, cpy + coy, nb.mv, cbw, cbh, false, h_kind, v_kind, nb_scale);19624 let tmp_v = obmc_neighbour_pred(nv, cpx, cpy + coy, nb.mv, cbw, cbh, false, h_kind, v_kind, nb_scale);
19595 obmc_blend_h(pred_v, chroma_side, 0, coy, cbw, cbh, &tmp_v);19625 obmc_blend_h(pred_v, chroma_side, 0, coy, cbw, cbh, &tmp_v);
19596 }19626 }
19627+ if let Some((_, _, idx)) = ec_mcb {
19628+ for r in 0..write_h / 2 {
19629+ let row: Vec<u16> = (0..write_w / 2).map(|c| pred_u[r * chroma_side + c]).collect();
19630+ eprintln!("OUR_MCB post f={idx} row{r}: {row:?}");
19631+ }
19632+ }
19597 Ok(())19633 Ok(())
19598 }19634 }
19599 19635