From 128506eeb1a2d87393061b4c9783289a5e4b3275 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sun, 29 Apr 2018 18:00:45 -0400 Subject: BLI Color: YUV to/from rgb colorspace option This commit does two things: - Adds an option to do the calculation in different color spaces (BT601 or BT709). - Changes the default caluclation from legacy BT601 to BT709. This affects several areas: - UI areas (mainly scopes) - ViewLevelsNode - Several other nodes that use `COM_ConvertOperation.h` --- .../compositor/operations/COM_CalculateStandardDeviationOperation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp') diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp index 6b238e53d7b..56b402f2b3b 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp @@ -87,7 +87,7 @@ void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect) case 5: /* luminance */ { float yuv[3]; - rgb_to_yuv(buffer[offset], buffer[offset + 1], buffer[offset + 2], &yuv[0], &yuv[1], &yuv[2]); + rgb_to_yuv(buffer[offset], buffer[offset + 1], buffer[offset + 2], &yuv[0], &yuv[1], &yuv[2], BLI_YUV_ITU_BT709); sum += (yuv[0] - mean) * (yuv[0] - mean); break; } -- cgit v1.2.3