40 sum += (value - mean) * (value - mean);
46 sum += (value - mean) * (value - mean);
52 sum += (value - mean) * (value - mean);
58 sum += (value - mean) * (value - mean);
71 sum += (yuv[0] - mean) * (yuv[0] - mean);
97 join.
sum += chunk.sum;
98 join.num_pixels += chunk.num_pixels;
118 for (
const float *elem :
input->get_buffer_area(
area)) {
119 if (elem[3] <= 0.0f) {
123 result.sum += (value - mean) * (value - mean);
#define BLI_YUV_ITU_BT709
void rgb_to_yuv(float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static T sum(const btAlignedObjectArray< T > &items)
std::function< float(const float *elem)> setting_func_
float calc_mean(const MemoryBuffer *input)
SocketReader * image_reader_
Cached reference to the reader.
void calculate_mean(MemoryBuffer *tile)
void update_memory_buffer_started(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void execute_pixel(float output[4], int x, int y, void *data) override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
float standard_deviation_
void * initialize_tile_data(rcti *rect) override
void execute_work(const rcti &work_rect, std::function< void(const rcti &split_rect)> work_func)
a MemoryBuffer contains access to the data of a chunk
ExecutionSystem * exec_system_
virtual void * initialize_tile_data(rcti *)
ccl_global float * buffer
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_global KernelShaderEvalInput * input
static void area(int d1, int d2, int e1, int e2, float weights[2])
CalculateMeanOperation::PixelsSum PixelsSum
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
static bNodeSocketTemplate inputs[]