From 4dc59205258d5054fdcd452fe82ccd4b7ea76151 Mon Sep 17 00:00:00 2001 From: Manuel Castilla Date: Fri, 13 Nov 2020 08:19:39 +0100 Subject: [PATCH] Fix CalculateStandardDeviationOperation incorrect results for R G B channels Standard deviation formula wasn't being applied correctly when selecting R G B cases. Issue is there since Blender 2.64 as it was incorrectly ported over from the previous compositor. Reviewed By: Sergey Sharybin, Jeroen Bakker Differential Revision: https://developer.blender.org/D9384 --- .../operations/COM_CalculateStandardDeviationOperation.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp index 9ef77b9e5ea..9a1e48177ed 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp @@ -61,21 +61,18 @@ void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect) case 2: /* red */ { float value = buffer[offset]; - sum += value; sum += (value - mean) * (value - mean); break; } case 3: /* green */ { float value = buffer[offset + 1]; - sum += value; sum += (value - mean) * (value - mean); break; } case 4: /* blue */ { float value = buffer[offset + 2]; - sum += value; sum += (value - mean) * (value - mean); break; }