38 float vec[3] = {
x,
y, 1.0f};
40 uv[0] = vec[0] / vec[2];
41 uv[1] = vec[1] / vec[2];
43 deriv[0][0] = (matrix[0][0] - matrix[0][2] * uv[0]) / vec[2];
44 deriv[1][0] = (matrix[0][1] - matrix[0][2] * uv[1]) / vec[2];
45 deriv[0][1] = (matrix[1][0] - matrix[1][2] * uv[0]) / vec[2];
46 deriv[1][1] = (matrix[1][1] - matrix[1][2] * uv[1]) / vec[2];
66 float frame_corners[4][2] = {
70 for (
int i = 0; i < 4; i++) {
76 for (
int i = 0; i < 4; i++) {
133 for (
int i = 0; i < 4; i++) {
167 for (
int i = 0; i < 4; i++) {
173 for (
int i = 0; i < 4; i++) {
191 int inside_counter = 0;
196 point[1] =
y + this->m_jitter[
sample][1];
213 for (
int osa_sample = 0; osa_sample < this->
m_osa; osa_sample++) {
214 point[0] =
x + this->
m_jitter[osa_sample][0];
215 point[1] =
y + this->m_jitter[osa_sample][1];
228 output[0] = (
float)inside_counter / (this->
m_osa * this->m_motion_blur_samples);
typedef float(TangentPoint)[2]
void BKE_tracking_homography_between_two_quads(float reference_corners[4][2], float corners[4][2], float H[3][3])
void BLI_jitter_init(float(*jitarr)[2], int num)
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
void mul_m3_v3(const float M[3][3], float r[3])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void add_v4_v4(float r[4], const float a[4])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void zero_v4(float r[4])
#define INIT_MINMAX2(min, max)
_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 width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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
Read Guarded memory(de)allocation.
SIMD_FORCE_INLINE btVector3 normalized() const
Return a normalized version of this vector.
unsigned int getHeight() const
void addInputSocket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void addOutputSocket(DataType datatype)
unsigned int getWidth() const
void readFiltered(float result[4], float x, float y, float dx[2], float dy[2])
SocketReader * getInputSocketReader(unsigned int inputSocketindex)
virtual bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
PlaneDistortMaskOperation()
int m_motion_blur_samples
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void initExecution() override
void calculateCorners(const float corners[4][2], bool normalized, int sample)
MotionSample m_samples[PLANE_DISTORT_MAX_SAMPLES]
float m_motion_blur_shutter
SocketReader * m_pixelReader
int m_motion_blur_samples
void initExecution() override
float m_motion_blur_shutter
void deinitExecution() override
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) override
MotionSample m_samples[PLANE_DISTORT_MAX_SAMPLES]
void calculateCorners(const float corners[4][2], bool normalized, int sample)
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
PlaneDistortWarpImageOperation()
@ None
The bottom left of the input image is the bottom left of the working area of the node,...
static void sample(SocketReader *reader, int x, int y, float color[4])
BLI_INLINE void warpCoord(float x, float y, float matrix[3][3], float uv[2], float deriv[2][2])
float frameSpaceCorners[4][2]
float frameSpaceCorners[4][2]
float perspectiveMatrix[3][3]