Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error when selecting replacement lines #631

Merged
merged 1 commit into from
Apr 18, 2021

Conversation

atsampson
Copy link
Collaborator

@Gamnn spotted that a dropout on the last line of the active region wasn't being corrected.

This is because the ld-dropout-correct code largely works in terms of 1-based line numbering, but the replacement search code was bounded by first/lastActiveFieldLine which use 0-based numbering.

This is the minimal fix - I think in the future it'd be better to rework ld-dropout-correct to use 0-based numbering internally. But the testcase in this bug is also a good example of why it'd be better to do a similarity comparison like ntsc3d does - it would be able to find an identical replacement for the line from a previous field...

Fixes #627.

Gamn spotted that a dropout on the last line of the active region wasn't
being corrected.

This is because the ld-dropout-correct code largely works in terms of
1-based line numbering, but the replacement search code was bounded by
first/lastActiveFieldLine which use 0-based numbering.
@atsampson atsampson added bug ld-decode-tools An issue only affecting the ld-decode-tools labels Apr 14, 2021
@happycube happycube merged commit 2d8e6a9 into happycube:master Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ld-dropout-correct failure
2 participants