BlueGit

ict rusty-teams

fix(call-model): demo scene blur test compares against the I420 round trip

- a4d2668 moved RGBA compose onto I420 (rgba -> i420 -> rgba), which shifts person pixels by 1-2 levels
- The test now compares the blurred center with the same scene composed under an all-person mask
- Still proves the blur leaves the person alone; only the colour-format round trip is shared

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-17 · 6 weeks ago

Hash
102d02073811400fd1e19cdc7957f1a55ac3b827
Parent
5d38c5db
1 file changed +9 −4
crates/app-call-model/src/demo_scene.rs +9 −4
@@ -89,10 +89,15 @@ mod tests {
89 89 let sharp = self_view(0, false);
90 90 let blurred = self_view(0, true);
91 91 assert!(roughness(&blurred, 30, 20) * 3 < roughness(&sharp, 30, 20));
92 let mut person_only = scene(0);
93 let everyone = Mask::from_fn(256, 144, |_, _| 1.);
94 compose(&mut person_only, SCENE_WIDTH, SCENE_HEIGHT, &everyone);
92 95 let center = (SCENE_HEIGHT / 2 * SCENE_WIDTH + SCENE_WIDTH / 2) * 4;
93 assert_eq!(
94 blurred.bgra[center..center + 3],
95 sharp.bgra[center..center + 3]
96 );
96 let person_bgra = [
97 person_only[center + 2],
98 person_only[center + 1],
99 person_only[center],
100 ];
101 assert_eq!(blurred.bgra[center..center + 3], person_bgra);
97 102 }
98 103 }
@@ -89,10 +89,15 @@ mod tests {
89 let sharp = self_view(0, false);
89 let sharp = self_view(0, false);
90 let blurred = self_view(0, true);
90 let blurred = self_view(0, true);
91 assert!(roughness(&blurred, 30, 20) * 3 < roughness(&sharp, 30, 20));
91 assert!(roughness(&blurred, 30, 20) * 3 < roughness(&sharp, 30, 20));
92 let mut person_only = scene(0);
93 let everyone = Mask::from_fn(256, 144, |_, _| 1.);
94 compose(&mut person_only, SCENE_WIDTH, SCENE_HEIGHT, &everyone);
92 let center = (SCENE_HEIGHT / 2 * SCENE_WIDTH + SCENE_WIDTH / 2) * 4;
95 let center = (SCENE_HEIGHT / 2 * SCENE_WIDTH + SCENE_WIDTH / 2) * 4;
93 assert_eq!(
96 let person_bgra = [
94 blurred.bgra[center..center + 3],
97 person_only[center + 2],
95 sharp.bgra[center..center + 3]
98 person_only[center + 1],
96 );
99 person_only[center],
100 ];
101 assert_eq!(blurred.bgra[center..center + 3], person_bgra);
97 }
102 }
98}
103}