Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.79k stars 316 forks source link

Question About Gauss.cc #6945

Open ricklina90 opened 8 months ago

ricklina90 commented 8 months ago

Hello : I have a question about gauss.cc. In gauss.cc following method gaussHorizontalSse/gaussVerticalSse/gaussVerticalSsediv/gaussVerticalSsemult use the same M define

for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++) {
        M[i][j] *= (1.0 + b2 + (b1 - b3) * b3);
        M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 - b1 - b2 - b3);
    }

is different from other methed gaussHorizontal/gaussVertical/gaussVerticaldiv/gaussVerticalmult

for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++) {
        M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3);
    }

I want to know which one is right. Thank You.

Benitoite commented 7 months ago

@heckflosse can say for sure. I believe both are approximations, with the SSE2 version having order=2 vs 3 maybe for speed optimization.