[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47821] trunk/blender/source/blender/ compositor/operations/COM_ScaleOperation.cpp: always use bicubic sampler for the scale node with the new compositor since it worked like this in the old compositor .

Campbell Barton ideasman42 at gmail.com
Wed Jun 13 12:35:56 CEST 2012


Revision: 47821
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47821
Author:   campbellbarton
Date:     2012-06-13 10:35:41 +0000 (Wed, 13 Jun 2012)
Log Message:
-----------
always use bicubic sampler for the scale node with the new compositor since it worked like this in the old compositor.

this ignores the sampler passed and could be done in a nicer way so left this as an ifdef so it can be easily redone.

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

Modified: trunk/blender/source/blender/compositor/operations/COM_ScaleOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ScaleOperation.cpp	2012-06-13 10:12:55 UTC (rev 47820)
+++ trunk/blender/source/blender/compositor/operations/COM_ScaleOperation.cpp	2012-06-13 10:35:41 UTC (rev 47821)
@@ -22,6 +22,10 @@
 
 #include "COM_ScaleOperation.h"
 
+#define USE_FORCE_BICUBIC
+/* XXX - ignore input and use default from old compositor,
+ * could become an option like the transform node - campbell */
+
 ScaleOperation::ScaleOperation() : NodeOperation()
 {
 	this->addInputSocket(COM_DT_COLOR);
@@ -52,6 +56,10 @@
 
 void ScaleOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
 {
+#ifdef USE_FORCE_BICUBIC
+	sampler = COM_PS_BICUBIC;
+#endif
+
 	float scaleX[4];
 	float scaleY[4];
 
@@ -118,6 +126,10 @@
 
 void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
 {
+#ifdef USE_FORCE_BICUBIC
+	sampler = COM_PS_BICUBIC;
+#endif
+
 	float scaleX[4];
 	float scaleY[4];
 
@@ -186,6 +198,10 @@
 
 void ScaleFixedSizeOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
 {
+#ifdef USE_FORCE_BICUBIC
+	sampler = COM_PS_BICUBIC;
+#endif
+
 	this->inputOperation->read(color, x * relX, y * relY, sampler, inputBuffers);
 }
 




More information about the Bf-blender-cvs mailing list