Merging r48889 through r48893 from trunk into soc-2011-tomato

This commit is contained in:
2012-07-13 14:21:17 +00:00
262 changed files with 812 additions and 791 deletions

View File

@@ -70,7 +70,7 @@ int BLI_system_thread_count(void); /* gets the number of threads the system
* One custom lock available now. can be extended. */
#define LOCK_IMAGE 0
#define LOCK_PREVIEW 1
#define LOCK_DRAW_IMAGE 1
#define LOCK_VIEWER 2
#define LOCK_CUSTOM1 3
#define LOCK_RCACHE 4

View File

@@ -106,7 +106,7 @@ static void *thread_tls_data;
************************************************ */
static pthread_mutex_t _malloc_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _preview_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_draw_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _viewer_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _custom1_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _rcache_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -337,8 +337,8 @@ void BLI_lock_thread(int type)
{
if (type == LOCK_IMAGE)
pthread_mutex_lock(&_image_lock);
else if (type == LOCK_PREVIEW)
pthread_mutex_lock(&_preview_lock);
else if (type == LOCK_DRAW_IMAGE)
pthread_mutex_lock(&_image_draw_lock);
else if (type == LOCK_VIEWER)
pthread_mutex_lock(&_viewer_lock);
else if (type == LOCK_CUSTOM1)
@@ -357,8 +357,8 @@ void BLI_unlock_thread(int type)
{
if (type == LOCK_IMAGE)
pthread_mutex_unlock(&_image_lock);
else if (type == LOCK_PREVIEW)
pthread_mutex_unlock(&_preview_lock);
else if (type == LOCK_DRAW_IMAGE)
pthread_mutex_unlock(&_image_draw_lock);
else if (type == LOCK_VIEWER)
pthread_mutex_unlock(&_viewer_lock);
else if (type == LOCK_CUSTOM1)

View File

@@ -33,7 +33,7 @@ void SingleThreadedNodeOperation::initExecution()
initMutex();
}
void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, void *data)
{
this->m_cachedInstance->readNoCheck(color, x, y);
}
@@ -46,14 +46,14 @@ void SingleThreadedNodeOperation::deinitExecution()
this->m_cachedInstance = NULL;
}
}
void *SingleThreadedNodeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *SingleThreadedNodeOperation::initializeTileData(rcti *rect)
{
if (this->m_cachedInstance) return this->m_cachedInstance;
lockMutex();
if (this->m_cachedInstance == NULL) {
//
this->m_cachedInstance = createMemoryBuffer(rect, memoryBuffers);
this->m_cachedInstance = createMemoryBuffer(rect);
}
unlockMutex();
return this->m_cachedInstance;

View File

@@ -39,7 +39,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
@@ -51,9 +51,9 @@ public:
*/
void deinitExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
virtual MemoryBuffer *createMemoryBuffer(rcti *rect, MemoryBuffer **memoryBuffers) = 0;
virtual MemoryBuffer *createMemoryBuffer(rcti *rect) = 0;
int isSingleThreaded() { return true; }
};

View File

@@ -63,7 +63,7 @@ protected:
* @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
*/
virtual void executePixel(float *result, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {}
virtual void executePixel(float *result, float x, float y, PixelSampler sampler) {}
/**
* @brief calculate a single pixel
@@ -74,8 +74,8 @@ protected:
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
* @param chunkData chunk specific data a during execution time.
*/
virtual void executePixel(float *result, int x, int y, MemoryBuffer *inputBuffers[], void *chunkData) {
executePixel(result, x, y, COM_PS_NEAREST, inputBuffers);
virtual void executePixel(float *result, int x, int y, void *chunkData) {
executePixel(result, x, y, COM_PS_NEAREST);
}
/**
@@ -88,21 +88,21 @@ protected:
* @param dy
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
*/
virtual void executePixel(float *result, float x, float y, float dx, float dy, MemoryBuffer *inputBuffers[]) {}
virtual void executePixel(float *result, float x, float y, float dx, float dy) {}
public:
inline void read(float *result, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
executePixel(result, x, y, sampler, inputBuffers);
inline void read(float *result, float x, float y, PixelSampler sampler) {
executePixel(result, x, y, sampler);
}
inline void read(float *result, int x, int y, MemoryBuffer *inputBuffers[], void *chunkData) {
executePixel(result, x, y, inputBuffers, chunkData);
inline void read(float *result, int x, int y, void *chunkData) {
executePixel(result, x, y, chunkData);
}
inline void read(float *result, float x, float y, float dx, float dy, MemoryBuffer *inputBuffers[]) {
executePixel(result, x, y, dx, dy, inputBuffers);
inline void read(float *result, float x, float y, float dx, float dy) {
executePixel(result, x, y, dx, dy);
}
virtual void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { return 0; }
virtual void deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data) {
virtual void *initializeTileData(rcti *rect) { return 0; }
virtual void deinitializeTileData(rcti *rect, void *data) {
}
virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }

View File

@@ -27,15 +27,15 @@ AlphaOverKeyOperation::AlphaOverKeyOperation() : MixBaseOperation()
/* pass */
}
void AlphaOverKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void AlphaOverKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputOverColor[4];
float value[4];
this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
this->m_inputValueOperation->read(value, x, y, sampler);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler);
if (inputOverColor[3] <= 0.0f) {
copy_v4_v4(outputValue, inputColor1);

View File

@@ -39,6 +39,6 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
};
#endif

View File

@@ -27,15 +27,15 @@ AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation()
this->m_x = 0.0f;
}
void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputOverColor[4];
float value[4];
this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
this->m_inputValueOperation->read(value, x, y, sampler);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler);
if (inputOverColor[3] <= 0.0f) {
copy_v4_v4(outputValue, inputColor1);

View File

@@ -41,7 +41,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void setX(float x) { this->m_x = x; }
};

