Skip to content

Chad 2026.06.21 ntscfixes#1048

Merged
happycube merged 2 commits into
mainfrom
chad-2026.06.21-ntscfixes
Jun 21, 2026
Merged

Chad 2026.06.21 ntscfixes#1048
happycube merged 2 commits into
mainfrom
chad-2026.06.21-ntscfixes

Conversation

@happycube

Copy link
Copy Markdown
Owner

Checklist

  • I have searched the open pull requests to confirm this change has not already been submitted.
  • My branch is up to date with the target branch.
  • I have tested my changes and all existing tests pass.
  • I have updated documentation where necessary.
  • My code follows the project's coding standards (see CONTRIBUTING.md).

Description

Adapt dp11's filtering improvements to NTSC.

Motivation

Fixes color phase at different amplitudes.

Related Issues

Changes Made

  • new LPF which matches the spec
  • reduced audio bandpass filter from 300khz to 200 (fixed color phase)

Testing

  • All existing tests pass (pytest --output-on-failure)
  • Tested manually with: ve-snw and he010 cbar
  • [~] New tests added for: WIP in a different branch

Screenshots (if applicable)

Additional Notes

The color decoder should detect the reduced amplitude (which was never quite full anyway) and boost decoding accordingly.

happycube and others added 2 commits June 21, 2026 08:31
… offset

The old shift33 constant (83° in radians, treated as output samples by
apply_offsets) had a unit mismatch that made the math opaque and produced
~139° median burst phase instead of the correct ~147°. Replaced with a
direct formula: fsc_phase_deg=122.5 converted to input samples via the
subcarrier period. Includes investigation notes documenting what was
ruled out (filter phase, comb filter, sinc interpolation, burst locking
damping, outlinelen rounding, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…row audio notch

Three changes to eliminate ~10° differential phase between burst (0 IRE)
and 70 IRE color bar measurements:

- Split RF BPF into independent HP order 2 / LP order 3 (was single BPF
  order 4), reducing sideband asymmetry on the low-frequency skirt
- Generalize post-demod group delay equalizer for NTSC (IEC 60857 9.1.7)
  in addition to PAL (IEC 60856 9.1.6), correcting LPF undershoot across
  the chroma band
- Narrow NTSC audio notch width from 350 kHz to 200 kHz (matching PAL),
  cutting the notch filters' group delay contribution to differential phase
- Recalibrate fsc_phase_deg from 122.5° to 117.25° for the new filter chain

Result on he010 color bar disc (30 frames): DP reduced from ~10° to 0.7°,
with Phase (70 IRE bar) at 147.7° and MedPhase (burst) at 147.0°.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@happycube happycube merged commit 37e9cd5 into main Jun 21, 2026
4 checks passed
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.

1 participant