Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-28 16:29:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-28 16:29:59 +0400
commit905c5f794866d63a1fe0183eef327184548fd85e (patch)
treef1188b14908b97b3d6e83c1047ae1cfae97633b1
parent022e72e148ed5376e7c1e52f5eae70890c9f6936 (diff)
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.
-rw-r--r--source/blender/nodes/intern/CMP_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c
index c762d8cb42d..06c4740f6b9 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/intern/CMP_util.c
@@ -1303,7 +1303,7 @@ CompBuf* qd_downScaledCopy(CompBuf* src, int scale)
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 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy)
// 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;