View File

@@ -27,15 +27,15 @@ AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() : MixBaseOperatio
/* pass */
}
void AlphaOverPremultiplyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void AlphaOverPremultiplyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputOverColor[4];
float value[4];
this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
this->m_inputValueOperation->read(value, x, y, sampler);
this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
this->m_inputColor2Operation->read(inputOverColor, x, y, sampler);
/* Zero alpha values should still permit an add of RGB data */
if (inputOverColor[3] < 0.0f) {

View File

@@ -39,7 +39,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
};
#endif

View File

@@ -42,7 +42,7 @@ void AntiAliasOperation::initExecution()
NodeOperation::initMutex();
}
void AntiAliasOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void AntiAliasOperation::executePixel(float *color, int x, int y, void *data)
{
if (y < 0 || (unsigned int)y >= this->m_height || x < 0 || (unsigned int)x >= this->m_width) {
color[0] = 0.0f;
@@ -82,12 +82,12 @@ bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
return false;
}
void *AntiAliasOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *AntiAliasOperation::initializeTileData(rcti *rect)
{
if (this->m_buffer) { return this->m_buffer; }
lockMutex();
if (this->m_buffer == NULL) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_valueReader->initializeTileData(rect, memoryBuffers);
MemoryBuffer *tile = (MemoryBuffer *)this->m_valueReader->initializeTileData(rect);
int size = tile->getHeight() * tile->getWidth();
float *input = tile->getBuffer();
char *valuebuffer = new char[size];

View File

@@ -43,14 +43,14 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
*/
void initExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* Deinitialize the execution

View File

@@ -46,7 +46,7 @@ void BilateralBlurOperation::initExecution()
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
void BilateralBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void BilateralBlurOperation::executePixel(float *color, int x, int y, void *data)
{
// read the determinator color at x, y, this will be used as the reference color for the determinator
float determinatorReferenceColor[4];
@@ -61,20 +61,20 @@ void BilateralBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
int miny = floor(y - space);
int maxy = ceil(y + space);
float deltaColor;
this->m_inputDeterminatorProgram->read(determinatorReferenceColor, x, y, inputBuffers, data);
this->m_inputDeterminatorProgram->read(determinatorReferenceColor, x, y, data);
zero_v4(blurColor);
blurDivider = 0.0f;
for (int yi = miny; yi < maxy; yi += QualityStepHelper::getStep()) {
for (int xi = minx; xi < maxx; xi += QualityStepHelper::getStep()) {
// read determinator
this->m_inputDeterminatorProgram->read(determinator, xi, yi, inputBuffers, data);
this->m_inputDeterminatorProgram->read(determinator, xi, yi, data);
deltaColor = (fabsf(determinatorReferenceColor[0] - determinator[0]) +
fabsf(determinatorReferenceColor[1] - determinator[1]) +
fabsf(determinatorReferenceColor[2] - determinator[2])); // do not take the alpha channel into account
if (deltaColor < sigmacolor) {
// add this to the blur
this->m_inputColorProgram->read(tempColor, xi, yi, inputBuffers, data);
this->m_inputColorProgram->read(tempColor, xi, yi, data);
add_v4_v4(blurColor, tempColor);
blurDivider += 1.0f;
}

View File

@@ -38,7 +38,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution

View File

@@ -140,11 +140,11 @@ void BlurBaseOperation::deinitExecution()
this->m_data = NULL;
}
void BlurBaseOperation::updateSize(MemoryBuffer **memoryBuffers)
void BlurBaseOperation::updateSize()
{
if (!this->m_sizeavailable) {
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST, memoryBuffers);
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST);
this->m_size = result[0];
this->m_sizeavailable = true;
}

View File

@@ -34,7 +34,7 @@ protected:
float *make_gausstab(int rad);
float *make_dist_fac_inverse(int rad, int falloff);
void updateSize(MemoryBuffer **memoryBuffers);
void updateSize();
/**
* Cached reference to the inputProgram

View File

@@ -45,13 +45,13 @@ BokehBlurOperation::BokehBlurOperation() : NodeOperation()
this->m_inputBoundingBoxReader = NULL;
}
void *BokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *BokehBlurOperation::initializeTileData(rcti *rect)
{
lockMutex();
if (!this->m_sizeavailable) {
updateSize(memoryBuffers);
updateSize();
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
void *buffer = getInputOperation(0)->initializeTileData(NULL);
unlockMutex();
return buffer;
}
@@ -79,13 +79,13 @@ void BokehBlurOperation::initExecution()
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
{
float color_accum[4];
float tempBoundingBox[4];
float bokeh[4];
this->m_inputBoundingBoxReader->read(tempBoundingBox, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputBoundingBoxReader->read(tempBoundingBox, x, y, COM_PS_NEAREST);
if (tempBoundingBox[0] > 0.0f) {
float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
@@ -95,7 +95,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
int bufferstarty = inputBuffer->getRect()->ymin;
int pixelSize = this->m_size * this->getWidth() / 100.0f;
if (pixelSize==0){
this->m_inputProgram->read(color, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputProgram->read(color, x, y, COM_PS_NEAREST);
return;
}
int miny = y - pixelSize;
@@ -118,7 +118,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
for (int nx = minx; nx < maxx; nx += step) {
float u = this->m_bokehMidX - (nx - x) * m;
float v = this->m_bokehMidY - (ny - y) * m;
this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST);
madd_v4_v4v4(color_accum, bokeh, &buffer[bufferindex]);
add_v4_v4(multiplier_accum, bokeh);
bufferindex += offsetadd;
@@ -130,7 +130,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
color[3] = color_accum[3] * (1.0f / multiplier_accum[3]);
}
else {
this->m_inputProgram->read(color, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputProgram->read(color, x, y, COM_PS_NEAREST);
}
}
@@ -196,7 +196,7 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice* device,
{
cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
if (!this->m_sizeavailable) {
updateSize(inputMemoryBuffers);
updateSize();
}
cl_int radius = this->getWidth() * this->m_size / 100.0f;
cl_int step = this->getStep();
@@ -213,11 +213,11 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice* device,
device->COM_clEnqueueRange(kernel, outputMemoryBuffer, 9, this);
}
void BokehBlurOperation::updateSize(MemoryBuffer **memoryBuffers)
void BokehBlurOperation::updateSize()
{
if (!this->m_sizeavailable) {
float result[4];
this->getInputSocketReader(3)->read(result, 0, 0, COM_PS_NEAREST, memoryBuffers);
this->getInputSocketReader(3)->read(result, 0, 0, COM_PS_NEAREST);
this->m_size = result[0];
CLAMP(this->m_size, 0.0f, 10.0f);
this->m_sizeavailable = true;

View File

@@ -30,7 +30,7 @@ private:
SocketReader *m_inputProgram;
SocketReader *m_inputBokehProgram;
SocketReader *m_inputBoundingBoxReader;
void updateSize(MemoryBuffer **memoryBuffers);
void updateSize();
float m_size;
bool m_sizeavailable;
float m_bokehMidX;
@@ -39,11 +39,11 @@ private:
public:
BokehBlurOperation();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution

View File

@@ -87,7 +87,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
}
return insideBokeh;
}
void BokehImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void BokehImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float shift = this->m_data->lensshift;
float shift2 = shift / 2.0f;

View File

@@ -47,7 +47,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -44,7 +44,7 @@ void BoxMaskOperation::initExecution()
this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float inputMask[4];
float inputValue[4];
@@ -57,8 +57,8 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy);
ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy);
this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
this->m_inputValue->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputMask->read(inputMask, x, y, sampler);
this->m_inputValue->read(inputValue, x, y, sampler);
float halfHeight = this->m_data->height / 2.0f;
float halfWidth = this->m_data->width / 2.0f;

View File

@@ -45,7 +45,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -37,15 +37,15 @@ void BrightnessOperation::initExecution()
this->m_inputContrastProgram = this->getInputSocketReader(2);
}
void BrightnessOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void BrightnessOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float inputValue[4];
float a, b;
float inputBrightness[4];
float inputContrast[4];
this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputBrightnessProgram->read(inputBrightness, x, y, sampler, inputBuffers);
this->m_inputContrastProgram->read(inputContrast, x, y, sampler, inputBuffers);
this->m_inputProgram->read(inputValue, x, y, sampler);
this->m_inputBrightnessProgram->read(inputBrightness, x, y, sampler);
this->m_inputContrastProgram->read(inputContrast, x, y, sampler);
float brightness = inputBrightness[0];
float contrast = inputContrast[0];
brightness /= 100.0f;

View File

@@ -40,7 +40,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -42,7 +42,7 @@ void CalculateMeanOperation::initExecution()
NodeOperation::initMutex();
}
void CalculateMeanOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void CalculateMeanOperation::executePixel(float *color, int x, int y, void *data)
{
color[0] = this->m_result;
}
@@ -70,11 +70,11 @@ bool CalculateMeanOperation::determineDependingAreaOfInterest(rcti *input, ReadB
return false;
}
void *CalculateMeanOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *CalculateMeanOperation::initializeTileData(rcti *rect)
{
lockMutex();
if (!this->m_iscalculated) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
calculateMean(tile);
this->m_iscalculated = true;
}

View File

@@ -46,14 +46,14 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
*/
void initExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* Deinitialize the execution

View File

@@ -31,16 +31,16 @@ CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : Cal
/* pass */
}
void CalculateStandardDeviationOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void CalculateStandardDeviationOperation::executePixel(float *color, int x, int y, void *data)
{
color[0] = this->m_standardDeviation;
}
void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect)
{
lockMutex();
if (!this->m_iscalculated) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
CalculateMeanOperation::calculateMean(tile);
this->m_standardDeviation = 0.0f;
float *buffer = tile->getBuffer();

View File

@@ -39,9 +39,9 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
};
#endif

View File

@@ -39,11 +39,11 @@ void ChangeHSVOperation::deinitExecution()
this->m_inputOperation = NULL;
}
void ChangeHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ChangeHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor1[4];
this->m_inputOperation->read(inputColor1, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor1, x, y, sampler);
outputValue[0] = inputColor1[0] + (this->m_hue - 0.5f);
if (outputValue[0] > 1.0f) outputValue[0] -= 1.0f;

