[Bf-blender-cvs] [d9557d0] master: T39307: The fast gaussian blur is not an accurate formula. When deciding which tiles are selected for input there was always a constant for correcting the accuracy.

Jeroen Bakker noreply at git.blender.org
Wed Mar 26 21:12:17 CET 2014


Commit: d9557d01bd2f724bc8995c916f91d66ef85d2faa
Author: Jeroen Bakker
Date:   Wed Mar 26 21:08:58 2014 +0100
https://developer.blender.org/rBd9557d01bd2f724bc8995c916f91d66ef85d2faa

T39307: The fast gaussian blur is not an accurate formula. When deciding
which tiles are selected for input there was always a constant for correcting
the accuracy.

It seems that the constant was not enough and has been adjusted. (2 => 3).

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

M	source/blender/compositor/COM_defines.h
M	source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp

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

diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 3b0e9f2..6c07aad 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -109,4 +109,13 @@ typedef enum OrderOfChunks {
 
 #define COM_BLUR_BOKEH_PIXELS 512
 
+/**
+ * The fast gaussien blur is not an accurate blur.
+ * This setting can be used to increase/decrease the 
+ * amount of the input data. (dependent area of interest)
+ *
+ * Fix for: T39307
+ */
+#define COM_FAST_GAUSSIAN_MULTIPLIER 3
+
 #endif  /* __COM_DEFINES_H__ */
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index a6be925..ff53ef2 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -47,10 +47,11 @@ bool FastGaussianBlurOperation::getDAI(rcti *rect, rcti *output)
 {
 	// m_data->sizex * m_size should be enough? For some reason there
 	// seem to be errors in the boundary between tiles.
-	int sx = this->m_data->sizex * this->m_size * 2;
+	float size = this->m_size * COM_FAST_GAUSSIAN_MULTIPLIER;
+	int sx = this->m_data->sizex * size;
 	if (sx < 1)
 		sx = 1;
-	int sy = this->m_data->sizey * this->m_size * 2;
+	int sy = this->m_data->sizey * size;
 	if (sy < 1)
 		sy = 1;




More information about the Bf-blender-cvs mailing list