You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(issue-103): correct findings — Rust/C cf close but not byte-equal
Updates the §9 finding and §10 follow-ups to reflect the actual
diagnostic outcome: Rust dump_patt reports cf ≈ 0.89, C dump_patt
reports cf ≈ 0.85 on the same hiro input. Both are above the 0.7
acceptance bar (so the Rust port is functionally correct on this
path), but the patches are not byte-equal — there is residual
arithmetic drift between the two implementations.
Captured as a follow-up rather than a PR-B blocker, since the
dominant symptom in #103 is the simple.rs frame-setup bug, not the
extraction drift.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-`dump_patt` (C) → `cf ≈ 0.85`, `id = 0` on the same inputs
164
+
165
+
Both are well above the 0.7 acceptance bar, so the Rust port is *functionally*
166
+
correct on this path. The two confidence values are however **not** identical,
167
+
and `diff_patt` reports the patches are not byte-equal either. There is some
168
+
sub-LSB / arithmetic drift between the Rust port and the C reference. That
169
+
residual divergence is recorded as a follow-up (§10) — it does not block the
170
+
fix for #103's reported symptom.
162
171
163
172
The only difference between `dump_patt.rs` and `simple.rs` is the
164
173
`AR2VideoBufferT` setup:
@@ -225,6 +234,7 @@ violates that contract.
225
234
- Issue #103 point 3 — `patt_ratio` correctness vs. the value used by `mk_patt`. Separate brainstorm.
226
235
- Issue #103 point 4 — `patt.hiro` / `ar_patt_load` byte-order, header parsing, channel ordering. Separate brainstorm.
227
236
- Auto-thresholding (BRACKETING / ADAPTIVE / MEDIAN / OTSU) — pre-existing TODO at `crates/core/src/ar/marker.rs:124`. Unrelated.
228
-
- Eventual full pixel-format coverage in `ar_patt_get_image` (BGR, BGRA, ABGR, ARGB, RGB565, 2vuy, yuvs) — incremental, post-PR-B. Now lower priority since the active path is verified correct.
237
+
- Eventual full pixel-format coverage in `ar_patt_get_image` (BGR, BGRA, ABGR, ARGB, RGB565, 2vuy, yuvs) — incremental, post-PR-B. Now lower priority since the active path is functionally verified.
238
+
-**Strict byte-equality between Rust and C `ext_patt`** (i.e. cf parity within `1e-6`). PR-A ran the diagnostic end-to-end and found Rust `cf ≈ 0.89` vs C `cf ≈ 0.85` on hiro — same id, both above cutoff, but not bit-identical. Likely candidates for the drift: averaging arithmetic (luma weighting / `total_div` rounding) or sub-LSB perspective rounding. Worth a focused follow-up once PR-B closes the immediate symptom.
229
239
- Eventual CI parity test (Approach 2 from the brainstorm) — adds ARToolKit5 build deps to CI; defer until parity is locally trusted.
0 commit comments