![]() |
Blender V2.61 - r43446
|
#include "node_composite_util.h"Go to the source code of this file.
Defines | |
| #define | INIT_C3 |
| #define | COLOR_DISTANCE_C3(c1, c2) |
| #define | KERNEL_ELEMENT_C3(k) |
| #define | UPDATE_OUTPUT_C3 |
| #define | INIT_3X3_DELTAS(deltas, step, nch) |
Functions | |
| static void | node_composit_exec_bilateralblur (void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) |
| static void | node_composit_init_bilateralblur (bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) |
| void | register_node_type_cmp_bilateralblur (bNodeTreeType *ttype) |
Variables | |
| static bNodeSocketTemplate | cmp_node_bilateralblur_in [] |
| static bNodeSocketTemplate | cmp_node_bilateralblur_out [] |
Definition in file node_composite_bilateralblur.c.
| #define COLOR_DISTANCE_C3 | ( | c1, | |
| c2 | |||
| ) |
((c1[0] - c2[0])*(c1[0] - c2[0]) + \
(c1[1] - c2[1])*(c1[1] - c2[1]) + \
(c1[2] - c2[2])*(c1[2] - c2[2]) + \
(c1[3] - c2[3])*(c1[3] - c2[3]))
Definition at line 54 of file node_composite_bilateralblur.c.
| #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));
Definition at line 83 of file node_composite_bilateralblur.c.
Referenced by node_composit_exec_bilateralblur().
| #define INIT_C3 |
mean0 = 1; \
mean1[0] = src[0]; \
mean1[1] = src[1]; \
mean1[2] = src[2]; \
mean1[3] = src[3];
Definition at line 46 of file node_composite_bilateralblur.c.
Referenced by node_composit_exec_bilateralblur().
| #define KERNEL_ELEMENT_C3 | ( | k | ) |
temp_color = src + deltas[k]; \
ref_color = ref + deltas[k]; \
w = weight_tab[k] + \
(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;
Definition at line 62 of file node_composite_bilateralblur.c.
Referenced by node_composit_exec_bilateralblur().
| #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;
Definition at line 75 of file node_composite_bilateralblur.c.
Referenced by node_composit_exec_bilateralblur().
| static void node_composit_exec_bilateralblur | ( | void * | UNUSEDdata, |
| bNode * | node, | ||
| bNodeStack ** | in, | ||
| bNodeStack ** | out | ||
| ) | [static] |
Definition at line 92 of file node_composite_bilateralblur.c.
References alloc_compbuf(), CB_RGBA, CB_VAL, CB_VEC2, CB_VEC3, data, bNodeStack::data, dupalloc_compbuf(), ELEM3, bNode::exec, free_compbuf(), i, INIT_3X3_DELTAS, INIT_C3, NodeBilateralBlurData::iter, KERNEL_ELEMENT_C3, NODE_BREAK, NULL, CompBuf::rect, NodeBilateralBlurData::sigma_color, NodeBilateralBlurData::sigma_space, step(), bNode::storage, SWAP, CompBuf::type, typecheck_compbuf(), UPDATE_OUTPUT_C3, simple_enum_gen::w, CompBuf::x, CompBuf::xof, CompBuf::y, and CompBuf::yof.
Referenced by register_node_type_cmp_bilateralblur().
| static void node_composit_init_bilateralblur | ( | bNodeTree * | UNUSEDntree, |
| bNode * | node, | ||
| bNodeTemplate * | UNUSEDntemp | ||
| ) | [static] |
Definition at line 253 of file node_composite_bilateralblur.c.
References MEM_callocN(), NodeBilateralBlurData::sigma_color, NodeBilateralBlurData::sigma_space, and bNode::storage.
Referenced by register_node_type_cmp_bilateralblur().
| void register_node_type_cmp_bilateralblur | ( | bNodeTreeType * | ttype | ) |
Definition at line 261 of file node_composite_bilateralblur.c.
References CMP_NODE_BILATERALBLUR, NODE_CLASS_OP_FILTER, node_composit_exec_bilateralblur(), node_composit_init_bilateralblur(), node_copy_standard_storage(), node_free_standard_storage(), NODE_OPTIONS, node_type_base(), node_type_exec(), node_type_init(), node_type_size(), node_type_socket_templates(), node_type_storage(), and nodeRegisterType().
Referenced by registerCompositNodes().
bNodeSocketTemplate cmp_node_bilateralblur_in[] [static] |
{
{ SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
{ SOCK_RGBA, 1, "Determinator", 1.0f, 1.0f, 1.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 35 of file node_composite_bilateralblur.c.
bNodeSocketTemplate cmp_node_bilateralblur_out[] [static] |
{
{ SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
}
Definition at line 41 of file node_composite_bilateralblur.c.