diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-17 16:15:05 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-17 16:15:05 +0300 |
commit | 42aac45d7f0e0f43725093e97ebb8175a95aa247 (patch) | |
tree | 80ce127f3443711bf2f0c8f2a12cbc82f9f8c7ad /intern/opencolorio/fallback_impl.cc | |
parent | bf8ea6b60e69e6dd77d94c66cbcbab2a8e0b73f8 (diff) |
Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance
calculation.
Diffstat (limited to 'intern/opencolorio/fallback_impl.cc')
-rw-r--r-- | intern/opencolorio/fallback_impl.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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; |