25 {0,
nullptr, 0,
nullptr,
nullptr},
31 .default_value({0.0f, 0.0f, 0.0f, 1.0f})
32 .structure_type(StructureType::Dynamic);
48 constexpr static float luminance_coefficients_bt709_[3] = {0.2126f, 0.7152f, 0.0722f};
55 if (this->
get_input(
"Image").is_single_value()) {
72 this->
set_output(standard_deviation, standard_deviation_result);
130 const float4 mean_squared_difference_to_mean = sum_of_squared_difference_to_mean /
132 return math::sqrt(mean_squared_difference_to_mean);
139 output.set_single_value(value.x);
142 output.set_single_value(value.y);
145 output.set_single_value(value.z);
151 float luminance_coefficients[3];
162 this->
get_input(
"Channel").get_single_value_default<MenuValue>().value);
177 ntype.
ui_description =
"Compute average and standard deviation of pixel values";
#define NODE_CLASS_CONVERTER
#define CMP_NODE_VIEW_LEVELS
#define NOD_REGISTER_NODE(REGISTER_FUNC)
NodeOperation(Context &context, const bNode &node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
bool should_compute() const
void set_single_value(const T &value)
void allocate_single_value()
NodeOperation(Context &context, const bNode &node)
CMPNodeLevelsChannel get_channel()
void set_output(const float4 value, Result &output)
void execute_single_value()
float4 compute_standard_deviation(float4 mean)
void node_register_type(bNodeType &ntype)
float4 sum_squared_difference_color(Context &context, const Result &input, const float4 subtrahend)
Color minimum_color(Context &context, const Result &input)
ColorSceneLinear4f< eAlpha::Premultiplied > Color
Color maximum_color(Context &context, const Result &input)
float4 sum_color(Context &context, const Result &input)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
T reduce_mul(const VecBase< T, Size > &a)
static void node_declare(NodeDeclarationBuilder &b)
static const EnumPropertyItem channel_items[]
static void node_register()
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
BLI_INLINE void IMB_colormanagement_get_luminance_coefficients(float r_rgb[3])
@ CMP_NODE_LEVLES_LUMINANCE
@ CMP_NODE_LEVLES_LUMINANCE_BT709
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare