2
* Copyright 2011, Blender Foundation.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#ifndef _COM_FastGaussianBlurOperation_h
24
#define _COM_FastGaussianBlurOperation_h
26
#include "COM_BlurBaseOperation.h"
27
#include "DNA_node_types.h"
29
class FastGaussianBlurOperation : public BlurBaseOperation {
33
MemoryBuffer *m_iirgaus;
35
FastGaussianBlurOperation();
36
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
37
void executePixel(float output[4], int x, int y, void *data);
39
static void IIR_gauss(MemoryBuffer *src, float sigma, unsigned int channel, unsigned int xy);
40
void *initializeTileData(rcti *rect);
41
void deinitExecution();
46
FAST_GAUSS_OVERLAY_MIN = -1,
47
FAST_GAUSS_OVERLAY_NONE = 0,
48
FAST_GAUSS_OVERLAY_MAX = 1
51
class FastGaussianBlurValueOperation : public NodeOperation {
54
MemoryBuffer *m_iirgaus;
55
SocketReader *m_inputprogram;
58
* -1: re-mix with darker
60
* 1 re-mix with lighter */
63
FastGaussianBlurValueOperation();
64
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
65
void executePixel(float output[4], int x, int y, void *data);
67
void *initializeTileData(rcti *rect);
68
void deinitExecution();
70
void setSigma(float sigma) { this->m_sigma = sigma; }
72
/* used for DOF blurring ZBuffer */
73
void setOverlay(int overlay) { this->m_overlay = overlay; }