40 for (const int y : range_y) {
41 float4 accumulated_color = float4(0.0f);
42 for (const int x : IndexRange(area.xmin, area.xmax - area.xmin)) {
43 const float4 color = float4(image->get_elem(x, y));
44 accumulated_color += mode_ == eMode::Squared ? color * color : color;
45 copy_v4_v4(output->get_elem(x, y), accumulated_color);
53 for (const int x : range_x) {
54 float4 accumulated_color = float4(0.0f);
55 for (const int y : IndexRange(area.ymin, area.ymax - area.ymin)) {
56 const float4 color = float4(output->get_elem(x, y));
57 accumulated_color += color;
58 copy_v4_v4(output->get_elem(x, y), accumulated_color);
92 BLI_assert(area.xmin <= area.xmax && area.ymin <= area.ymax);
94 int2 lower_bound(area.xmin, area.ymin);
95 int2 upper_bound(area.xmax, area.ymax);
97 int2 corrected_lower_bound = lower_bound -
int2(1, 1);
98 int2 corrected_upper_bound;
102 float4 a,
b, c, d, addend, substrahend;
103 buffer->
read_elem_checked(corrected_upper_bound[0], corrected_upper_bound[1], a);
104 buffer->
read_elem_checked(corrected_lower_bound[0], corrected_lower_bound[1], d);
108 buffer->
read_elem_checked(corrected_upper_bound[0], corrected_lower_bound[1], c);
static T sum(const btAlignedObjectArray< T > &items)