mirror of
https://github.com/smittix/intercept.git
synced 2026-04-28 08:40:01 -07:00
The slant correction was severely under-correcting because bwd=50 caused the sync deviation measurements to saturate after only ~25 lines (for a 2-sample/line SDR clock drift). Lines 25-256 all reported deviation=-50, pulling the linear regression slope toward zero. Increase bwd and fwd to 800 samples each — sufficient to track cumulative drift from up to ~±200 ppm SDR clock offset across the full 256-line image. Also use a full-sync-length (432-sample) Goertzel window instead of 1/3 length, giving ~111 Hz frequency resolution to cleanly separate the 1200 Hz sync tone from 1500 Hz pixel data. Search is stepped at 5 samples (~0.1 ms) for efficiency, keeping the goertzel_batch batch size at ~320 windows/line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>