Blender  V3.3
COM_PlaneDistortCommonOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2013 Blender Foundation. */
3 
4 #pragma once
5 
6 #include <string.h>
7 
9 
10 #include "DNA_movieclip_types.h"
11 #include "DNA_tracking_types.h"
12 
13 #include "BLI_listbase.h"
14 #include "BLI_string.h"
15 
16 namespace blender::compositor {
17 
18 #define PLANE_DISTORT_MAX_SAMPLES 64
19 
21  protected:
22  struct MotionSample {
23  float frame_space_corners[4][2]; /* Corners coordinates in pixel space. */
24  float perspective_matrix[3][3];
25  };
29 
30  public:
32 
33  void set_motion_blur_samples(int samples)
34  {
36  motion_blur_samples_ = samples;
37  }
38  void set_motion_blur_shutter(float shutter)
39  {
40  motion_blur_shutter_ = shutter;
41  }
42 
43  virtual void calculate_corners(const float corners[4][2], bool normalized, int sample);
44 
45  private:
46  friend class PlaneTrackCommon;
47 };
48 
50  protected:
52 
53  public:
55 
56  void calculate_corners(const float corners[4][2], bool normalized, int sample) override;
57 
58  void init_execution() override;
59  void deinit_execution() override;
60 
61  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
62 
64  ReadBufferOperation *read_operation,
65  rcti *output) override;
66 
67  void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override;
69  const rcti &area,
70  Span<MemoryBuffer *> inputs) override;
71 };
72 
74  protected:
75  int osa_;
76  float jitter_[32][2];
77 
78  public:
80 
81  void init_execution() override;
82 
83  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
84 
86  const rcti &area,
87  Span<MemoryBuffer *> inputs) override;
88 
89  private:
90  int get_jitter_samples_inside_count(int x, int y, MotionSample &sample_data);
91 };
92 
93 } // namespace blender::compositor
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define PLANE_DISTORT_MAX_SAMPLES
_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
SIMD_FORCE_INLINE btVector3 normalized() const
Return a normalized version of this vector.
a MemoryBuffer contains access to the data of a chunk
NodeOperation contains calculation logic.
virtual void calculate_corners(const float corners[4][2], bool normalized, int sample)
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void calculate_corners(const float corners[4][2], bool normalized, int sample) override
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
static void area(int d1, int d2, int e1, int e2, float weights[2])
static void sample(SocketReader *reader, int x, int y, float color[4])
static bNodeSocketTemplate inputs[]