RgTools
RgTools copied to clipboard
Potential bug in TemporalRepair Mode 4
https://github.com/pinterf/RgTools/blob/a9cff29cb228b8a6fb52148f334554f4c3823798/RgTools/RemoveGrainT.cpp#L401
The code and the comment don't line up, and this same (buggy?) logic shows up in the SIMD versions as well.
A subtraction seems likely, as it would mirror the max_np handling below this line.
Thoughts?
Actually, looking at the code, the code might be correct and the comment might be wrong.
It kind of looks like the clipping bounds are being calculated from the brightest and darkest pixels, and the weighted difference is tightening the clipping bounds with the existing code.