pairwise_offsets now computes each signal's rFFT once at a shared padded length (2*max_len) and reuses it for every pair: O(K) forward FFTs + cheap per-pair spectrum products instead of O(K^2) full FFTs. Each pair's lag search stays capped at +/-(la+lb)/2 — the same window the per-pair transform used — and gcc_phat() itself is unchanged for callers (drift windows, tests). Measured 1.8x on 6 cams x 10 min; the advantage grows with camera count. New test locks the cached path against direct gcc_phat, including unequal-length signals where the padded sizes genuinely differ. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| festival4d | ||
| tests | ||