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` --- tests/gtests/blenlib/BLI_math_color_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/gtests') diff --git a/tests/gtests/blenlib/BLI_math_color_test.cc b/tests/gtests/blenlib/BLI_math_color_test.cc index 2118822a9d8..8989e6740a5 100644 --- a/tests/gtests/blenlib/BLI_math_color_test.cc +++ b/tests/gtests/blenlib/BLI_math_color_test.cc @@ -27,9 +27,9 @@ TEST(math_color, RGBToYUVRoundtrip) float orig_rgb[3] = {0.1f, 0.2f, 0.3f}; float yuv[3], rgb[3]; rgb_to_yuv(orig_rgb[0], orig_rgb[1], orig_rgb[2], - &yuv[0], &yuv[1], &yuv[2]); + &yuv[0], &yuv[1], &yuv[2], BLI_YUV_ITU_BT709); yuv_to_rgb(yuv[0], yuv[1], yuv[2], - &rgb[0], &rgb[1], &rgb[2]); + &rgb[0], &rgb[1], &rgb[2], BLI_YUV_ITU_BT709); EXPECT_V3_NEAR(orig_rgb, rgb, 1e-4); } -- cgit v1.2.3