Skip to content

add --detect_chroma_track_phase#276

Merged
oyvindln merged 4 commits intooyvindln:vhs_decodefrom
eshaz:track-chroma-phase
Feb 26, 2026
Merged

add --detect_chroma_track_phase#276
oyvindln merged 4 commits intooyvindln:vhs_decodefrom
eshaz:track-chroma-phase

Conversation

@eshaz
Copy link
Copy Markdown

@eshaz eshaz commented Feb 19, 2026

  • Add --detect_chroma_track_phase option that corrects chroma artifacts around the head switching point.
    • These artifacts are caused when the recording VCR switches the chroma phase offset to the next track's configuration too soon (within the visible video). The change in chroma phase shows up as rainbowing at the bottom of the picture. This feature checks the consistency of the color burst phase, and if it is changed +- ~90 degrees within the visible picture, and flips the chroma phase configuration to the next track.

with --detect_chroma_track_phase

chroma_issue_yc_auto_fixed

without --detect_chroma_track_phase

chroma_issue_yc

@eshaz eshaz force-pushed the track-chroma-phase branch from 38ea1be to ddc82a7 Compare February 19, 2026 05:49
@oyvindln
Copy link
Copy Markdown
Owner

Does it detect the position reliably or is it worth also allowing manually specifying a line?

@eshaz
Copy link
Copy Markdown
Author

eshaz commented Feb 20, 2026

Does it detect the position reliably or is it worth also allowing manually specifying a line?

So far, it's detecting the position perfectly with my tests. The switching sometimes occurs +- 1 lines across fields so the detection is nessisary to account for this. I also tried it with a multi generation tape and it's able to detect the multiple phase issues at the switching points and correct those as well.

It doesn't work with PAL though, just NTSC. Some future work on it could likely be done to get it to work for PAL though.

Another future improvement would be to detect where the switch happens mid-line, maybe by looking at the chroma above and below and checking where the phase matches up. I've noticed a few artifacts when the phase switch happens mid-line, but it's not too noticeable. Currently the phase switch detection is only looking at the color burst phase.

@oyvindln oyvindln merged commit 247b7d0 into oyvindln:vhs_decode Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants