Blender  V3.3
COM_BlurBaseOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
8 
9 #define MAX_GAUSSTAB_RADIUS 30000
10 
11 #include "BLI_simd.h"
12 
13 namespace blender::compositor {
14 
16  private:
17  bool extend_bounds_;
18 
19  protected:
20  static constexpr int IMAGE_INPUT_INDEX = 0;
21  static constexpr int SIZE_INPUT_INDEX = 1;
22 
23  protected:
24  BlurBaseOperation(DataType data_type8);
25  float *make_gausstab(float rad, int size);
26 #ifdef BLI_HAVE_SSE2
27  __m128 *convert_gausstab_sse(const float *gausstab, int size);
28 #endif
33  float *make_dist_fac_inverse(float rad, int size, int falloff);
34 
35  void update_size();
36 
43 
44  float size_;
46 
47  /* Flags for inheriting classes. */
49 
50  public:
51  virtual void init_data() override;
55  void init_execution() override;
56 
60  void deinit_execution() override;
61 
62  void set_data(const NodeBlurData *data);
63 
64  void set_size(float size)
65  {
66  size_ = size;
67  sizeavailable_ = true;
68  }
69 
70  void set_extend_bounds(bool extend_bounds)
71  {
72  extend_bounds_ = extend_bounds;
73  }
74 
75  int get_blur_size(eDimension dim) const;
76 
77  void determine_canvas(const rcti &preferred_area, rcti &r_area) override;
78 
79  virtual void get_area_of_interest(int input_idx,
80  const rcti &output_area,
81  rcti &r_input_area) override;
82 };
83 
84 } // namespace blender::compositor
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
void set_data(const NodeBlurData *data)
float * make_gausstab(float rad, int size)
void determine_canvas(const rcti &preferred_area, rcti &r_area) override
virtual 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.
float * make_dist_fac_inverse(float rad, int size, int falloff)
NodeOperation contains calculation logic.
DataType
possible data types for sockets
Definition: COM_defines.h:30