View File

@@ -49,7 +49,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void setHue(float hue) { this->m_hue = hue; }
void setSaturation(float saturation) { this->m_saturation = saturation; }

View File

@@ -83,7 +83,7 @@ void ChannelMatteOperation::deinitExecution()
this->m_inputImageProgram = NULL;
}
void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inColor[4];
float alpha;
@@ -92,7 +92,7 @@ void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, P
const float limit_min = this->m_limit_min;
const float limit_range = this->m_limit_range;
this->m_inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
this->m_inputImageProgram->read(inColor, x, y, sampler);
/* matte operation */
alpha = inColor[this->m_ids[0]] - max(inColor[this->m_ids[1]], inColor[this->m_ids[2]]);

View File

@@ -59,7 +59,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -44,7 +44,7 @@ void ChromaMatteOperation::deinitExecution()
this->m_inputKeyProgram = NULL;
}
void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inKey[4];
float inImage[4];
@@ -57,8 +57,8 @@ void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, Pi
float theta, beta;
float kfg;
this->m_inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
this->m_inputImageProgram->read(inImage, x, y, sampler, inputBuffers);
this->m_inputKeyProgram->read(inKey, x, y, sampler);
this->m_inputImageProgram->read(inImage, x, y, sampler);
/* store matte(alpha) value in [0] to go with
* COM_SetAlphaOperation and the Value output

View File

@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -49,13 +49,13 @@ void ColorBalanceASCCDLOperation::initExecution()
this->m_inputColorOperation = this->getInputSocketReader(1);
}
void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler)
{
float inputColor[4];
float value[4];
this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
this->m_inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputValueOperation->read(value, x, y, sampler);
this->m_inputColorOperation->read(inputColor, x, y, sampler);
float fac = value[0];
fac = min(1.0f, fac);

View File

@@ -49,7 +49,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -54,13 +54,13 @@ void ColorBalanceLGGOperation::initExecution()
this->m_inputColorOperation = this->getInputSocketReader(1);
}
void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler)
{
float inputColor[4];
float value[4];
this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
this->m_inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputValueOperation->read(value, x, y, sampler);
this->m_inputColorOperation->read(inputColor, x, y, sampler);
float fac = value[0];
fac = min(1.0f, fac);

View File

@@ -50,7 +50,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -40,12 +40,12 @@ void ColorCorrectionOperation::initExecution()
this->m_inputMask = this->getInputSocketReader(1);
}
void ColorCorrectionOperation::executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorCorrectionOperation::executePixel(float *output, float x, float y, PixelSampler sampler)
{
float inputImageColor[4];
float inputMask[4];
this->m_inputImage->read(inputImageColor, x, y, sampler, inputBuffers);
this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
this->m_inputImage->read(inputImageColor, x, y, sampler);
this->m_inputMask->read(inputMask, x, y, sampler);
float level = (inputImageColor[0] + inputImageColor[1] + inputImageColor[2]) / 3.0f;
float contrast = this->m_data->master.contrast;

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -58,7 +58,7 @@ void ColorCurveOperation::initExecution()
}
void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
CurveMapping *cumap = this->m_curveMapping;
CurveMapping *workingCopy = (CurveMapping *)MEM_dupallocN(cumap);
@@ -68,13 +68,13 @@ void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSamp
float fac[4];
float image[4];
this->m_inputBlackProgram->read(black, x, y, sampler, inputBuffers);
this->m_inputWhiteProgram->read(white, x, y, sampler, inputBuffers);
this->m_inputBlackProgram->read(black, x, y, sampler);
this->m_inputWhiteProgram->read(white, x, y, sampler);
curvemapping_set_black_white(workingCopy, black, white);
this->m_inputFacProgram->read(fac, x, y, sampler, inputBuffers);
this->m_inputImageProgram->read(image, x, y, sampler, inputBuffers);
this->m_inputFacProgram->read(fac, x, y, sampler);
this->m_inputImageProgram->read(image, x, y, sampler);
if (*fac >= 1.0f)
curvemapping_evaluate_premulRGBF(workingCopy, color, image);
@@ -126,14 +126,14 @@ void ConstantLevelColorCurveOperation::initExecution()
curvemapping_set_black_white(this->m_curveMapping, this->m_black, this->m_white);
}
void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float fac[4];
float image[4];
this->m_inputFacProgram->read(fac, x, y, sampler, inputBuffers);
this->m_inputImageProgram->read(image, x, y, sampler, inputBuffers);
this->m_inputFacProgram->read(fac, x, y, sampler);
this->m_inputImageProgram->read(image, x, y, sampler);
if (*fac >= 1.0f)
curvemapping_evaluate_premulRGBF(this->m_curveMapping, color, image);

View File

@@ -41,7 +41,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution
@@ -70,7 +70,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -44,7 +44,7 @@ void ColorMatteOperation::deinitExecution()
this->m_inputKeyProgram = NULL;
}
void ColorMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inColor[4];
float inKey[4];
@@ -55,8 +55,8 @@ void ColorMatteOperation::executePixel(float *outputValue, float x, float y, Pix
float h_wrap;
this->m_inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
this->m_inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
this->m_inputImageProgram->read(inColor, x, y, sampler);
this->m_inputKeyProgram->read(inKey, x, y, sampler);
/* store matte(alpha) value in [0] to go with

View File

@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -43,11 +43,11 @@ void ColorRampOperation::initExecution()
this->m_inputProgram = this->getInputSocketReader(0);
}
void ColorRampOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorRampOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float values[4];
this->m_inputProgram->read(values, x, y, sampler, inputBuffers);
this->m_inputProgram->read(values, x, y, sampler);
do_colorband(this->m_colorBand, values[0], color);
}

View File

@@ -38,7 +38,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -84,12 +84,12 @@ void ColorSpillOperation::deinitExecution()
this->m_inputFacReader = NULL;
}
void ColorSpillOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ColorSpillOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float fac[4];
float input[4];
this->m_inputFacReader->read(fac, x, y, sampler, inputBuffers);
this->m_inputImageReader->read(input, x, y, sampler, inputBuffers);
this->m_inputFacReader->read(fac, x, y, sampler);
this->m_inputImageReader->read(input, x, y, sampler);
float rfac = min(1.0f, fac[0]);
float map = calculateMapValue(rfac, input);
if (map > 0.0f) {

View File

@@ -46,7 +46,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -78,24 +78,24 @@ void CombineChannelsOperation::deinitExecution()
}
void CombineChannelsOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void CombineChannelsOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float input[4];
/// @todo: remove if statements
if (this->m_inputChannel1Operation) {
this->m_inputChannel1Operation->read(input, x, y, sampler, inputBuffers);
this->m_inputChannel1Operation->read(input, x, y, sampler);
color[0] = input[0];
}
if (this->m_inputChannel2Operation) {
this->m_inputChannel2Operation->read(input, x, y, sampler, inputBuffers);
this->m_inputChannel2Operation->read(input, x, y, sampler);
color[1] = input[0];
}
if (this->m_inputChannel3Operation) {
this->m_inputChannel3Operation->read(input, x, y, sampler, inputBuffers);
this->m_inputChannel3Operation->read(input, x, y, sampler);
color[2] = input[0];
}
if (this->m_inputChannel4Operation) {
this->m_inputChannel4Operation->read(input, x, y, sampler, inputBuffers);
this->m_inputChannel4Operation->read(input, x, y, sampler);
color[3] = input[0];
}
}

View File

@@ -33,7 +33,7 @@ private:
SocketReader *m_inputChannel4Operation;
public:
CombineChannelsOperation();
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -27,6 +27,7 @@
#include "BKE_image.h"
extern "C" {
#include "BLI_threads.h"
#include "RE_pipeline.h"
#include "RE_shader_ext.h"
#include "RE_render_ext.h"
@@ -63,6 +64,7 @@ void CompositorOperation::deinitExecution()
const RenderData *rd = this->m_rd;
Render *re = RE_GetRender_FromData(rd);
RenderResult *rr = RE_AcquireResultWrite(re);
if (rr) {
if (rr->rectf != NULL) {
MEM_freeN(rr->rectf);
@@ -75,7 +77,9 @@ void CompositorOperation::deinitExecution()
}
}
BLI_lock_thread(LOCK_DRAW_IMAGE);
BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE);
BLI_unlock_thread(LOCK_DRAW_IMAGE);
if (re) {
RE_ReleaseResult(re);
@@ -111,9 +115,9 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber)
for (y = y1; y < y2 && (!breaked); y++) {
for (x = x1; x < x2 && (!breaked); x++) {
this->m_imageInput->read(color, x, y, COM_PS_NEAREST, NULL);
this->m_imageInput->read(color, x, y, COM_PS_NEAREST);
if (this->m_alphaInput != NULL) {
this->m_alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST, NULL);
this->m_alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST);
}
copy_v4_v4(buffer + offset, color);
offset += COM_NUMBER_OF_CHANNELS;

View File

@@ -38,10 +38,10 @@ void ConvertColorProfileOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorProfileOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertColorProfileOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float color[4];
this->m_inputOperation->read(color, x, y, sampler, inputBuffers);
this->m_inputOperation->read(color, x, y, sampler);
IMB_buffer_float_from_float(outputValue, color, 4, this->m_toProfile, this->m_fromProfile, this->m_predivided, 1, 1, 0, 0);
}

View File

@@ -59,7 +59,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertColorToBWOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorToBWOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertColorToBWOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
this->m_inputOperation->read(&inputColor[0], x, y, sampler);
outputValue[0] = rgb_to_bw(inputColor);
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertColorToValueProg::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertColorToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
this->m_inputOperation->read(&inputColor[0], x, y, sampler);
outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,9 +34,9 @@ void ConvertColorToVectorOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertColorToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
this->m_inputOperation->read(outputValue, x, y, sampler, inputBuffers);
this->m_inputOperation->read(outputValue, x, y, sampler);
}
void ConvertColorToVectorOperation::deinitExecution()

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -75,12 +75,12 @@ void ConvertDepthToRadiusOperation::initExecution()
}
}
void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputValue[4];
float z;
float radius;
this->m_inputOperation->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputValue, x, y, sampler);
z = inputValue[0];
if (z != 0.f) {
float iZ = (1.f / z);

View File

@@ -54,7 +54,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -35,10 +35,10 @@ void ConvertHSVToRGBOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertHSVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertHSVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
hsv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -35,12 +35,12 @@ void ConvertKeyToPremulOperation::initExecution()
this->m_inputColor = getInputSocketReader(0);
}
void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputValue[4];
float alpha;
this->m_inputColor->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputColor->read(inputValue, x, y, sampler);
alpha = inputValue[3];
mul_v3_v3fl(outputValue, inputValue, alpha);

View File

@@ -40,7 +40,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -35,12 +35,12 @@ void ConvertPremulToKeyOperation::initExecution()
this->m_inputColor = getInputSocketReader(0);
}
void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputValue[4];
float alpha;
this->m_inputColor->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputColor->read(inputValue, x, y, sampler);
alpha = inputValue[3];
if (fabsf(alpha) < 1e-5f) {

View File

@@ -40,7 +40,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -35,10 +35,10 @@ void ConvertRGBToHSVOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertRGBToHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertRGBToHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
rgb_to_hsv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -50,12 +50,12 @@ void ConvertRGBToYCCOperation::setMode(int mode)
}
}
void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
float color[3];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode);
/* divided by 255 to normalize for viewing in */

