|
Blender
V2.59
|
#include "../CMP_util.h"Go to the source code of this file.
Defines | |
| #define | INIT_C3 mean0 = 1; mean1[0] = src[0];mean1[1] = src[1];mean1[2] = src[2];mean1[3] = src[3]; |
| #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 (bNode *node) |
| void | register_node_type_cmp_bilateralblur (ListBase *lb) |
Variables | |
| static bNodeSocketType | cmp_node_bilateralblur_in [] |
| static bNodeSocketType | cmp_node_bilateralblur_out [] |
Definition in file CMP_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 52 of file CMP_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 80 of file CMP_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 48 of file CMP_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] + COLOR_DISTANCE_C3(ref, ref_color )*i2sigma_color;\
w = 1./(w*w + 1); \
mean0 += w;\
mean1[0] += temp_color[0]*w; \
mean1[1] += temp_color[1]*w; \
mean1[2] += temp_color[2]*w; \
mean1[3] += temp_color[3]*w;
Definition at line 60 of file CMP_bilateralblur.c.
Referenced by node_composit_exec_bilateralblur().
| #define UPDATE_OUTPUT_C3 |
mean0 = 1./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 72 of file CMP_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 89 of file CMP_bilateralblur.c.
References alloc_compbuf(), CB_RGBA, CB_VAL, CB_VEC2, CB_VEC3, 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, 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 | ( | bNode * | node | ) | [static] |
Definition at line 250 of file CMP_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 | ( | ListBase * | lb | ) |
Definition at line 258 of file CMP_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_storage(), and nodeRegisterType().
Referenced by registerCompositNodes().
bNodeSocketType cmp_node_bilateralblur_in[] [static] |
{
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 1, "Determinator", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 37 of file CMP_bilateralblur.c.
bNodeSocketType cmp_node_bilateralblur_out[] [static] |
{
{ SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 43 of file CMP_bilateralblur.c.