Commit: 7bb910cd4e97cfb39fd5b874d9d634b13e4cee51
Author: Sergey Sharybin
Date:   Fri Oct 31 12:35:20 2014 +0100
Branches: master
https://developer.blender.org/rB7bb910cd4e97cfb39fd5b874d9d634b13e4cee51

Fix T42344: EWA filter produces blured results

Derivatives variable names are swapped in the old EWA filter code,
need to adjust for that.

TODO: Make naming fore clear in there.

===================================================================

M       source/blender/blenlib/intern/math_interp.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_interp.c 
b/source/blender/blenlib/intern/math_interp.c
index 4feb954..a0c47be 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -467,7 +467,7 @@ void BLI_ewa_filter(const int width, const int height,
        /* scaling dxt/dyt by full resolution can cause overflow because of 
huge A/B/C and esp. F values,
         * scaling by aspect ratio alone does the opposite, so try something in 
between instead... */
        const float ff2 = (float)width, ff = sqrtf(ff2), q = (float)height / ff;
-       const float Ux = du[0] * ff, Vx = dv[0] * q, Uy = du[1] * ff, Vy = 
dv[1] * q;
+       const float Ux = du[0] * ff, Vx = du[1] * q, Uy = dv[0] * ff, Vy = 
dv[1] * q;
        float A = Vx * Vx + Vy * Vy;
        float B = -2.0f * (Ux * Vx + Uy * Vy);
        float C = Ux * Ux + Uy * Uy;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to