I noticed that on an M1 Max the computed results (both the mean and the output images) for exr input files had a 50/50 chance of being wrong. After looking through the code I noticed that the setMaxExposure function only conditionally sets the "errorMap" and "this" pixel values.
Initializing errorMapFLIP and tmpErrorMap with 0 values fixes the problem.
I noticed that on an M1 Max the computed results (both the mean and the output images) for exr input files had a 50/50 chance of being wrong. After looking through the code I noticed that the setMaxExposure function only conditionally sets the "errorMap" and "this" pixel values.
Initializing errorMapFLIP and tmpErrorMap with 0 values fixes the problem.