This seems to be optimizing for a "perceptual loss function" over in https://github.com/google/butteraugli/blob/master/butteraugl... Looking at the code to that, it looks like 1500 lines of this: double MaskDcB(double delta) { PROFILER_FUNC; static const double extmul = 0.349376011816; static const double extoff = -0.894711072781; static const double offset = 0.901647926679; static const double scaler = 0.38008609502…
Upon more investigation, these numbers are certainly machine generated. Here is an example: A constant lookup table is used for determining the importance of a change vs distance. Seperate tables are used for vertical and horizontal distances (I guess eyes might be slightly more sensitive to vertical edges than horizontal ones?). Those tables are wildly different in magnitude: static const double off = 1.410337371404…
http://disp.ee.ntu.edu.tw/meeting/%E7%B6%AD%E6%AF%85/An%20In...
and also read here:
https://en.wikipedia.org/wiki/YUV
That is my quick guess on how to roughly derive the constants (because it is new, probably there are some fancy modifications tho :) )