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>2012-04-02 06:41:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-02 06:41:28 +0400
commit670cdd5381b23b7ae1808262a12c0423c8fa73c7 (patch)
tree8947aaca6dfc415d8d346b4e5786e4548e566939 /source/blender/nodes
parent6c4d6757594dd942304048690ae539e51f9e9d0b (diff)
code cleanup:
always use if (...) even if the macros dont require it (confuses parsers) define macros without the ';'s included.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bilateralblur.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
index 8faa060244a..f42fd83c13d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
@@ -48,7 +48,8 @@ static bNodeSocketTemplate cmp_node_bilateralblur_out[]= {
mean1[0] = src[0]; \
mean1[1] = src[1]; \
mean1[2] = src[2]; \
- mean1[3] = src[3];
+ mean1[3] = src[3]; \
+ (void)0
/* finds color distances */
#define COLOR_DISTANCE_C3(c1, c2) \
@@ -66,25 +67,28 @@ static bNodeSocketTemplate cmp_node_bilateralblur_out[]= {
(double)COLOR_DISTANCE_C3(ref, ref_color ) * i2sigma_color; \
w = 1.0/(w*w + 1); \
mean0 += w; \
- mean1[0] += (double)temp_color[0]*w; \
- mean1[1] += (double)temp_color[1]*w; \
- mean1[2] += (double)temp_color[2]*w; \
- mean1[3] += (double)temp_color[3]*w;
+ mean1[0] += (double)temp_color[0] * w; \
+ mean1[1] += (double)temp_color[1] * w; \
+ mean1[2] += (double)temp_color[2] * w; \
+ mean1[3] += (double)temp_color[3] * w; \
+ (void)0
/* write blurred values to image */
#define UPDATE_OUTPUT_C3 \
mean0 = 1.0/mean0; \
- dest[x*pix + 0] = mean1[0]*mean0; \
- dest[x*pix + 1] = mean1[1]*mean0; \
- dest[x*pix + 2] = mean1[2]*mean0; \
- dest[x*pix + 3] = mean1[3]*mean0;
+ dest[x * pix + 0] = mean1[0] * mean0; \
+ dest[x * pix + 1] = mean1[1] * mean0; \
+ dest[x * pix + 2] = mean1[2] * mean0; \
+ dest[x * pix + 3] = mean1[3] * mean0; \
+ (void)0
/* initializes deltas for fast access to neighbor pixels */
#define INIT_3X3_DELTAS( deltas, step, nch ) \
((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \
(deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \
(deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \
- (deltas)[6] = (step), (deltas)[7] = (step) + (nch));
+ (deltas)[6] = (step), (deltas)[7] = (step) + (nch)); \
+ (void)0
/* code of this node was heavily inspired by the smooth function of opencv library.