View File

@@ -48,7 +48,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertRGBToYUVOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertRGBToYUVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertRGBToYUVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}

View File

@@ -43,7 +43,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -33,10 +33,10 @@ void ConvertValueToColorProg::initExecution()
this->m_inputProgram = this->getInputSocketReader(0);
}
void ConvertValueToColorProg::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertValueToColorProg::executePixel(float *color, float x, float y, PixelSampler sampler)
{
float inputValue[4];
this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
this->m_inputProgram->read(inputValue, x, y, sampler);
color[0] = inputValue[0];
color[1] = inputValue[0];
color[2] = inputValue[0];

View File

@@ -37,7 +37,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertValueToVectorOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertValueToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertValueToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float input[4];
this->m_inputOperation->read(input, x, y, sampler, inputBuffers);
this->m_inputOperation->read(input, x, y, sampler);
outputValue[0] = input[0];
outputValue[1] = input[0];
outputValue[2] = input[0];

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,9 +34,9 @@ void ConvertVectorToColorOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertVectorToColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertVectorToColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
this->m_inputOperation->read(outputValue, x, y, sampler, inputBuffers);
this->m_inputOperation->read(outputValue, x, y, sampler);
outputValue[3] = 1.0f;
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertVectorToValueOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertVectorToValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertVectorToValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float input[4];
this->m_inputOperation->read(input, x, y, sampler, inputBuffers);
this->m_inputOperation->read(input, x, y, sampler);
outputValue[0] = (input[0] + input[1] + input[2]) / 3.0f;
}

