[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51819] trunk/blender/source/blender/ compositor/operations: fix for compositor regression where blur note offset the image one pixel to the top right .

Campbell Barton ideasman42 at gmail.com
Fri Nov 2 13:44:13 CET 2012


Revision: 51819
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51819
Author:   campbellbarton
Date:     2012-11-02 12:44:09 +0000 (Fri, 02 Nov 2012)
Log Message:
-----------
fix for compositor regression where blur note offset the image one pixel to the top right.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp

Modified: trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp	2012-11-02 12:09:59 UTC (rev 51818)
+++ trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp	2012-11-02 12:44:09 UTC (rev 51819)
@@ -123,7 +123,7 @@
 	float value_max = finv_test(buffer[(x * 4) + (y * 4 * bufferwidth)], do_invert); /* init with the current color to avoid unneeded lookups */
 	float distfacinv_max = 1.0f; /* 0 to 1 */
 
-	for (int nx = minx; nx < maxx; nx += step) {
+	for (int nx = minx; nx <= maxx; nx += step) {
 		const int index = (nx - x) + this->m_rad;
 		float value = finv_test(buffer[bufferindex], do_invert);
 		float multiplier;

Modified: trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp	2012-11-02 12:09:59 UTC (rev 51818)
+++ trunk/blender/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp	2012-11-02 12:44:09 UTC (rev 51819)
@@ -121,7 +121,7 @@
 	float value_max = finv_test(buffer[(x * 4) + (y * 4 * bufferwidth)], do_invert); /* init with the current color to avoid unneeded lookups */
 	float distfacinv_max = 1.0f; /* 0 to 1 */
 
-	for (int ny = miny; ny < maxy; ny += step) {
+	for (int ny = miny; ny <= maxy; ny += step) {
 		int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
 
 		const int index = (ny - y) + this->m_rad;

Modified: trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp	2012-11-02 12:09:59 UTC (rev 51818)
+++ trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp	2012-11-02 12:44:09 UTC (rev 51819)
@@ -96,7 +96,7 @@
 	int step = getStep();
 	int offsetadd = getOffsetAdd();
 	int bufferindex = ((minx - bufferstartx) * 4) + ((miny - bufferstarty) * 4 * bufferwidth);
-	for (int nx = minx, index = (minx - x) + this->m_rad; nx < maxx; nx += step, index += step) {
+	for (int nx = minx, index = (minx - x) + this->m_rad; nx <= maxx; nx += step, index += step) {
 		const float multiplier = this->m_gausstab[index];
 		madd_v4_v4fl(color_accum, &buffer[bufferindex], multiplier);
 		multiplier_accum += multiplier;

Modified: trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp	2012-11-02 12:09:59 UTC (rev 51818)
+++ trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp	2012-11-02 12:44:09 UTC (rev 51819)
@@ -96,7 +96,7 @@
 	int index;
 	int step = getStep();
 	const int bufferIndexx = ((minx - bufferstartx) * 4);
-	for (int ny = miny; ny < maxy; ny += step) {
+	for (int ny = miny; ny <= maxy; ny += step) {
 		index = (ny - y) + this->m_rad;
 		int bufferindex = bufferIndexx + ((ny - bufferstarty) * 4 * bufferwidth);
 		const float multiplier = this->m_gausstab[index];




More information about the Bf-blender-cvs mailing list