Closed Benitoite closed 1 year ago
I think the code is slightly wrong. The constants should be suffixed with an f if it is to be a float constant. Otherwise the constant will be a double and it will cause the float to be implicitly cast to a double creating a reduction in performance. So 0.5 should be written as 0.5f whenever used with a float.
I'd recommend building RawTherapee with the -Wdouble-promotion flag. Both Clang and GCC support this.
@Benitoite That looks like ART code. It is fixed in RawTherapee with 80c3eb6ac38b2092e68df0450faf5fe3ae72646b. https://github.com/Beep6581/RawTherapee/blob/dd0054918bc88d58176b3091a143e7e917bdc6fd/rtengine/amaze_demosaic_RT.cc#L778
@heckflosse etc, With the new AppleClang on macOS13ß, I'm getting an ominous truncation warning from the big change in precision.