Blender V2.61 - r43446
Defines | Functions | Variables

node_composite_bilateralblur.c File Reference

#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 []

Detailed Description

Definition in file node_composite_bilateralblur.c.


Define Documentation

#define COLOR_DISTANCE_C3 (   c1,
  c2 
)
Value:
((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 
)
Value:
((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
Value:
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)
Value:
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
Value:
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().


Function Documentation

static void node_composit_exec_bilateralblur ( void *  UNUSEDdata,
bNode node,
bNodeStack **  in,
bNodeStack **  out 
) [static]
static void node_composit_init_bilateralblur ( bNodeTree UNUSEDntree,
bNode node,
bNodeTemplate UNUSEDntemp 
) [static]
void register_node_type_cmp_bilateralblur ( bNodeTreeType ttype)

Variable Documentation

Initial value:
 {
    { 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.

Initial value:
 { 
    { SOCK_RGBA, 0, "Image"}, 
    { -1, 0, "" } 
}

Definition at line 41 of file node_composite_bilateralblur.c.