always use bicubic sampler for the scale node with the new compositor since it worked...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jun 2012 10:35:41 +0000 (10:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jun 2012 10:35:41 +0000 (10:35 +0000)
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.

source/blender/compositor/operations/COM_ScaleOperation.cpp

index ef1199cfa322fd343be3fec0646746702aa7add7..341bcdd1b627082578391eca9067be45c140da94 100644 (file)
 
 #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::deinitExecution()
 
 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::deinitExecution()
 
 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::deinitExecution()
 
 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);
 }