Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DenoiseOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_DenoiseOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SMAAOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cc4
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cc7
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cc2
28 files changed, 53 insertions, 48 deletions
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h
index 751f1ad8d8e..28506ba36b5 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.h
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.h
@@ -39,7 +39,7 @@ class BokehImageOperation : public MultiThreadedOperation {
/**
* \brief Settings of the bokeh image
*/
- NodeBokehImage *data_;
+ const NodeBokehImage *data_;
/**
* \brief precalculate center of the image
@@ -119,7 +119,7 @@ class BokehImageOperation : public MultiThreadedOperation {
* \brief set the node data
* \param data:
*/
- void set_data(NodeBokehImage *data)
+ void set_data(const NodeBokehImage *data)
{
data_ = data;
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h
index 9f18d110f3c..7e976cab6b6 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.h
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h
@@ -22,7 +22,7 @@ class BoxMaskOperation : public MultiThreadedOperation {
float aspect_ratio_;
int mask_type_;
- NodeBoxMask *data_;
+ const NodeBoxMask *data_;
public:
BoxMaskOperation();
@@ -42,7 +42,7 @@ class BoxMaskOperation : public MultiThreadedOperation {
*/
void deinit_execution() override;
- void set_data(NodeBoxMask *data)
+ void set_data(const NodeBoxMask *data)
{
data_ = data;
}
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cc b/source/blender/compositor/operations/COM_BrightnessOperation.cc
index 764d5d64046..07d8035e615 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cc
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cc
@@ -47,7 +47,7 @@ void BrightnessOperation::execute_pixel_sampled(float output[4],
/*
* The algorithm is by Werner D. Streidt
* (http://visca.com/ffactory/archives/5-99/msg00021.html)
- * Extracted of OpenCV demhist.c
+ * Extracted of OpenCV `demhist.c`.
*/
if (contrast > 0) {
a = 1.0f - delta * 2.0f;
@@ -84,7 +84,7 @@ void BrightnessOperation::update_memory_buffer_partial(MemoryBuffer *output,
/*
* The algorithm is by Werner D. Streidt
* (http://visca.com/ffactory/archives/5-99/msg00021.html)
- * Extracted of OpenCV demhist.c
+ * Extracted of OpenCV `demhist.c`.
*/
float a, b;
if (contrast > 0) {
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cc b/source/blender/compositor/operations/COM_CurveBaseOperation.cc
index e92a2f08ed4..e7cbf0d28d5 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cc
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cc
@@ -33,7 +33,7 @@ void CurveBaseOperation::deinit_execution()
}
}
-void CurveBaseOperation::set_curve_mapping(CurveMapping *mapping)
+void CurveBaseOperation::set_curve_mapping(const CurveMapping *mapping)
{
/* duplicate the curve to avoid glitches while drawing, see bug T32374. */
if (curve_mapping_) {
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.h b/source/blender/compositor/operations/COM_CurveBaseOperation.h
index d30c64e3282..4a745c34f24 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.h
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.h
@@ -26,7 +26,7 @@ class CurveBaseOperation : public MultiThreadedOperation {
void init_execution() override;
void deinit_execution() override;
- void set_curve_mapping(CurveMapping *mapping);
+ void set_curve_mapping(const CurveMapping *mapping);
};
} // namespace blender::compositor
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.cc b/source/blender/compositor/operations/COM_DenoiseOperation.cc
index 1a199ba2eab..3f32eced0f8 100644
--- a/source/blender/compositor/operations/COM_DenoiseOperation.cc
+++ b/source/blender/compositor/operations/COM_DenoiseOperation.cc
@@ -163,7 +163,7 @@ void DenoiseOperation::deinit_execution()
SingleThreadedOperation::deinit_execution();
}
-static bool are_guiding_passes_noise_free(NodeDenoise *settings)
+static bool are_guiding_passes_noise_free(const NodeDenoise *settings)
{
switch (settings->prefilter) {
case CMP_NODE_DENOISE_PREFILTER_NONE:
@@ -201,7 +201,7 @@ void DenoiseOperation::generate_denoise(MemoryBuffer *output,
MemoryBuffer *input_color,
MemoryBuffer *input_normal,
MemoryBuffer *input_albedo,
- NodeDenoise *settings)
+ const NodeDenoise *settings)
{
BLI_assert(input_color->get_buffer());
if (!input_color->get_buffer()) {
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.h b/source/blender/compositor/operations/COM_DenoiseOperation.h
index 2b170bb9bb7..709b8843b93 100644
--- a/source/blender/compositor/operations/COM_DenoiseOperation.h
+++ b/source/blender/compositor/operations/COM_DenoiseOperation.h
@@ -37,7 +37,7 @@ class DenoiseOperation : public DenoiseBaseOperation {
/**
* \brief settings of the denoise node.
*/
- NodeDenoise *settings_;
+ const NodeDenoise *settings_;
public:
DenoiseOperation();
@@ -51,7 +51,7 @@ class DenoiseOperation : public DenoiseBaseOperation {
*/
void deinit_execution() override;
- void set_denoise_settings(NodeDenoise *settings)
+ void set_denoise_settings(const NodeDenoise *settings)
{
settings_ = settings;
}
@@ -66,7 +66,7 @@ class DenoiseOperation : public DenoiseBaseOperation {
MemoryBuffer *input_color,
MemoryBuffer *input_normal,
MemoryBuffer *input_albedo,
- NodeDenoise *settings);
+ const NodeDenoise *settings);
MemoryBuffer *create_memory_buffer(rcti *rect) override;
};
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
index e209bac2305..4e0b072dec9 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
@@ -11,7 +11,7 @@ namespace blender::compositor {
class DirectionalBlurOperation : public MultiThreadedOperation, public QualityStepHelper {
private:
SocketReader *input_program_;
- NodeDBlurData *data_;
+ const NodeDBlurData *data_;
float center_x_pix_, center_y_pix_;
float tx_, ty_;
@@ -39,7 +39,7 @@ class DirectionalBlurOperation : public MultiThreadedOperation, public QualitySt
ReadBufferOperation *read_operation,
rcti *output) override;
- void set_data(NodeDBlurData *data)
+ void set_data(const NodeDBlurData *data)
{
data_ = data;
}
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
index 2cb21be43ad..7b1a38618fd 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
@@ -13,7 +13,7 @@ namespace blender::compositor {
*/
class DistanceRGBMatteOperation : public MultiThreadedOperation {
protected:
- NodeChroma *settings_;
+ const NodeChroma *settings_;
SocketReader *input_image_program_;
SocketReader *input_key_program_;
@@ -33,7 +33,7 @@ class DistanceRGBMatteOperation : public MultiThreadedOperation {
void init_execution() override;
void deinit_execution() override;
- void set_settings(NodeChroma *node_chroma)
+ void set_settings(const NodeChroma *node_chroma)
{
settings_ = node_chroma;
}
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
index ea156cd19db..fed11d59b50 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
@@ -812,7 +812,7 @@ static void do_allEdgeDetection(unsigned int t,
if (!limask[a]) { /* If the inner mask is empty. */
if (lomask[a]) { /* If the outer mask is full. */
/*
- * Next we test all 4 directions around the current pixel: next/prev/up/down
+ * Next we test all 4 directions around the current pixel: next/previous/up/down
* The test ensures that the outer mask is empty and that the inner mask
* is also empty. If both conditions are true for any one of the 4 adjacent pixels
* then the current pixel is counted as being a true outer edge pixel.
@@ -882,7 +882,7 @@ static void do_adjacentEdgeDetection(unsigned int t,
if (!limask[a]) { /* If the inner mask is empty. */
if (lomask[a]) { /* If the outer mask is full. */
/*
- * Next we test all 4 directions around the current pixel: next/prev/up/down
+ * Next we test all 4 directions around the current pixel: next/previous/up/down
* The test ensures that the outer mask is empty and that the inner mask
* is also empty. If both conditions are true for any one of the 4 adjacent pixels
* then the current pixel is counted as being a true outer edge pixel.
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.h b/source/blender/compositor/operations/COM_GlareBaseOperation.h
index 4750086a119..0a2c5507a76 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.h
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.h
@@ -32,7 +32,7 @@ class GlareBaseOperation : public SingleThreadedOperation {
/**
* \brief settings of the glare node.
*/
- NodeGlare *settings_;
+ const NodeGlare *settings_;
bool is_output_rendered_;
@@ -47,7 +47,7 @@ class GlareBaseOperation : public SingleThreadedOperation {
*/
void deinit_execution() override;
- void set_glare_settings(NodeGlare *settings)
+ void set_glare_settings(const NodeGlare *settings)
{
settings_ = settings;
}
@@ -64,7 +64,9 @@ class GlareBaseOperation : public SingleThreadedOperation {
protected:
GlareBaseOperation();
- virtual void generate_glare(float *data, MemoryBuffer *input_tile, NodeGlare *settings) = 0;
+ virtual void generate_glare(float *data,
+ MemoryBuffer *input_tile,
+ const NodeGlare *settings) = 0;
MemoryBuffer *create_memory_buffer(rcti *rect) override;
};
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cc b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cc
index 8b52123b2f0..ade3f11a8b3 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cc
@@ -391,7 +391,7 @@ static void convolve(float *dst, MemoryBuffer *in1, MemoryBuffer *in2)
void GlareFogGlowOperation::generate_glare(float *data,
MemoryBuffer *input_tile,
- NodeGlare *settings)
+ const NodeGlare *settings)
{
int x, y;
float scale, u, v, r, w, d;
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
index 5e19f2ab2aa..2a74aeef048 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
@@ -16,7 +16,7 @@ class GlareFogGlowOperation : public GlareBaseOperation {
}
protected:
- void generate_glare(float *data, MemoryBuffer *input_tile, NodeGlare *settings) override;
+ void generate_glare(float *data, MemoryBuffer *input_tile, const NodeGlare *settings) override;
};
} // namespace blender::compositor
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.cc b/source/blender/compositor/operations/COM_GlareGhostOperation.cc
index e863f74d98a..13b7af2329e 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.cc
@@ -20,7 +20,7 @@ static float smooth_mask(float x, float y)
void GlareGhostOperation::generate_glare(float *data,
MemoryBuffer *input_tile,
- NodeGlare *settings)
+ const NodeGlare *settings)
{
const int qt = 1 << settings->quality;
const float s1 = 4.0f / (float)qt, s2 = 2.0f * s1;
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.h b/source/blender/compositor/operations/COM_GlareGhostOperation.h
index 644c2975676..db79358034a 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.h
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.h
@@ -16,7 +16,7 @@ class GlareGhostOperation : public GlareBaseOperation {
}
protected:
- void generate_glare(float *data, MemoryBuffer *input_tile, NodeGlare *settings) override;
+ void generate_glare(float *data, MemoryBuffer *input_tile, const NodeGlare *settings) override;
};
} // namespace blender::compositor
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc
index a656eb3c706..69182b56bee 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cc
@@ -7,7 +7,7 @@ namespace blender::compositor {
void GlareSimpleStarOperation::generate_glare(float *data,
MemoryBuffer *input_tile,
- NodeGlare *settings)
+ const NodeGlare *settings)
{
int i, x, y, ym, yp, xm, xp;
float c[4] = {0, 0, 0, 0}, tc[4] = {0, 0, 0, 0};
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
index 3c2d2fe2d0f..470af780eb2 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
@@ -16,7 +16,7 @@ class GlareSimpleStarOperation : public GlareBaseOperation {
}
protected:
- void generate_glare(float *data, MemoryBuffer *input_tile, NodeGlare *settings) override;
+ void generate_glare(float *data, MemoryBuffer *input_tile, const NodeGlare *settings) override;
};
} // namespace blender::compositor
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.cc b/source/blender/compositor/operations/COM_GlareStreaksOperation.cc
index 233eb8caf38..e4f06eb0e50 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.cc
@@ -7,7 +7,7 @@ namespace blender::compositor {
void GlareStreaksOperation::generate_glare(float *data,
MemoryBuffer *input_tile,
- NodeGlare *settings)
+ const NodeGlare *settings)
{
int x, y, n;
unsigned int nump = 0;
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.h b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
index 09ef30c339d..56afe3d8462 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.h
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
@@ -16,7 +16,7 @@ class GlareStreaksOperation : public GlareBaseOperation {
}
protected:
- void generate_glare(float *data, MemoryBuffer *input_tile, NodeGlare *settings) override;
+ void generate_glare(float *data, MemoryBuffer *input_tile, const NodeGlare *settings) override;
};
} // namespace blender::compositor
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.h b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
index 90870e3cca9..7930e32eda7 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.h
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
@@ -18,7 +18,7 @@ class GlareThresholdOperation : public MultiThreadedOperation {
/**
* \brief settings of the glare node.
*/
- NodeGlare *settings_;
+ const NodeGlare *settings_;
public:
GlareThresholdOperation();
@@ -38,7 +38,7 @@ class GlareThresholdOperation : public MultiThreadedOperation {
*/
void deinit_execution() override;
- void set_glare_settings(NodeGlare *settings)
+ void set_glare_settings(const NodeGlare *settings)
{
settings_ = settings;
}
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cc b/source/blender/compositor/operations/COM_MapValueOperation.cc
index 1353e0391a3..f55d394baa8 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cc
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cc
@@ -25,7 +25,7 @@ void MapValueOperation::execute_pixel_sampled(float output[4],
{
float src[4];
input_operation_->read_sampled(src, x, y, sampler);
- TexMapping *texmap = settings_;
+ const TexMapping *texmap = settings_;
float value = (src[0] + texmap->loc[0]) * texmap->size[0];
if (texmap->flag & TEXMAP_CLIP_MIN) {
if (value < texmap->min[0]) {
@@ -52,7 +52,7 @@ void MapValueOperation::update_memory_buffer_partial(MemoryBuffer *output,
{
for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) {
const float input = *it.in(0);
- TexMapping *texmap = settings_;
+ const TexMapping *texmap = settings_;
float value = (input + texmap->loc[0]) * texmap->size[0];
if (texmap->flag & TEXMAP_CLIP_MIN) {
if (value < texmap->min[0]) {
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.h b/source/blender/compositor/operations/COM_MapValueOperation.h
index 4c384e52c95..5c1f425c5bd 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.h
+++ b/source/blender/compositor/operations/COM_MapValueOperation.h
@@ -18,7 +18,7 @@ class MapValueOperation : public MultiThreadedOperation {
* Cached reference to the input_program
*/
SocketReader *input_operation_;
- TexMapping *settings_;
+ const TexMapping *settings_;
public:
/**
@@ -44,7 +44,7 @@ class MapValueOperation : public MultiThreadedOperation {
/**
* \brief set the TexMapping settings
*/
- void set_settings(TexMapping *settings)
+ void set_settings(const TexMapping *settings)
{
settings_ = settings;
}
diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc
index 11e51e81ef0..261426b31e2 100644
--- a/source/blender/compositor/operations/COM_SMAAOperation.cc
+++ b/source/blender/compositor/operations/COM_SMAAOperation.cc
@@ -12,7 +12,7 @@ extern "C" {
namespace blender::compositor {
/*
- * An implementation of Enhanced Subpixel Morphological Antialiasing (SMAA)
+ * An implementation of Enhanced Sub-pixel Morphological Anti-aliasing (SMAA)
*
* The algorithm was proposed by:
* Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cc b/source/blender/compositor/operations/COM_TonemapOperation.cc
index fa40cd36f4c..714625e483d 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cc
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cc
@@ -46,7 +46,7 @@ void TonemapOperation::execute_pixel(float output[4], int x, int y, void *data)
void PhotoreceptorTonemapOperation::execute_pixel(float output[4], int x, int y, void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
- NodeTonemap *ntm = data_;
+ const NodeTonemap *ntm = data_;
const float f = expf(-data_->f);
const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
@@ -233,7 +233,7 @@ void PhotoreceptorTonemapOperation::update_memory_buffer_partial(MemoryBuffer *o
Span<MemoryBuffer *> inputs)
{
AvgLogLum *avg = cached_instance_;
- NodeTonemap *ntm = data_;
+ const NodeTonemap *ntm = data_;
const float f = expf(-data_->f);
const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
const float ic = 1.0f - ntm->c;
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.h b/source/blender/compositor/operations/COM_TonemapOperation.h
index 7868aa140dc..4e68d432985 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.h
+++ b/source/blender/compositor/operations/COM_TonemapOperation.h
@@ -21,7 +21,7 @@ typedef struct AvgLogLum {
} AvgLogLum;
/**
- * \brief base class of tonemap, implementing the simple tonemap
+ * \brief base class of tone-map, implementing the simple tone-map
* \ingroup operation
*/
class TonemapOperation : public MultiThreadedOperation {
@@ -32,9 +32,9 @@ class TonemapOperation : public MultiThreadedOperation {
SocketReader *image_reader_;
/**
- * \brief settings of the Tonemap
+ * \brief settings of the Tone-map
*/
- NodeTonemap *data_;
+ const NodeTonemap *data_;
/**
* \brief temporarily cache of the execution storage
@@ -62,7 +62,7 @@ class TonemapOperation : public MultiThreadedOperation {
*/
void deinit_execution() override;
- void set_data(NodeTonemap *data)
+ void set_data(const NodeTonemap *data)
{
data_ = data;
}
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cc b/source/blender/compositor/operations/COM_VectorBlurOperation.cc
index 71c61a6e588..8add3924033 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cc
@@ -190,7 +190,10 @@ struct ZSpan {
float clipcrop;
};
-/* each zbuffer has coordinates transformed to local rect coordinates, so we can simply clip */
+/**
+ * Each Z-buffer has coordinates transformed to local rectangle coordinates,
+ * so we can simply clip.
+ */
void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty, float clipcrop)
{
memset(zspan, 0, sizeof(ZSpan));
@@ -528,7 +531,7 @@ void antialias_tagbuf(int xsize, int ysize, char *rectmove)
}
}
- /* last: pixels with 0 we fill in zbuffer, with 1 we skip for mask */
+ /* last: pixels with 0 we fill in Z-buffer, with 1 we skip for mask */
for (y = 2; y < ysize; y++) {
/* setup rows */
row1 = rectmove + (y - 2) * xsize;
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.h b/source/blender/compositor/operations/COM_VectorBlurOperation.h
index 9c83c0645c2..0c4d215b6d3 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.h
@@ -25,7 +25,7 @@ class VectorBlurOperation : public NodeOperation, public QualityStepHelper {
/**
* \brief settings of the glare node.
*/
- NodeBlurData *settings_;
+ const NodeBlurData *settings_;
float *cached_instance_;
@@ -49,7 +49,7 @@ class VectorBlurOperation : public NodeOperation, public QualityStepHelper {
void *initialize_tile_data(rcti *rect) override;
- void set_vector_blur_settings(NodeBlurData *settings)
+ void set_vector_blur_settings(const NodeBlurData *settings)
{
settings_ = settings;
}
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cc b/source/blender/compositor/operations/COM_ViewerOperation.cc
index aeadf8f255d..3bd5fa4ad14 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cc
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cc
@@ -156,7 +156,7 @@ void ViewerOperation::init_image()
ibuf->y = display_height_;
/* zero size can happen if no image buffers exist to define a sensible resolution */
if (ibuf->x > 0 && ibuf->y > 0) {
- imb_addrectfloatImBuf(ibuf);
+ imb_addrectfloatImBuf(ibuf, 4);
}
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;