Blender V4.3
COM_GaussianAlphaBlurBaseOperation.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8
9namespace blender::compositor {
10
12 protected:
13 float *gausstab_;
15 int falloff_; /* Falloff for #distbuf_inv. */
18 float rad_;
20
21 public:
23
24 virtual void init_data() override;
25 virtual void init_execution() override;
26 virtual void deinit_execution() override;
27
28 void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) final;
30 const rcti &area,
31 Span<MemoryBuffer *> inputs) final;
32
36 void set_subtract(bool subtract)
37 {
38 do_subtract_ = subtract;
39 }
40 void set_falloff(int falloff)
41 {
42 falloff_ = falloff;
43 }
44
45 BLI_INLINE float finv_test(const float f, const bool test)
46 {
47 return (LIKELY(test == false)) ? f : 1.0f - f;
48 }
49};
50
55
60
61} // 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