2012-06-16 13:46:20 +00:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2019-02-18 07:21:50 +11:00
|
|
|
*
|
|
|
|
* Copyright 2011, Blender Foundation.
|
2012-06-16 13:46:20 +00:00
|
|
|
*/
|
|
|
|
|
2018-08-08 11:49:51 +10:00
|
|
|
#ifndef __COM_GAUSSIANALPHAYBLUROPERATION_H__
|
|
|
|
#define __COM_GAUSSIANALPHAYBLUROPERATION_H__
|
2012-06-16 13:46:20 +00:00
|
|
|
#include "COM_NodeOperation.h"
|
|
|
|
#include "COM_BlurBaseOperation.h"
|
|
|
|
|
|
|
|
class GaussianAlphaYBlurOperation : public BlurBaseOperation {
|
|
|
|
private:
|
2012-06-26 01:22:05 +00:00
|
|
|
float *m_gausstab;
|
|
|
|
float *m_distbuf_inv;
|
|
|
|
bool m_do_subtract;
|
|
|
|
int m_falloff;
|
2014-02-13 11:46:15 +01:00
|
|
|
int m_filtersize;
|
2012-07-13 12:24:42 +00:00
|
|
|
void updateGauss();
|
2012-06-16 13:46:20 +00:00
|
|
|
public:
|
|
|
|
GaussianAlphaYBlurOperation();
|
2018-06-17 17:05:29 +02:00
|
|
|
|
2012-06-16 13:46:20 +00:00
|
|
|
/**
|
|
|
|
* the inner loop of this program
|
|
|
|
*/
|
2012-08-10 14:07:24 +00:00
|
|
|
void executePixel(float output[4], int x, int y, void *data);
|
2018-06-17 17:05:29 +02:00
|
|
|
|
2012-06-16 13:46:20 +00:00
|
|
|
/**
|
2018-09-05 14:56:29 +10:00
|
|
|
* \brief initialize the execution
|
2012-06-16 13:46:20 +00:00
|
|
|
*/
|
|
|
|
void initExecution();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deinitialize the execution
|
|
|
|
*/
|
|
|
|
void deinitExecution();
|
2018-06-17 17:05:29 +02:00
|
|
|
|
2012-07-13 12:24:42 +00:00
|
|
|
void *initializeTileData(rcti *rect);
|
2012-06-16 13:46:20 +00:00
|
|
|
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
|
2012-06-16 14:40:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set subtract for Dilate/Erode functionality
|
|
|
|
*/
|
2012-06-26 01:22:05 +00:00
|
|
|
void setSubtract(bool subtract) { this->m_do_subtract = subtract; }
|
|
|
|
void setFalloff(int falloff) { this->m_falloff = falloff; }
|
2012-06-16 13:46:20 +00:00
|
|
|
};
|
|
|
|
#endif
|