Blender  V3.3
COM_GaussianAlphaBlurBaseOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2021 Blender Foundation. */
3 
4 #pragma once
5 
7 
8 namespace blender::compositor {
9 
11  protected:
12  float *gausstab_;
13  float *distbuf_inv_;
14  int falloff_; /* Falloff for #distbuf_inv. */
17  float rad_;
19 
20  public:
22 
23  virtual void init_data() override;
24  virtual void init_execution() override;
25  virtual void deinit_execution() override;
26 
27  void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) final;
29  const rcti &area,
31 
35  void set_subtract(bool subtract)
36  {
37  do_subtract_ = subtract;
38  }
39  void set_falloff(int falloff)
40  {
41  falloff_ = falloff;
42  }
43 
44  BLI_INLINE float finv_test(const float f, const bool test)
45  {
46  return (LIKELY(test == false)) ? f : 1.0f - f;
47  }
48 };
49 
50 } // namespace blender::compositor
#define BLI_INLINE
#define LIKELY(x)
BLI_INLINE float finv_test(const float f, const bool test)
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) final
Get input operation area being read by this operation on rendering given output area.
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) final
a MemoryBuffer contains access to the data of a chunk
ccl_global KernelShaderEvalInput ccl_global float * output
static void area(int d1, int d2, int e1, int e2, float weights[2])
static bNodeSocketTemplate inputs[]