Add "Sync glitch filt" compatibility option

While an input is locked, single-shot deviations of the frontend
measurements (line count, field period beyond PCNT_TOLERANCE, hsync width
beyond HSYNC_WIDTH_TOLERANCE, activity flag or the validity check) make
get_status() re-program the mode or drop sync. A NeXT SoG source produced
such glitches (868 -> 814 -> 868 lines) every few minutes, each one a
visible blink.

With this option on, a deviation is acted upon only once it has been seen
on three consecutive status reads; the first two deviating reads are
replaced by the previous stable values. That is 30 ms in the normal case
and up to about 105 ms if the vsync wait in get_status() times out on every
read. Counting deviating reads (rather than requiring identical readings)
guarantees that a real mode change or sync loss is always accepted on the
third read. The counter is cleared whenever the input is not locked or the
option is off. Default Off (stock behaviour). Stored as profile item id 69.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
This commit is contained in:
Peter YooandClaude Fable 5.1 committed 2026-09-18 22:10:53 +09:00
1 parent 5ff096e9d4
commit 88577e1467
4 files changed
+33 -1

No files matched your search

+1
View File
@@ -160,6 +160,7 @@ typedef struct {
alt_u8 av3_alt_rgb;
avinput_t link_av;
alt_u8 pc_sog_coast;
alt_u8 sync_glitch_filt;
} __attribute__((packed)) avconfig_t;
int set_default_profile(int update_cc);