Repository navigation
Conversation
When wavelet_denoise_xtrans() builds a color plane, some positions in row 0 and the last row get no value of the plane's color. They kept a 0.5 placeholder or a sensel of another color, and the wavelet denoise spread that value into nearby output sensels. Models with a 4936x3296 raw area got a green line along the top edge. Other models got small color shifts at the top corners. Mark these positions, and fill them from the adjacent row before denoising. The fill needs complete rows next to the edge, so regions smaller than 6x6 sensels now pass through unchanged. Fixes darktable-org#22494
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On X-Trans raws, raw denoise left some positions in the top and bottom rows of each color plane without a value of that plane's color. They kept a 0.5 placeholder or a sensel of another color, and the wavelet denoise spread that value up to 31 rows into the output. Exports from the seven models with a 4936x3296 raw area got a green line along the top edge. 14 other models got small color patches at the top corners.
The fix marks these positions and fills each one from the plane value one row inward. That value always comes from a sensel of the plane's color. This is the fix proposed in the issue, plus a pass-through for regions smaller than 6x6, which the pipeline does not produce.
Exports of existing edits on affected models change in the top 40 rows. The parameters do not change, so no migration is needed.
Referenced issue
Fixes #22494
Related: #22488 is a different defect at the ends of row 1, fixed separately by #22600.
Checklist
src/tests/integration/where the pixelpipe is touched, ordarktable-clias a headless smoke test._(), new preferences are registered indata/darktableconfig.xml.in.RELEASE_NOTES.mdentry was added (only needed if fixing an issue in a release). Do not reference GitHub issues.Test instructions
The issue has the steps to reproduce. Linux x86_64, Release build, CPU only.
test_rawdenoisepasses. Both of its tests fail on the previous code.0068-rawdenoise-xtrans, the only one with raw denoise on an X-Trans image, passes on CPU. Its max dE against the reference stays at 1.69726. The fix changes 10 pixels in its top 6 rows, by at most CIEDE2000 1.43.AI assistance
Claude Code (Claude Opus) found the defect; Codex CLI (Sol) wrote the fix and the unit test; Claude Code (Opus) reviewed.