diff options
author | Ton Roosendaal <ton@blender.org> | 2011-06-08 20:08:57 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-06-08 20:08:57 +0400 |
commit | 43ec34f05483a57fd9d2c1488501f8936e5f2b56 (patch) | |
tree | 3021669ab005b3a0cadb6b2b13f3d6414899212b /source/blender/nodes | |
parent | 65ec26ab830b3ba44230de4b7b1dc782cccb88fd (diff) |
Bugfix #27601
Revision for previous fix; fast gaussian now survives on images
with a dimension smaller than 3 pixels!
Thanks Bastien Montagne for patch.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/CMP_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c index 982aaf9991d..b73a46c7d7d 100644 --- a/source/blender/nodes/intern/CMP_util.c +++ b/source/blender/nodes/intern/CMP_util.c @@ -1320,7 +1320,11 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy) if ((xy < 1) || (xy > 3)) xy = 3; - if (src->x < 2 && src->y < 2) return; + // XXX The YVV macro defined below explicitely expects sources of at least 3x3 pixels, + // so just skiping blur along faulty direction if src's def is below that limit! + if (src->x < 3) xy &= ~(int) 1; + if (src->y < 3) xy &= ~(int) 2; + if (xy < 1) return; // see "Recursive Gabor Filtering" by Young/VanVliet // all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200 |