diag(av1): report worst pixel delta in the pinned-mismatch scratch probe
Browse files at this commitddd8c16605a667caccfbcc6d40845d4547c22dbcParent: 0c923121 changed file +3 -1
crates/ec-av1/src/stream.rsmodified+3 -1
| @@ -1529,17 +1529,19 @@ mod tests { | ||
| 1529 | 1529 | ] { |
| 1530 | 1530 | let mut first = None; |
| 1531 | 1531 | let mut count = 0; |
| 1532 | + let mut worst = 0i32; | |
| 1532 | 1533 | for (i, (x, y)) in a.iter().zip(b.iter()).enumerate() { |
| 1533 | 1534 | if x != y { |
| 1534 | 1535 | count += 1; |
| 1535 | 1536 | if first.is_none() { |
| 1536 | 1537 | first = Some(i); |
| 1537 | 1538 | } |
| 1539 | + worst = worst.max((*x as i32 - *y as i32).abs()); | |
| 1538 | 1540 | } |
| 1539 | 1541 | } |
| 1540 | 1542 | if let Some(i) = first { |
| 1541 | 1543 | eprintln!( |
| 1542 | - "frame {f} plane {plane_name}: {count} mismatches, first at offset {i} (row {}, col {}) ours={} theirs={}", | |
| 1544 | + "frame {f} plane {plane_name}: {count} mismatches (worst delta {worst}), first at offset {i} (row {}, col {}) ours={} theirs={}", | |
| 1543 | 1545 | i / w, |
| 1544 | 1546 | i % w, |
| 1545 | 1547 | a[i], |