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:
authorCampbell Barton <ideasman42@gmail.com>2021-08-04 06:26:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-04 06:34:02 +0300
commitcd92b2350fc20f6c91128881b5fd20dd173d2308 (patch)
tree007091af21060efd82bac6377dee72f3083595bd /source/blender/compositor
parent10464843dd3b175c0841f8d9a3f26751c12c8579 (diff)
Cleanup: use C comments for descriptive text
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cc2
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.cc2
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cc46
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cc2
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cc12
5 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cc b/source/blender/compositor/nodes/COM_MaskNode.cc
index ef171c01653..b5b23798160 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cc
+++ b/source/blender/compositor/nodes/COM_MaskNode.cc
@@ -41,7 +41,7 @@ void MaskNode::convertToOperations(NodeConverter &converter,
NodeMask *data = (NodeMask *)editorNode->storage;
Mask *mask = (Mask *)editorNode->id;
- // always connect the output image
+ /* Always connect the output image. */
MaskOperation *operation = new MaskOperation();
if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED) {
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cc b/source/blender/compositor/nodes/COM_MovieClipNode.cc
index 50bd9b4d71b..b80071d27c7 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.cc
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.cc
@@ -62,7 +62,7 @@ void MovieClipNode::convertToOperations(NodeConverter &converter,
}
}
- // always connect the output image
+ /* Always connect the output image. */
MovieClipOperation *operation = new MovieClipOperation();
operation->setMovieClip(movieClip);
operation->setMovieClipUser(movieClipUser);
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cc b/source/blender/compositor/operations/COM_DilateErodeOperation.cc
index 2454f507664..e9305e0e192 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cc
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cc
@@ -24,7 +24,7 @@
namespace blender::compositor {
-// DilateErode Distance Threshold
+/* DilateErode Distance Threshold */
DilateErodeThresholdOperation::DilateErodeThresholdOperation()
{
this->addInputSocket(DataType::Value);
@@ -258,7 +258,7 @@ void DilateDistanceOperation::executeOpenCL(OpenCLDevice *device,
device->COM_clEnqueueRange(dilateKernel, outputMemoryBuffer, 7, this);
}
-// Erode Distance
+/* Erode Distance */
ErodeDistanceOperation::ErodeDistanceOperation() : DilateDistanceOperation()
{
/* pass */
@@ -318,7 +318,7 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device,
device->COM_clEnqueueRange(erodeKernel, outputMemoryBuffer, 7, this);
}
-// Dilate step
+/* Dilate step */
DilateStepOperation::DilateStepOperation()
{
this->addInputSocket(DataType::Value);
@@ -331,7 +331,7 @@ void DilateStepOperation::initExecution()
this->m_inputProgram = this->getInputSocketReader(0);
}
-// small helper to pass data from initializeTileData to executePixel
+/* Small helper to pass data from initializeTileData to executePixel. */
struct tile_info {
rcti rect;
int width;
@@ -370,21 +370,21 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
int bwidth = rect->xmax - rect->xmin;
int bheight = rect->ymax - rect->ymin;
- // NOTE: Cache buffer has original tilesize width, but new height.
- // We have to calculate the additional rows in the first pass,
- // to have valid data available for the second pass.
+ /* NOTE: Cache buffer has original tilesize width, but new height.
+ * We have to calculate the additional rows in the first pass,
+ * to have valid data available for the second pass. */
tile_info *result = create_cache(rect->xmin, rect->xmax, ymin, ymax);
float *rectf = result->buffer;
- // temp holds maxima for every step in the algorithm, buf holds a
- // single row or column of input values, padded with FLT_MAX's to
- // simplify the logic.
+ /* temp holds maxima for every step in the algorithm, buf holds a
+ * single row or column of input values, padded with FLT_MAX's to
+ * simplify the logic. */
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
float *buf = (float *)MEM_mallocN(sizeof(float) * (MAX2(bwidth, bheight) + 5 * half_window),
"dilate erode buf");
- // The following is based on the van Herk/Gil-Werman algorithm for morphology operations.
- // first pass, horizontal dilate/erode
+ /* The following is based on the van Herk/Gil-Werman algorithm for morphology operations.
+ * first pass, horizontal dilate/erode. */
for (y = ymin; y < ymax; y++) {
for (x = 0; x < bwidth + 5 * half_window; x++) {
buf[x] = -FLT_MAX;
@@ -409,7 +409,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
}
}
- // second pass, vertical dilate/erode
+ /* Second pass, vertical dilate/erode. */
for (x = 0; x < bwidth; x++) {
for (y = 0; y < bheight + 5 * half_window; y++) {
buf[y] = -FLT_MAX;
@@ -475,7 +475,7 @@ bool DilateStepOperation::determineDependingAreaOfInterest(rcti *input,
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
-// Erode step
+/* Erode step */
ErodeStepOperation::ErodeStepOperation() : DilateStepOperation()
{
/* pass */
@@ -500,21 +500,21 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
int bwidth = rect->xmax - rect->xmin;
int bheight = rect->ymax - rect->ymin;
- // NOTE: Cache buffer has original tilesize width, but new height.
- // We have to calculate the additional rows in the first pass,
- // to have valid data available for the second pass.
+ /* NOTE: Cache buffer has original tilesize width, but new height.
+ * We have to calculate the additional rows in the first pass,
+ * to have valid data available for the second pass. */
tile_info *result = create_cache(rect->xmin, rect->xmax, ymin, ymax);
float *rectf = result->buffer;
- // temp holds maxima for every step in the algorithm, buf holds a
- // single row or column of input values, padded with FLT_MAX's to
- // simplify the logic.
+ /* temp holds maxima for every step in the algorithm, buf holds a
+ * single row or column of input values, padded with FLT_MAX's to
+ * simplify the logic. */
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
float *buf = (float *)MEM_mallocN(sizeof(float) * (MAX2(bwidth, bheight) + 5 * half_window),
"dilate erode buf");
- // The following is based on the van Herk/Gil-Werman algorithm for morphology operations.
- // first pass, horizontal dilate/erode
+ /* The following is based on the van Herk/Gil-Werman algorithm for morphology operations.
+ * first pass, horizontal dilate/erode */
for (y = ymin; y < ymax; y++) {
for (x = 0; x < bwidth + 5 * half_window; x++) {
buf[x] = FLT_MAX;
@@ -539,7 +539,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
}
}
- // second pass, vertical dilate/erode
+ /* Second pass, vertical dilate/erode. */
for (x = 0; x < bwidth; x++) {
for (y = 0; y < bheight + 5 * half_window; y++) {
buf[y] = FLT_MAX;
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cc b/source/blender/compositor/operations/COM_OutputFileOperation.cc
index 7e896046f01..6c5984e3414 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cc
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cc
@@ -160,7 +160,7 @@ int get_datatype_size(DataType datatype)
static float *init_buffer(unsigned int width, unsigned int height, DataType datatype)
{
- // When initializing the tree during initial load the width and height can be zero.
+ /* When initializing the tree during initial load the width and height can be zero. */
if (width != 0 && height != 0) {
int size = get_datatype_size(datatype);
return (float *)MEM_callocN(width * height * size * sizeof(float), "OutputFile buffer");
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cc b/source/blender/compositor/operations/COM_WrapOperation.cc
index d0d2fcac3ac..888602114cc 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cc
+++ b/source/blender/compositor/operations/COM_WrapOperation.cc
@@ -57,20 +57,20 @@ void WrapOperation::executePixelSampled(float output[4], float x, float y, Pixel
MemoryBufferExtend extend_x = MemoryBufferExtend::Clip, extend_y = MemoryBufferExtend::Clip;
switch (m_wrappingType) {
case CMP_NODE_WRAP_NONE:
- // Intentionally empty, originalXPos and originalYPos have been set before
+ /* Intentionally empty, originalXPos and originalYPos have been set before. */
break;
case CMP_NODE_WRAP_X:
- // wrap only on the x-axis
+ /* Wrap only on the x-axis. */
nx = this->getWrappedOriginalXPos(x);
extend_x = MemoryBufferExtend::Repeat;
break;
case CMP_NODE_WRAP_Y:
- // wrap only on the y-axis
+ /* Wrap only on the y-axis. */
ny = this->getWrappedOriginalYPos(y);
extend_y = MemoryBufferExtend::Repeat;
break;
case CMP_NODE_WRAP_XY:
- // wrap on both
+ /* Wrap on both. */
nx = this->getWrappedOriginalXPos(x);
ny = this->getWrappedOriginalYPos(y);
extend_x = MemoryBufferExtend::Repeat;
@@ -92,7 +92,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
newInput.ymax = input->ymax;
if (ELEM(m_wrappingType, CMP_NODE_WRAP_X, CMP_NODE_WRAP_XY)) {
- // wrap only on the x-axis if tile is wrapping
+ /* Wrap only on the x-axis if tile is wrapping. */
newInput.xmin = getWrappedOriginalXPos(input->xmin);
newInput.xmax = roundf(getWrappedOriginalXPos(input->xmax));
if (newInput.xmin >= newInput.xmax) {
@@ -101,7 +101,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
}
}
if (ELEM(m_wrappingType, CMP_NODE_WRAP_Y, CMP_NODE_WRAP_XY)) {
- // wrap only on the y-axis if tile is wrapping
+ /* Wrap only on the y-axis if tile is wrapping. */
newInput.ymin = getWrappedOriginalYPos(input->ymin);
newInput.ymax = roundf(getWrappedOriginalYPos(input->ymax));
if (newInput.ymin >= newInput.ymax) {