RgTools icon indicating copy to clipboard operation
RgTools copied to clipboard

Potential bug in TemporalRepair Mode 4

Open adworacz opened this issue 7 months ago • 1 comments

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?

adworacz avatar Jun 13 '25 23:06 adworacz

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.

adworacz avatar Jun 14 '25 00:06 adworacz