Skip to content

Camera Raw color noise reduction: clear pixels count as unsaturated - #178

Open
Fvzion wants to merge 1 commit into
robbietilton:mainfrom
Fvzion:fix/camera-raw-color-noise
Open

Fvzion wants to merge 1 commit into
robbietilton:mainfrom
Fvzion:fix/camera-raw-color-noise

Conversation

@Fvzion

@Fvzion Fvzion commented Sep 29, 2026

Copy link
Copy Markdown

What

adjust_camera_raw_detail fills a saturation plane for Color noise reduction, but skipped clear pixels without writing them (the luma plane beside it writes 0). The box blur then read uninitialized malloc memory, so pixels next to a transparent area came out differently from run to run, and could pick up garbage.

Fix

Write 0 for clear pixels, as the luma plane does.

Test

CameraRawTests.colorNoiseReductionIgnoresWhatClearPixelsHeld: applies Color noise reduction to a picture with a clear band, dirties freed memory of the same size with saturated pixels, and applies it again: the two results must be identical. It failed on every run before the fix and passes after.

🤖 Generated with Claude Code

The saturation plane that Color noise reduction blurs was never written
under clear pixels (the luma plane beside it is), so the blur read
whatever that memory held, and the pixels next to a transparent area
came out differently from one run to the next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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