Revision: 32753
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32753
Author:   campbellbarton
Date:     2010-10-28 14:29:59 +0200 (Thu, 28 Oct 2010)

Log Message:
-----------
bugfix/patch [#24431] Fast Gaussian produces wrong results for higher 
resolutions
report & fix from Martin Lubich (loramel)

Use double rather then floats, this doesn't use significantly more memory (as 
allocating a double buffer would), other vars in this function were doubles 
already so may even gain some speed.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/CMP_util.c

Modified: trunk/blender/source/blender/nodes/intern/CMP_util.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_util.c        2010-10-28 
12:01:02 UTC (rev 32752)
+++ trunk/blender/source/blender/nodes/intern/CMP_util.c        2010-10-28 
12:29:59 UTC (rev 32753)
@@ -1303,7 +1303,7 @@
 void IIR_gauss(CompBuf* src, float sigma, int chan, int xy)
 {
        double q, q2, sc, cf[4], tsM[9], tsu[3], tsv[3];
-       float *X, *Y, *W;
+       double *X, *Y, *W;
        int i, x, y, sz;
 
        // <0.5 not valid, though can have a possibly useful sort of sharpening 
effect
@@ -1367,9 +1367,9 @@
 
        // intermediate buffers
        sz = MAX2(src->x, src->y);
-       X = MEM_callocN(sz*sizeof(float), "IIR_gauss X buf");
-       Y = MEM_callocN(sz*sizeof(float), "IIR_gauss Y buf");
-       W = MEM_callocN(sz*sizeof(float), "IIR_gauss W buf");
+       X = MEM_callocN(sz*sizeof(double), "IIR_gauss X buf");
+       Y = MEM_callocN(sz*sizeof(double), "IIR_gauss Y buf");
+       W = MEM_callocN(sz*sizeof(double), "IIR_gauss W buf");
        if (xy & 1) {   // H
                for (y=0; y<src->y; ++y) {
                        const int yx = y*src->x;


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

Reply via email to