View File

@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -50,10 +50,10 @@ void ConvertYCCToRGBOperation::setMode(int mode)
}
}
void ConvertYCCToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertYCCToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
/* need to un-normalize the data */
/* R,G,B --> Y,Cb,Cr */

View File

@@ -48,7 +48,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -34,10 +34,10 @@ void ConvertYUVToRGBOperation::initExecution()
this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertYUVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void ConvertYUVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inputColor[4];
this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
this->m_inputOperation->read(inputColor, x, y, sampler);
yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}

View File

@@ -43,7 +43,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
/**
* Initialize the execution

View File

@@ -28,7 +28,7 @@ ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation() : ConvolutionFi
/* pass */
}
void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, void *data)
{
float in1[4], in2[4], res1[4], res2[4];
@@ -46,7 +46,7 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, Me
CLAMP(y3, 0, getHeight() - 1);
float value[4];
this->m_inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
this->m_inputValueOperation->read(value, x2, y2, NULL);
float mval = 1.0f - value[0];
res1[0] = 0.0f;
@@ -58,39 +58,39 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, Me
res2[2] = 0.0f;
res2[3] = 0.0f;
this->m_inputOperation->read(in1, x1, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y1, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[0]);
madd_v3_v3fl(res2, in1, this->m_filter[0]);
this->m_inputOperation->read(in1, x2, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x2, y1, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[1]);
madd_v3_v3fl(res2, in1, this->m_filter[3]);
this->m_inputOperation->read(in1, x3, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y1, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[2]);
madd_v3_v3fl(res2, in1, this->m_filter[6]);
this->m_inputOperation->read(in1, x1, y2, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y2, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[3]);
madd_v3_v3fl(res2, in1, this->m_filter[1]);
this->m_inputOperation->read(in2, x2, y2, inputBuffers, NULL);
this->m_inputOperation->read(in2, x2, y2, NULL);
madd_v3_v3fl(res1, in2, this->m_filter[4]);
madd_v3_v3fl(res2, in2, this->m_filter[4]);
this->m_inputOperation->read(in1, x3, y2, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y2, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[5]);
madd_v3_v3fl(res2, in1, this->m_filter[7]);
this->m_inputOperation->read(in1, x1, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y3, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[6]);
madd_v3_v3fl(res2, in1, this->m_filter[2]);
this->m_inputOperation->read(in1, x2, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x2, y3, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[7]);
madd_v3_v3fl(res2, in1, this->m_filter[5]);
this->m_inputOperation->read(in1, x3, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y3, NULL);
madd_v3_v3fl(res1, in1, this->m_filter[8]);
madd_v3_v3fl(res2, in1, this->m_filter[8]);

View File

@@ -28,7 +28,7 @@
class ConvolutionEdgeFilterOperation : public ConvolutionFilterOperation {
public:
ConvolutionEdgeFilterOperation();
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
};
#endif

View File

@@ -67,7 +67,7 @@ void ConvolutionFilterOperation::deinitExecution()
}
void ConvolutionFilterOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void ConvolutionFilterOperation::executePixel(float *color, int x, int y, void *data)
{
float in1[4];
float in2[4];
@@ -84,27 +84,27 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, Memory
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
this->m_inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
this->m_inputValueOperation->read(value, x2, y2, NULL);
const float mval = 1.0f - value[0];
zero_v4(color);
this->m_inputOperation->read(in1, x1, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y1, NULL);
madd_v4_v4fl(color, in1, this->m_filter[0]);
this->m_inputOperation->read(in1, x2, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x2, y1, NULL);
madd_v4_v4fl(color, in1, this->m_filter[1]);
this->m_inputOperation->read(in1, x3, y1, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y1, NULL);
madd_v4_v4fl(color, in1, this->m_filter[2]);
this->m_inputOperation->read(in1, x1, y2, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y2, NULL);
madd_v4_v4fl(color, in1, this->m_filter[3]);
this->m_inputOperation->read(in2, x2, y2, inputBuffers, NULL);
this->m_inputOperation->read(in2, x2, y2, NULL);
madd_v4_v4fl(color, in2, this->m_filter[4]);
this->m_inputOperation->read(in1, x3, y2, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y2, NULL);
madd_v4_v4fl(color, in1, this->m_filter[5]);
this->m_inputOperation->read(in1, x1, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x1, y3, NULL);
madd_v4_v4fl(color, in1, this->m_filter[6]);
this->m_inputOperation->read(in1, x2, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x2, y3, NULL);
madd_v4_v4fl(color, in1, this->m_filter[7]);
this->m_inputOperation->read(in1, x3, y3, inputBuffers, NULL);
this->m_inputOperation->read(in1, x3, y3, NULL);
madd_v4_v4fl(color, in1, this->m_filter[8]);
color[0] = color[0] * value[0] + in2[0] * mval;

View File

@@ -39,7 +39,7 @@ public:
ConvolutionFilterOperation();
void set3x3Filter(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9);
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
void initExecution();
void deinitExecution();

View File

@@ -73,10 +73,10 @@ CropOperation::CropOperation() : CropBaseOperation()
/* pass */
}
void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
if ((x < this->m_xmax && x >= this->m_xmin) && (y < this->m_ymax && y >= this->m_ymin)) {
this->m_inputOperation->read(color, x, y, sampler, inputBuffers);
this->m_inputOperation->read(color, x, y, sampler);
}
else {
zero_v4(color);
@@ -108,7 +108,7 @@ void CropImageOperation::determineResolution(unsigned int resolution[], unsigned
resolution[1] = this->m_ymax - this->m_ymin;
}
void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
{
this->m_inputOperation->read(color, (x + this->m_xmin), (y + this->m_ymin), sampler, inputBuffers);
this->m_inputOperation->read(color, (x + this->m_xmin), (y + this->m_ymin), sampler);
}

View File

@@ -48,7 +48,7 @@ class CropOperation : public CropBaseOperation {
private:
public:
CropOperation();
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
};
class CropImageOperation : public CropBaseOperation {
@@ -57,7 +57,7 @@ public:
CropImageOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void determineResolution(unsigned int resolution[], unsigned int preferedResolution[]);
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
};
#endif

View File

@@ -44,7 +44,7 @@ void DifferenceMatteOperation::deinitExecution()
this->m_inputImage2Program = NULL;
}
void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
{
float inColor1[4];
float inColor2[4];
@@ -54,8 +54,8 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
float difference;
float alpha;
this->m_inputImage1Program->read(inColor1, x, y, sampler, inputBuffers);
this->m_inputImage2Program->read(inColor2, x, y, sampler, inputBuffers);
this->m_inputImage1Program->read(inColor1, x, y, sampler);
this->m_inputImage2Program->read(inColor2, x, y, sampler);
difference = (fabsf(inColor2[0] - inColor1[0]) +
fabsf(inColor2[1] - inColor1[1]) +

View File

@@ -43,7 +43,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();

View File

@@ -54,13 +54,13 @@ void DilateErodeThresholdOperation::initExecution()
}
}
void *DilateErodeThresholdOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *DilateErodeThresholdOperation::initializeTileData(rcti *rect)
{
void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
void *buffer = this->m_inputProgram->initializeTileData(NULL);
return buffer;
}
void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, void *data)
{
float inputValue[4];
const float sw = this->m__switch;
@@ -80,7 +80,7 @@ void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, Mem
const int bufferWidth = rect->xmax - rect->xmin;
int offset;
this->m_inputProgram->read(inputValue, x, y, inputBuffers, NULL);
this->m_inputProgram->read(inputValue, x, y, NULL);
if (inputValue[0] > sw) {
for (int yi = miny; yi < maxy; yi++) {
const float dy = yi - y;
@@ -179,13 +179,13 @@ void DilateDistanceOperation::initExecution()
}
}
void *DilateDistanceOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *DilateDistanceOperation::initializeTileData(rcti *rect)
{
void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
void *buffer = this->m_inputProgram->initializeTileData(NULL);
return buffer;
}
void DilateDistanceOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void DilateDistanceOperation::executePixel(float *color, int x, int y, void *data)
{
const float distance = this->m_distance;
const float mindist = distance * distance;
@@ -259,7 +259,7 @@ ErodeDistanceOperation::ErodeDistanceOperation() : DilateDistanceOperation()
/* pass */
}
void ErodeDistanceOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void ErodeDistanceOperation::executePixel(float *color, int x, int y, void *data)
{
const float distance = this->m_distance;
const float mindist = distance * distance;
@@ -325,14 +325,14 @@ void DilateStepOperation::initExecution()
this->initMutex();
}
void *DilateStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *DilateStepOperation::initializeTileData(rcti *rect)
{
if (this->m_cached_buffer != NULL) {
return this->m_cached_buffer;
}
lockMutex();
if (this->m_cached_buffer == NULL) {
MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
float *rectf = buffer->convertToValueBuffer();
int x, y, i;
float *p;
@@ -374,7 +374,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryB
}
void DilateStepOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void DilateStepOperation::executePixel(float *color, int x, int y, void *data)
{
color[0] = this->m_cached_buffer[y * this->getWidth() + x];
}
@@ -412,14 +412,14 @@ ErodeStepOperation::ErodeStepOperation() : DilateStepOperation()
/* pass */
}
void *ErodeStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
void *ErodeStepOperation::initializeTileData(rcti *rect)
{
if (this->m_cached_buffer != NULL) {
return this->m_cached_buffer;
}
lockMutex();
if (this->m_cached_buffer == NULL) {
MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
float *rectf = buffer->convertToValueBuffer();
int x, y, i;
float *p;

View File

@@ -47,14 +47,14 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
*/
void initExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* Deinitialize the execution
*/
@@ -83,14 +83,14 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
*/
void initExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* Deinitialize the execution
*/
@@ -111,7 +111,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
void executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
@@ -135,14 +135,14 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution
*/
void initExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
/**
* Deinitialize the execution
*/
@@ -157,7 +157,7 @@ class ErodeStepOperation : public DilateStepOperation {
public:
ErodeStepOperation();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void *initializeTileData(rcti *rect);
};
#endif

View File

@@ -66,12 +66,12 @@ void DirectionalBlurOperation::initExecution()
}
void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void DirectionalBlurOperation::executePixel(float *color, int x, int y, void *data)
{
const int iterations = pow(2.0f, this->m_data->iter);
float col[4] = {0, 0, 0, 0};
float col2[4] = {0, 0, 0, 0};
this->m_inputProgram->read(col2, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputProgram->read(col2, x, y, COM_PS_NEAREST);
float ltx = this->m_tx;
float lty = this->m_ty;
float lsc = this->m_sc;
@@ -87,7 +87,7 @@ void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBu
this->m_inputProgram->read(col,
cs * u + ss * v + this->m_center_x_pix,
cs * v - ss * u + this->m_center_y_pix,
COM_PS_NEAREST, inputBuffers);
COM_PS_NEAREST);
add_v4_v4(col2, col);

View File

@@ -40,7 +40,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution

View File

@@ -54,7 +54,7 @@ void DisplaceOperation::initExecution()
* in order to take effect */
#define DISPLACE_EPSILON 0.01f
void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
void DisplaceOperation::executePixel(float *color, int x, int y, void *data)
{
float inVector[4];
float inScale[4];
@@ -64,9 +64,9 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
float dxt, dyt;
float u, v;
this->m_inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST);
float xs = inScale[0];
this->m_inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST);
float ys = inScale[0];
/* clamp x and y displacement to triple image resolution -
@@ -74,7 +74,7 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
CLAMP(xs, -this->m_width_x4, this->m_width_x4);
CLAMP(ys, -this->m_height_x4, this->m_height_x4);
this->m_inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST, inputBuffers);
this->m_inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST);
p_dx = inVector[0] * xs;
p_dy = inVector[1] * ys;
@@ -83,9 +83,9 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
v = y - p_dy + 0.5f;
/* calc derivatives */
this->m_inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST, inputBuffers);
this->m_inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST);
d_dx = inVector[0] * xs;
this->m_inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST, inputBuffers);
this->m_inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST);
d_dy = inVector[1] * ys;
/* clamp derivatives to minimum displacement distance in UV space */
@@ -96,7 +96,7 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
dyt = signf(dyt) * maxf(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
/* EWA filtering */
this->m_inputColorProgram->read(color, u, v, dxt, dyt, inputBuffers);
this->m_inputColorProgram->read(color, u, v, dxt, dyt);
}
void DisplaceOperation::deinitExecution()

View File

@@ -48,7 +48,7 @@ public:
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
void executePixel(float *color, int x, int y, void *data);
/**
* Initialize the execution

Some files were not shown because too many files have changed in this diff Show More