Skip to content

Remove the noise-generating call whose result is discarded - #22671

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
victoryforce:remove-discarded-noise-generation
Oct 18, 2026
Merged

TurboGit merged 1 commit into
darktable-org:masterfrom
victoryforce:remove-discarded-noise-generation

Conversation

@victoryforce

Copy link
Copy Markdown
Collaborator

This PR removes the addition of noise, which is immediately discarded as the buffer is overwritten by the result of applying Gaussian blur. So, this removed make_noise call was wasted work. What actually works is the make_noise post-processing at the end of the function.

Removing unnecessary buffer processing will obviously speed up the module, though I haven’t measured by how much. I also don't think that such a speed-up would be noticeable to the user. So, I suggest not mentioning this fix in the release notes.

Comment thread src/iop/censorize.c
@TurboGit TurboGit added this to the 5.8 milestone Oct 18, 2026
@TurboGit TurboGit added the scope: codebase making darktable source code easier to manage label Oct 18, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, agreed... that's strange that this call was there but you are right there is no clear or valid reason!

@TurboGit
TurboGit merged commit d5db835 into darktable-org:master Oct 18, 2026
5 checks passed
@victoryforce

Copy link
Copy Markdown
Collaborator Author

that's strange that this call was there but you are right there is no clear or valid reason!

Yes, there is no reason, it's just a mistake. It’s nothing surprising; we’re all human, and no one is immune to making mistakes. We get tired, distracted, lose focus, or shift our attention to a different part of the code while writing; sometimes we’re in a rush to finish a task when time is short. It’s just an interesting detail that this code was written by AP; I sometimes find it a bit amusing to hear him attacking other programmers, given that his own code is hardly a model of perfection. :)

@victoryforce
victoryforce deleted the remove-discarded-noise-generation branch October 18, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants