diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-31 08:04:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-31 08:04:58 +0400 |
commit | 21ac9ae461e19fa51c95c0e0a0413878cfd85d09 (patch) | |
tree | f599886882364311ef5b3ba51cfd555a84a8593c /source/blender/nodes | |
parent | f3792b0f2b37be665e70f94bcf2bbbe152bdf0ff (diff) |
code cleanup: use uppercase defines and change drawFCurveFade into static function.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/composite/node_composite_util.c | 8 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_colorSpill.c | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index 8e98c055157..ab3a363e703 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -881,12 +881,12 @@ static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My, else { // rectangular unsigned int k, Nym = Ny-1, stm = 1 << (Mx + My); for (i=0; stm>0; i++) { - #define pred(k) (((k & Nym) << Mx) + (k >> My)) - for (j=pred(i); j>i; j=pred(j)); + #define PRED(k) (((k & Nym) << Mx) + (k >> My)) + for (j=PRED(i); j>i; j=PRED(j)); if (j < i) continue; - for (k=i, j=pred(i); j!=i; k=j, j=pred(j), stm--) + for (k=i, j=PRED(i); j!=i; k=j, j=PRED(j), stm--) { t=data[j], data[j]=data[k], data[k]=t; } - #undef pred + #undef PRED stm--; } } diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c index 026d74aafc4..46d7c620aa8 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c @@ -33,7 +33,7 @@ #include "node_composite_util.h" -#define avg(a,b) ((a+b)/2) +#define AVG(a, b) ((a + b) / 2) /* ******************* Color Spill Supression ********************************* */ static bNodeSocketTemplate cmp_node_color_spill_in[]={ @@ -96,7 +96,7 @@ static void do_average_spillmap_red(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[0]-(ncs->limscale * avg(in[1], in[2]) ); + out[0]=in[0]-(ncs->limscale * AVG(in[1], in[2]) ); } static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) @@ -104,14 +104,14 @@ static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, floa NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[1], in[2]) )); } static void do_average_spillmap_green(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[1]-(ncs->limscale * avg(in[0], in[2]) ); + out[0]=in[1]-(ncs->limscale * AVG(in[0], in[2]) ); } static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) @@ -119,14 +119,14 @@ static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, fl NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[0], in[2]) )); } static void do_average_spillmap_blue(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[2]-(ncs->limscale * avg(in[0], in[1]) ); + out[0]=in[2]-(ncs->limscale * AVG(in[0], in[1]) ); } static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) @@ -134,7 +134,7 @@ static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, flo NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[0], in[1]) )); } static void do_apply_spillmap_red(bNode *node, float* out, float *in, float *map) |