Differential D1082 Diff 3432 source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
| Context not available. | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| extern "C" { | |||||
| #include "IMB_colormanagement.h" | |||||
| } | |||||
| CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : CalculateMeanOperation() | CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : CalculateMeanOperation() | ||||
| { | { | ||||
| Context not available. | |||||
| switch (this->m_setting) { | switch (this->m_setting) { | ||||
| case 1: /* rgb combined */ | case 1: /* rgb combined */ | ||||
| { | { | ||||
| float value = rgb_to_bw(&buffer[offset]); | float value = IMB_colormanagement_get_luminance(&buffer[offset]); | ||||
| sum += (value - mean) * (value - mean); | sum += (value - mean) * (value - mean); | ||||
| break; | break; | ||||
| } | } | ||||
| Context not available. | |||||