Blender  V2.93
COM_ScreenLensDistortionOperation.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
20 
21 #include "BLI_math.h"
22 #include "BLI_rand.h"
23 #include "BLI_utildefines.h"
24 
25 #include "PIL_time.h"
26 
27 namespace blender::compositor {
28 
30 {
35  this->flags.complex = true;
36  this->m_inputProgram = nullptr;
37  this->m_distortion = 0.0f;
38  this->m_dispersion = 0.0f;
39  this->m_distortion_const = false;
40  this->m_dispersion_const = false;
41  this->m_variables_ready = false;
42 }
43 
45 {
46  m_distortion = distortion;
47  m_distortion_const = true;
48 }
49 
51 {
52  m_dispersion = dispersion;
53  m_dispersion_const = true;
54 }
55 
57 {
58  this->m_inputProgram = this->getInputSocketReader(0);
59  this->initMutex();
60 
61  uint rng_seed = (uint)(PIL_check_seconds_timer_i() & UINT_MAX);
62  rng_seed ^= (uint)POINTER_AS_INT(m_inputProgram);
63  this->m_rng = BLI_rng_new(rng_seed);
64 
65  this->m_cx = 0.5f * (float)getWidth();
66  this->m_cy = 0.5f * (float)getHeight();
67 
68  /* if both are constant, init variables once */
69  if (m_distortion_const && m_dispersion_const) {
70  updateVariables(m_distortion, m_dispersion);
71  m_variables_ready = true;
72  }
73 }
74 
76 {
77  void *buffer = this->m_inputProgram->initializeTileData(nullptr);
78 
79  /* get distortion/dispersion values once, by reading inputs at (0,0)
80  * XXX this assumes invariable values (no image inputs),
81  * we don't have a nice generic system for that yet
82  */
83  if (!m_variables_ready) {
84  this->lockMutex();
85 
86  if (!m_distortion_const) {
87  float result[4];
89  m_distortion = result[0];
90  }
91  if (!m_dispersion_const) {
92  float result[4];
94  m_dispersion = result[0];
95  }
96 
97  updateVariables(m_distortion, m_dispersion);
98  m_variables_ready = true;
99 
100  this->unlockMutex();
101  }
102 
103  return buffer;
104 }
105 
106 void ScreenLensDistortionOperation::get_uv(const float xy[2], float uv[2]) const
107 {
108  uv[0] = m_sc * ((xy[0] + 0.5f) - m_cx) / m_cx;
109  uv[1] = m_sc * ((xy[1] + 0.5f) - m_cy) / m_cy;
110 }
111 
112 void ScreenLensDistortionOperation::distort_uv(const float uv[2], float t, float xy[2]) const
113 {
114  float d = 1.0f / (1.0f + sqrtf(t));
115  xy[0] = (uv[0] * d + 0.5f) * getWidth() - 0.5f;
116  xy[1] = (uv[1] * d + 0.5f) * getHeight() - 0.5f;
117 }
118 
119 bool ScreenLensDistortionOperation::get_delta(float r_sq,
120  float k4,
121  const float uv[2],
122  float delta[2]) const
123 {
124  float t = 1.0f - k4 * r_sq;
125  if (t >= 0.0f) {
126  distort_uv(uv, t, delta);
127  return true;
128  }
129 
130  return false;
131 }
132 
133 void ScreenLensDistortionOperation::accumulate(MemoryBuffer *buffer,
134  int a,
135  int b,
136  float r_sq,
137  const float uv[2],
138  const float delta[3][2],
139  float sum[4],
140  int count[3]) const
141 {
142  float color[4];
143 
144  float dsf = len_v2v2(delta[a], delta[b]) + 1.0f;
145  int ds = m_jitter ? (dsf < 4.0f ? 2 : (int)sqrtf(dsf)) : (int)dsf;
146  float sd = 1.0f / (float)ds;
147 
148  float k4 = m_k4[a];
149  float dk4 = m_dk4[a];
150 
151  for (float z = 0; z < ds; z++) {
152  float tz = (z + (m_jitter ? BLI_rng_get_float(m_rng) : 0.5f)) * sd;
153  float t = 1.0f - (k4 + tz * dk4) * r_sq;
154 
155  float xy[2];
156  distort_uv(uv, t, xy);
157  buffer->readBilinear(color, xy[0], xy[1]);
158 
159  sum[a] += (1.0f - tz) * color[a];
160  sum[b] += (tz)*color[b];
161  count[a]++;
162  count[b]++;
163  }
164 }
165 
167 {
169  float xy[2] = {(float)x, (float)y};
170  float uv[2];
171  get_uv(xy, uv);
172  float uv_dot = len_squared_v2(uv);
173 
174  int count[3] = {0, 0, 0};
175  float delta[3][2];
176  float sum[4] = {0, 0, 0, 0};
177 
178  bool valid_r = get_delta(uv_dot, m_k4[0], uv, delta[0]);
179  bool valid_g = get_delta(uv_dot, m_k4[1], uv, delta[1]);
180  bool valid_b = get_delta(uv_dot, m_k4[2], uv, delta[2]);
181 
182  if (valid_r && valid_g && valid_b) {
183  accumulate(buffer, 0, 1, uv_dot, uv, delta, sum, count);
184  accumulate(buffer, 1, 2, uv_dot, uv, delta, sum, count);
185 
186  if (count[0]) {
187  output[0] = 2.0f * sum[0] / (float)count[0];
188  }
189  if (count[1]) {
190  output[1] = 2.0f * sum[1] / (float)count[1];
191  }
192  if (count[2]) {
193  output[2] = 2.0f * sum[2] / (float)count[2];
194  }
195 
196  /* set alpha */
197  output[3] = 1.0f;
198  }
199  else {
200  zero_v4(output);
201  }
202 }
203 
205 {
206  this->deinitMutex();
207  this->m_inputProgram = nullptr;
208  BLI_rng_free(this->m_rng);
209 }
210 
211 void ScreenLensDistortionOperation::determineUV(float result[6], float x, float y) const
212 {
213  const float xy[2] = {x, y};
214  float uv[2];
215  get_uv(xy, uv);
216  float uv_dot = len_squared_v2(uv);
217 
218  copy_v2_v2(result + 0, xy);
219  copy_v2_v2(result + 2, xy);
220  copy_v2_v2(result + 4, xy);
221  get_delta(uv_dot, m_k4[0], uv, result + 0);
222  get_delta(uv_dot, m_k4[1], uv, result + 2);
223  get_delta(uv_dot, m_k4[2], uv, result + 4);
224 }
225 
227  rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output)
228 {
229  rcti newInputValue;
230  newInputValue.xmin = 0;
231  newInputValue.ymin = 0;
232  newInputValue.xmax = 2;
233  newInputValue.ymax = 2;
234 
235  NodeOperation *operation = getInputOperation(1);
236  if (operation->determineDependingAreaOfInterest(&newInputValue, readOperation, output)) {
237  return true;
238  }
239 
240  operation = getInputOperation(2);
241  if (operation->determineDependingAreaOfInterest(&newInputValue, readOperation, output)) {
242  return true;
243  }
244 
245  /* XXX the original method of estimating the area-of-interest does not work
246  * it assumes a linear increase/decrease of mapped coordinates, which does not
247  * yield correct results for the area and leaves uninitialized buffer areas.
248  * So now just use the full image area, which may not be as efficient but works at least ...
249  */
250 #if 1
251  rcti imageInput;
252 
253  operation = getInputOperation(0);
254  imageInput.xmax = operation->getWidth();
255  imageInput.xmin = 0;
256  imageInput.ymax = operation->getHeight();
257  imageInput.ymin = 0;
258 
259  if (operation->determineDependingAreaOfInterest(&imageInput, readOperation, output)) {
260  return true;
261  }
262  return false;
263 #else
264  rcti newInput;
265  const float margin = 2;
266 
267  BLI_rcti_init_minmax(&newInput);
268 
269  if (m_dispersion_const && m_distortion_const) {
270  /* update from fixed distortion/dispersion */
271 # define UPDATE_INPUT(x, y) \
272  { \
273  float coords[6]; \
274  determineUV(coords, x, y); \
275  newInput.xmin = min_ffff(newInput.xmin, coords[0], coords[2], coords[4]); \
276  newInput.ymin = min_ffff(newInput.ymin, coords[1], coords[3], coords[5]); \
277  newInput.xmax = max_ffff(newInput.xmax, coords[0], coords[2], coords[4]); \
278  newInput.ymax = max_ffff(newInput.ymax, coords[1], coords[3], coords[5]); \
279  } \
280  (void)0
281 
282  UPDATE_INPUT(input->xmin, input->xmax);
283  UPDATE_INPUT(input->xmin, input->ymax);
284  UPDATE_INPUT(input->xmax, input->ymax);
285  UPDATE_INPUT(input->xmax, input->ymin);
286 
287 # undef UPDATE_INPUT
288  }
289  else {
290  /* use maximum dispersion 1.0 if not const */
291  float dispersion = m_dispersion_const ? m_dispersion : 1.0f;
292 
293 # define UPDATE_INPUT(x, y, distortion) \
294  { \
295  float coords[6]; \
296  updateVariables(distortion, dispersion); \
297  determineUV(coords, x, y); \
298  newInput.xmin = min_ffff(newInput.xmin, coords[0], coords[2], coords[4]); \
299  newInput.ymin = min_ffff(newInput.ymin, coords[1], coords[3], coords[5]); \
300  newInput.xmax = max_ffff(newInput.xmax, coords[0], coords[2], coords[4]); \
301  newInput.ymax = max_ffff(newInput.ymax, coords[1], coords[3], coords[5]); \
302  } \
303  (void)0
304 
305  if (m_distortion_const) {
306  /* update from fixed distortion */
307  UPDATE_INPUT(input->xmin, input->xmax, m_distortion);
308  UPDATE_INPUT(input->xmin, input->ymax, m_distortion);
309  UPDATE_INPUT(input->xmax, input->ymax, m_distortion);
310  UPDATE_INPUT(input->xmax, input->ymin, m_distortion);
311  }
312  else {
313  /* update from min/max distortion (-1..1) */
314  UPDATE_INPUT(input->xmin, input->xmax, -1.0f);
315  UPDATE_INPUT(input->xmin, input->ymax, -1.0f);
316  UPDATE_INPUT(input->xmax, input->ymax, -1.0f);
317  UPDATE_INPUT(input->xmax, input->ymin, -1.0f);
318 
319  UPDATE_INPUT(input->xmin, input->xmax, 1.0f);
320  UPDATE_INPUT(input->xmin, input->ymax, 1.0f);
321  UPDATE_INPUT(input->xmax, input->ymax, 1.0f);
322  UPDATE_INPUT(input->xmax, input->ymin, 1.0f);
323 
324 # undef UPDATE_INPUT
325  }
326  }
327 
328  newInput.xmin -= margin;
329  newInput.ymin -= margin;
330  newInput.xmax += margin;
331  newInput.ymax += margin;
332 
333  operation = getInputOperation(0);
334  if (operation->determineDependingAreaOfInterest(&newInput, readOperation, output)) {
335  return true;
336  }
337  return false;
338 #endif
339 }
340 
341 void ScreenLensDistortionOperation::updateVariables(float distortion, float dispersion)
342 {
343  m_k[1] = max_ff(min_ff(distortion, 1.0f), -0.999f);
344  // smaller dispersion range for somewhat more control
345  float d = 0.25f * max_ff(min_ff(dispersion, 1.0f), 0.0f);
346  m_k[0] = max_ff(min_ff((m_k[1] + d), 1.0f), -0.999f);
347  m_k[2] = max_ff(min_ff((m_k[1] - d), 1.0f), -0.999f);
348  m_maxk = max_fff(m_k[0], m_k[1], m_k[2]);
349  m_sc = (m_fit && (m_maxk > 0.0f)) ? (1.0f / (1.0f + 2.0f * m_maxk)) : (1.0f / (1.0f + m_maxk));
350  m_dk4[0] = 4.0f * (m_k[1] - m_k[0]);
351  m_dk4[1] = 4.0f * (m_k[2] - m_k[1]);
352  m_dk4[2] = 0.0f; /* unused */
353 
354  mul_v3_v3fl(m_k4, m_k, 4.0f);
355 }
356 
357 } // namespace blender::compositor
typedef float(TangentPoint)[2]
MINLINE float max_fff(float a, float b, float c)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void zero_v4(float r[4])
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
Random number functions.
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
Definition: rand.cc:76
struct RNG * BLI_rng_new(unsigned int seed)
Definition: rand.cc:54
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition: rand.cc:120
void BLI_rcti_init_minmax(struct rcti *rect)
Definition: rct.c:516
unsigned int uint
Definition: BLI_sys_types.h:83
#define POINTER_AS_INT(i)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Platform independent time functions.
#define output
static T sum(const btAlignedObjectArray< T > &items)
a MemoryBuffer contains access to the data of a chunk
NodeOperation contains calculation logic.
virtual void * initializeTileData(rcti *)
void readSampled(float result[4], float x, float y, PixelSampler sampler)
void addInputSocket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
NodeOperation * getInputOperation(unsigned int inputSocketindex)
void addOutputSocket(DataType datatype)
SocketReader * getInputSocketReader(unsigned int inputSocketindex)
virtual bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) override
void executePixel(float output[4], int x, int y, void *data) override
#define UINT_MAX
Definition: hash_md5.c:58
int count
#define sqrtf(x)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
static unsigned a[3]
Definition: RandGen.cpp:92
int ymin
Definition: DNA_vec_types.h:80
int ymax
Definition: DNA_vec_types.h:80
int xmin
Definition: DNA_vec_types.h:79
int xmax
Definition: DNA_vec_types.h:79
long int PIL_check_seconds_timer_i(void)
Definition: time.c:90