From 42aac45d7f0e0f43725093e97ebb8175a95aa247 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 17 Mar 2015 14:15:05 +0100 Subject: Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance calculation. --- intern/opencolorio/fallback_impl.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'intern/opencolorio/fallback_impl.cc') diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc index d1493cb3ad5..136f427ee0e 100644 --- a/intern/opencolorio/fallback_impl.cc +++ b/intern/opencolorio/fallback_impl.cc @@ -162,6 +162,19 @@ const char *FallbackImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr * return "sRGB"; } +void FallbackImpl::configGetDefaultLumaCoefs(OCIO_ConstConfigRcPtr * /*config*/, float *rgb) +{ + /* Here we simply use the older Blender assumed primaries of + * ITU-BT.709 / sRGB, or 0.2126729 0.7151522 0.0721750. Brute + * force stupid, but only plausible option given no color management + * system in place. + */ + + rgb[0] = 0.2126729f; + rgb[1] = 0.7151522f; + rgb[2] = 0.0721750f; +} + int FallbackImpl::configGetNumLooks(OCIO_ConstConfigRcPtr * /*config*/) { return 0; -- cgit v1.2.3