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
This commit is contained in:
parent
db7d8281c5
commit
4dc5920525
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue