[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54600] trunk/blender/source/blender/ compositor/operations: Fix for [#34182] Movie Distortion and Bilateral Blur doesn't work together

Jeroen Bakker j.bakker at atmind.nl
Sat Feb 16 22:21:04 CET 2013


Revision: 54600
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54600
Author:   jbakker
Date:     2013-02-16 21:21:04 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
Fix for [#34182] Movie Distortion and Bilateral Blur doesn't work together

 * added area of interest based on a radius around the input tile.
If someone can implement a correct formula (based on K1, K2 and K3) and send it to me, I will be happy to apply it!

 - At Mind -

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.h

Modified: trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp	2013-02-16 20:21:41 UTC (rev 54599)
+++ trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp	2013-02-16 21:21:04 UTC (rev 54600)
@@ -112,3 +112,16 @@
 		this->m_inputOperation->read(output, x, y, COM_PS_BILINEAR);
 	}
 }
+
+bool MovieDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
+{
+	const int marginX = this->m_width*0.15;
+	const int marginY = this->m_height*0.15;
+
+	rcti newInput;
+	newInput.xmin = input->xmin - marginX;
+	newInput.ymin = input->ymin - marginY;
+	newInput.xmax = input->xmax + marginX;
+	newInput.ymax = input->ymax + marginY;
+	return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
+}

Modified: trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.h	2013-02-16 20:21:41 UTC (rev 54599)
+++ trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.h	2013-02-16 21:21:04 UTC (rev 54600)
@@ -162,6 +162,8 @@
 	
 	void setMovieClip(MovieClip *clip) { this->m_movieClip = clip; }
 	void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
+	bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
+
 };
 
 void deintializeDistortionCache(void);




More information about the Bf-blender-cvs mailing list