Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance

calculation.
This commit is contained in:
Antony Riakiotakis
2015-03-17 14:15:05 +01:00
parent bf8ea6b60e
commit 42aac45d7f
6 changed files with 37 additions and 1 deletions

View File

@@ -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;