From 2a7543f36f18635889c6e8749628cf7a1bf54f01 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Mon, 5 Dec 2022 23:22:01 +0000 Subject: [PATCH 01/34] OCIO Properties A set of OpenColorIO-related ImageEffect clip properties which allow hosts to pass information about their OCIO configuration into a plug-in. This allows plug-ins which display images in their own UI to match the colours used in the host, and is also useful in effects which are sensitive to the working colourspace of the input clip. Signed-off-by: John-Paul Smith --- include/ofxImageEffect.h | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 26b84a18..eb1a8e3c 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1036,7 +1036,56 @@ This property acts as a hint to hosts indicating that they could feed the effect */ #define kOfxImageClipPropIsMask "OfxImageClipPropIsMask" +/** @brief The path to the OCIO config used for this clip + - Type - string X 1 + - Property Set - clip descriptor (read/write) + - Valid Values - Filesystem path to the config + +Hosts should set this property on any clips which are color managed by OCIO. +*/ +#define kOfxImageClipPropOCIOConfig "OfxImageClipPropOCIOConfig" + +/** @brief The OCIO colourspace used for this clip + + - Type - string X 1 + - Property Set - clip descriptor (read/write) + - Valid Values - colourspace that is present in the config + +Hosts should set this property on any clips which are color managed by OCIO. Typically it will be set to the working colourspace of the host. +*/ +#define kOfxImageClipPropOCIOColourspace "OfxImageClipPropOCIOColourspace" + +/** @brief The OCIO display used to show this clip + + - Type - string X 1 + - Property Set - clip descriptor (read/write) + - Valid Values - OCIO display that is present in the config + +Hosts should set this property on any clips which are color managed by OCIO. The property should match the display used in the host's viewer. +*/ +#define kOfxImageClipPropOCIODisplay "OfxImageClipPropOCIODisplay" + +/** @brief The OCIO display view used to show this clip + + - Type - string X 1 + - Property Set - clip descriptor (read/write) + - Valid Values - OCIO view that is present in the config + +Hosts should set this property on any clips which are color managed by OCIO. The property should match the view used in the host's viewer. +*/ +#define kOfxImageClipPropOCIODisplayView "OfxImageClipPropOCIODisplayView" + +/** @brief The OCIO look used to show this clip + + - Type - string X 1 + - Property Set - clip descriptor (read/write) + - Valid Values - OCIO look that is present in the config + +Hosts should set this property on any clips which are color managed by OCIO and a look has been selected in the host's viewer. +*/ +#define kOfxImageClipPropOCIOLook "OfxPropOCIOLook" + /** @brief The pixel aspect ratio of a clip or image. - Type - double X 1 From 7e8c002b6043d9c1bf5281cfb97fd6d5281b1d0e Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Mon, 5 Dec 2022 23:27:52 +0000 Subject: [PATCH 02/34] Made all OCIO properties read only Signed-off-by: John-Paul Smith --- include/ofxImageEffect.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index eb1a8e3c..91344954 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1049,7 +1049,7 @@ Hosts should set this property on any clips which are color managed by OCIO. /** @brief The OCIO colourspace used for this clip - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - clip descriptor (read only) - Valid Values - colourspace that is present in the config Hosts should set this property on any clips which are color managed by OCIO. Typically it will be set to the working colourspace of the host. @@ -1059,7 +1059,7 @@ Hosts should set this property on any clips which are color managed by OCIO. Typ /** @brief The OCIO display used to show this clip - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - clip descriptor (read only) - Valid Values - OCIO display that is present in the config Hosts should set this property on any clips which are color managed by OCIO. The property should match the display used in the host's viewer. @@ -1069,7 +1069,7 @@ Hosts should set this property on any clips which are color managed by OCIO. The /** @brief The OCIO display view used to show this clip - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - clip descriptor (read only) - Valid Values - OCIO view that is present in the config Hosts should set this property on any clips which are color managed by OCIO. The property should match the view used in the host's viewer. @@ -1079,7 +1079,7 @@ Hosts should set this property on any clips which are color managed by OCIO. The /** @brief The OCIO look used to show this clip - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - clip descriptor (read only) - Valid Values - OCIO look that is present in the config Hosts should set this property on any clips which are color managed by OCIO and a look has been selected in the host's viewer. From e1beee2d30ce59c9de72e78b47713fa5928b0084 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 7 Feb 2023 12:07:13 +0000 Subject: [PATCH 03/34] Extended OCIO properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OCIO properties now offer two-way communication, allowing both plug-in and host to specify a preferred colourspace, and setting the colourspace on output clips. Properties related to display are now set at an image effect rather than clip level, as they don’t change per clip and this makes them usable by generators. Overall use of the OCIO properties is now controlled by kOfxImageEffectPropSupportsOCIO to avoid additional work by plug-ins or hosts when OCIO is not available. Signed-off-by: John-Paul Smith --- include/ofxImageEffect.h | 86 +++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 91344954..9b52fc97 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1036,55 +1036,105 @@ This property acts as a hint to hosts indicating that they could feed the effect */ #define kOfxImageClipPropIsMask "OfxImageClipPropIsMask" -/** @brief The path to the OCIO config used for this clip +/** @brief Does a host or plug-in support OCIO? + + - Type - int X 1 + - Property Set - host descriptor (read only), plugin descriptor (read/write) + - Default - 0 + - Valid Values - This must be one of 0 or 1 + +Hosts should set this property if they will provide OCIO configuration +information to plug-ins. +Plug-ins should set this property if they can use host-provided OCIO +configuration. A host might not natively use OCIO but could provide a +compatibility config purely the purposes of communicating colour information +to plug-ins. As this may incur a cost for the host, plug-ins should only +set this property to 1 if they will actually benefit from colour information. +*/ +#define kOfxImageEffectPropSupportsOCIO "OfxImageEffectPropSupportsOCIO" + +/** @brief The path to the OCIO config used for this instance - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - image effect instance (read only) - Valid Values - Filesystem path to the config -Hosts should set this property on any clips which are color managed by OCIO. +Hosts should set this property on any effect instances which it would like to colour manage using OCIO. */ -#define kOfxImageClipPropOCIOConfig "OfxImageClipPropOCIOConfig" +#define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" /** @brief The OCIO colourspace used for this clip - Type - string X 1 - - Property Set - clip descriptor (read only) + - Property Set - clip instance (read/write) - Valid Values - colourspace that is present in the config -Hosts should set this property on any clips which are color managed by OCIO. Typically it will be set to the working colourspace of the host. +Hosts should set this property to the colourspace of the input clip. Typically +it will be set to the working colourspace of the host but could be any valid +colourspace from the config. +Plug-ins may set this property on an output clip to a valid colourspace from +the host-supplied config. +Both host and plug-in should use the value of +kOfxImageClipPropOCIOPreferredColourspace where reasonable. */ #define kOfxImageClipPropOCIOColourspace "OfxImageClipPropOCIOColourspace" -/** @brief The OCIO display used to show this clip +/** @brief The preferred OCIO colourspace used for this clip - Type - string X 1 - - Property Set - clip descriptor (read only) + - Property Set - clip descriptor (read/write) + - Valid Values - colourspace that is present in the config + +Plug-ins may set this property on an input clip to request the image in a +certain colourspace. Hosts may optionally convert input images into this +colourspace, but must always set kOfxImageClipPropOCIOColourspace to the +actual colourspace used. +Hosts may set this on an output clip, which could be helpful in a generator +context. +*/ +#define kOfxImageClipPropOCIOPreferredColourspace "OfxImageClipPropOCIOPreferredColourspace" + +/** @brief The OCIO display used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) - Valid Values - OCIO display that is present in the config -Hosts should set this property on any clips which are color managed by OCIO. The property should match the display used in the host's viewer. +This property is relevant for plug-ins which have their own viewport in a +custom window. +Hosts should set this property to a display from the config which the plug-in +should use for any image display in its own viewport. For a host which uses +OCIO natively, this would typically match the display used in its own viewport. */ -#define kOfxImageClipPropOCIODisplay "OfxImageClipPropOCIODisplay" +#define kOfxImageEffectPropOCIODisplay "OfxImageEffectPropOCIODisplay" -/** @brief The OCIO display view used to show this clip +/** @brief The OCIO display view used in the plug-in's viewport - Type - string X 1 - - Property Set - clip descriptor (read only) + - Property Set - image effect instance (read only) - Valid Values - OCIO view that is present in the config -Hosts should set this property on any clips which are color managed by OCIO. The property should match the view used in the host's viewer. +This property is relevant for plug-ins which have their own viewport in a +custom window. +Hosts should set this property to a view from the config which the plug-in +should use for any image display in its own viewport. For a host which uses +OCIO natively, this would typically match the view used in its own viewport. */ -#define kOfxImageClipPropOCIODisplayView "OfxImageClipPropOCIODisplayView" +#define kOfxImageEffectPropOCIODisplayView "OfxImageEffectPropOCIODisplayView" -/** @brief The OCIO look used to show this clip +/** @brief The OCIO look used in the plug-in's viewport - Type - string X 1 - - Property Set - clip descriptor (read only) + - Property Set - image effect instance (read only) - Valid Values - OCIO look that is present in the config -Hosts should set this property on any clips which are color managed by OCIO and a look has been selected in the host's viewer. +This property is relevant for plug-ins which have their own viewport in a +custom window. +Hosts should set this property to a look from the config which the plug-in +should use for any image display in its own viewport. For a host which uses +OCIO natively, this would typically match the look used in its own viewport. */ -#define kOfxImageClipPropOCIOLook "OfxPropOCIOLook" +#define kOfxImageEffectPropOCIOLook "OfxImageEffectPropOCIOLook" /** @brief The pixel aspect ratio of a clip or image. From e2800d324ea68b610f1edaf7737aea66a6af7cae Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 7 Feb 2023 14:00:58 +0000 Subject: [PATCH 04/34] Revised Preferred Colourspace + doc improvement kOfxImageClipPropOCIOPreferredColourspace is now specified by plug-ins during kOfxImageEffectActionGetClipPreferences, and by hosts on an output clip instance. Also clarified that plug-ins should not expect the display-related properties to be set during a render event. Signed-off-by: John-Paul Smith --- include/ofxImageEffect.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 9b52fc97..3093f0a1 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1082,13 +1082,13 @@ kOfxImageClipPropOCIOPreferredColourspace where reasonable. /** @brief The preferred OCIO colourspace used for this clip - Type - string X 1 - - Property Set - clip descriptor (read/write) + - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is present in the config -Plug-ins may set this property on an input clip to request the image in a -certain colourspace. Hosts may optionally convert input images into this -colourspace, but must always set kOfxImageClipPropOCIOColourspace to the -actual colourspace used. +Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences +to request the image in a certain colourspace. Hosts may optionally provide +input images in this colourspace, but must always set +kOfxImageClipPropOCIOColourspace to the actual colourspace used. Hosts may set this on an output clip, which could be helpful in a generator context. */ @@ -1101,7 +1101,8 @@ context. - Valid Values - OCIO display that is present in the config This property is relevant for plug-ins which have their own viewport in a -custom window. +custom window. Plug-ins should not expect this to be available during a render +event. Hosts should set this property to a display from the config which the plug-in should use for any image display in its own viewport. For a host which uses OCIO natively, this would typically match the display used in its own viewport. @@ -1115,7 +1116,8 @@ OCIO natively, this would typically match the display used in its own viewport. - Valid Values - OCIO view that is present in the config This property is relevant for plug-ins which have their own viewport in a -custom window. +custom window. Plug-ins should not expect this to be available during a render +event. Hosts should set this property to a view from the config which the plug-in should use for any image display in its own viewport. For a host which uses OCIO natively, this would typically match the view used in its own viewport. @@ -1129,7 +1131,8 @@ OCIO natively, this would typically match the view used in its own viewport. - Valid Values - OCIO look that is present in the config This property is relevant for plug-ins which have their own viewport in a -custom window. +custom window. Plug-ins should not expect this to be available during a render +event. Hosts should set this property to a look from the config which the plug-in should use for any image display in its own viewport. For a host which uses OCIO natively, this would typically match the look used in its own viewport. From 8cbc93e77374e84c0f9eb13c2676913ff0ac95ac Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Wed, 8 Feb 2023 18:37:50 +0000 Subject: [PATCH 05/34] Reworked the OCIO extension to support ACES The OCIO API has been extended to be a broader colour management API, although still using OCIO as the foundation. This commit adds the ACESCG and ACES colour management styles, which only use OCIO as a source of colourspace names and could be implemented using other colour management pipelines. OCIO-specific properties are separated and form a superset of the functionality offered by the ACES styles. Signed-off-by: John-Paul Smith --- include/ofxImageEffect.h | 134 +++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 48 deletions(-) diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 3093f0a1..bfa04e21 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1036,93 +1036,135 @@ This property acts as a hint to hosts indicating that they could feed the effect */ #define kOfxImageClipPropIsMask "OfxImageClipPropIsMask" -/** @brief Does a host or plug-in support OCIO? +/** @brief What style of colour management does the host or plug-in offer? - - Type - int X 1 + - Type - string X 1 - Property Set - host descriptor (read only), plugin descriptor (read/write) - - Default - 0 - - Valid Values - This must be one of 0 or 1 + - Default - kOfxImageEffectPropColourManagementStyleNone + - Valid Values - This must be one of + - ::kOfxImageEffectPropColourManagementNone - no colour management + - ::kOfxImageEffectPropColourManagementACESCG - colourspaces from the OCIO built-in ACES CG config are available + - ::kOfxImageEffectPropColourManagementACES - colourspaces from the OCIO built-in ACES Studio config are available + - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) -Hosts should set this property if they will provide OCIO configuration -information to plug-ins. -Plug-ins should set this property if they can use host-provided OCIO -configuration. A host might not natively use OCIO but could provide a -compatibility config purely the purposes of communicating colour information -to plug-ins. As this may incur a cost for the host, plug-ins should only -set this property to 1 if they will actually benefit from colour information. +Hosts should set this property if they will provide colourspace information +to plug-ins. +Plug-ins should set this property if they can use host-provided colourspace +information. OCIO is used as the reference for the colour management API, but +is not required to implement the ACESCG or ACES styles. + +The colourspace strings used in the ACESCG style are from: +https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio + +The colourspace strings used in the ACES style are from: +https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio + +The assumption is that OCIO > ACES > ACESCG so the highest style supported by +both host and plug-in will be chosen. */ -#define kOfxImageEffectPropSupportsOCIO "OfxImageEffectPropSupportsOCIO" +#define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" + +/* String used to indicate that no colour management is available. */ +#define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" +/* String used to indicate that basic colour management is available. */ +#define kOfxImageEffectPropColourManagementACESCG "OfxImageEffectPropColourManagementACESCG" +/* String used to indicate that ACES colour management is available. */ +#define kOfxImageEffectPropColourManagementACES "OfxImageEffectPropColourManagementACES" +/* String used to indicate that OCIO colour management is available. */ +#define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" /** @brief The path to the OCIO config used for this instance - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - Filesystem path to the config + - Valid Values - Filesystem path to the config or URI starting ocio:// -Hosts should set this property on any effect instances which it would like to colour manage using OCIO. +A host must set this property on any effect instances where it has negotiated +OCIO colour management (kOfxImageEffectPropColourManagementOCIO). +Use of URIs for built-in configs, such as ocio://default is permitted. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" -/** @brief The OCIO colourspace used for this clip +/** @brief The colourspace used for this clip - Type - string X 1 - Property Set - clip instance (read/write) - - Valid Values - colourspace that is present in the config + - Valid Values - colourspace that is permitted under the style in use Hosts should set this property to the colourspace of the input clip. Typically it will be set to the working colourspace of the host but could be any valid -colourspace from the config. -Plug-ins may set this property on an output clip to a valid colourspace from -the host-supplied config. +colourspace. +Plug-ins may set this property on an output clip. Plug-ins which output motion +vectors or similar images which should not be colour managed can use the data +colourspace which is present in the built-in OCIO configs. Both host and plug-in should use the value of -kOfxImageClipPropOCIOPreferredColourspace where reasonable. +kOfxImageClipPropPreferredColourspace where reasonable. */ -#define kOfxImageClipPropOCIOColourspace "OfxImageClipPropOCIOColourspace" +#define kOfxImageClipPropColourspace "OfxImageClipPropColourspace" -/** @brief The preferred OCIO colourspace used for this clip +/** @brief The preferred colourspace for this clip - Type - string X 1 - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - - Valid Values - colourspace that is present in the config + - Valid Values - colourspace that is permitted under the style in use. + For ACESCG and ACES, this a any colourspace from the colorspaces or roles section of the relevant config. + For OCIO, this could be any string acceptable to Config::getColorSpace(). Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences to request the image in a certain colourspace. Hosts may optionally provide input images in this colourspace, but must always set -kOfxImageClipPropOCIOColourspace to the actual colourspace used. +kOfxImageClipPropColourspace to the actual colourspace used. Hosts may set this on an output clip, which could be helpful in a generator context. + +It might be much less costly for a host to perform a conversion +than a plug-in, so in the example of a plug-in which performs all internal +processing in scene linear, it is sensible for the plug-in to universally +assert that preference and the host to honour it if possible. However, if a +plug-in is capable of adapting to any input colourspace, it should not set +this preference. +*/ +#define kOfxImageClipPropPreferredColourspace "OfxImageClipPropPreferredColourspace" + +/** @brief The display colourspace used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - colourspace from the display_colorspaces section of the relevant ACES OCIO config + +Used with the ACESCG or ACES colour management styles, this property is relevant +for plug-ins which have their own viewport in a custom window. Plug-ins should +not expect this to be available during a render event. +Hosts should set this property to a display colourspace which matches that +used in its own viewport. For a multi-display system, choose the colourspace +for the display device where a native window would appear by default. +A host which supports OCIO should use the OCIO-specific display, view and look +properties instead. + */ -#define kOfxImageClipPropOCIOPreferredColourspace "OfxImageClipPropOCIOPreferredColourspace" +#define kOfxImageEffectPropDisplayColourspace "OfxImageEffectPropDisplayColourspace" -/** @brief The OCIO display used in the plug-in's viewport +/** @brief The OCIO display to be used in the plug-in's viewport - Type - string X 1 - Property Set - image effect instance (read only) - Valid Values - OCIO display that is present in the config -This property is relevant for plug-ins which have their own viewport in a -custom window. Plug-ins should not expect this to be available during a render -event. -Hosts should set this property to a display from the config which the plug-in -should use for any image display in its own viewport. For a host which uses -OCIO natively, this would typically match the display used in its own viewport. +This OCIO-specific property allows the host to specify which OCIO display should be used. +If not defined, the default rules for choosing a display will be followed. */ #define kOfxImageEffectPropOCIODisplay "OfxImageEffectPropOCIODisplay" -/** @brief The OCIO display view used in the plug-in's viewport +/** @brief The OCIO view to be used in the plug-in's viewport - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - OCIO view that is present in the config - -This property is relevant for plug-ins which have their own viewport in a -custom window. Plug-ins should not expect this to be available during a render -event. -Hosts should set this property to a view from the config which the plug-in -should use for any image display in its own viewport. For a host which uses -OCIO natively, this would typically match the view used in its own viewport. + - Valid Values - OCIO view for the display specified by kOfxImageEffectPropOCIODisplay + +This OCIO-specific property allows the host to specify which OCIO view should be used. +If not defined, the default rules for choosing a view will be followed. */ -#define kOfxImageEffectPropOCIODisplayView "OfxImageEffectPropOCIODisplayView" +#define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView" /** @brief The OCIO look used in the plug-in's viewport @@ -1130,12 +1172,8 @@ OCIO natively, this would typically match the view used in its own viewport. - Property Set - image effect instance (read only) - Valid Values - OCIO look that is present in the config -This property is relevant for plug-ins which have their own viewport in a -custom window. Plug-ins should not expect this to be available during a render -event. -Hosts should set this property to a look from the config which the plug-in -should use for any image display in its own viewport. For a host which uses -OCIO natively, this would typically match the look used in its own viewport. +This OCIO-specific property allows the host to specify which OCIO look should be used. +If not defined, no look will be applied. */ #define kOfxImageEffectPropOCIOLook "OfxImageEffectPropOCIOLook" From b07f15fdddefadfea00ee7e920172a836eef2f00 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 3 Mar 2023 14:30:51 +0000 Subject: [PATCH 06/34] Moved the colourspace API to its own header Signed-off-by: John-Paul Smith --- include/ofxColour.h | 160 +++++++++++++++++++++++++++++++++++++++ include/ofxImageEffect.h | 141 ---------------------------------- 2 files changed, 160 insertions(+), 141 deletions(-) create mode 100644 include/ofxColour.h diff --git a/include/ofxColour.h b/include/ofxColour.h new file mode 100644 index 00000000..0bb90a2b --- /dev/null +++ b/include/ofxColour.h @@ -0,0 +1,160 @@ +#ifndef _ofxColour_h_ +#define _ofxColour_h_ + +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#ifdef __cplusplus +extern "C" { +#endif + +/** @file ofxColour.h +Contains the API for colourspace data exchange. +*/ + +/** @brief What style of colour management does the host or plug-in offer? + + - Type - string X 1 + - Property Set - host descriptor (read only), plugin descriptor (read/write) + - Default - kOfxImageEffectPropColourManagementStyleNone + - Valid Values - This must be one of + - ::kOfxImageEffectPropColourManagementNone - no colour management + - ::kOfxImageEffectPropColourManagementACESCG - colourspaces from the OCIO built-in ACES CG config are available + - ::kOfxImageEffectPropColourManagementACES - colourspaces from the OCIO built-in ACES Studio config are available + - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) + +Hosts should set this property if they will provide colourspace information +to plug-ins. +Plug-ins should set this property if they can use host-provided colourspace +information. OCIO is used as the reference for the colour management API, but +is not required to implement the ACESCG or ACES styles. + +The colourspace strings used in the ACESCG style are from: +https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio + +The colourspace strings used in the ACES style are from: +https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio + +The assumption is that OCIO > ACES > ACESCG so the highest style supported by +both host and plug-in will be chosen. +*/ +#define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" + +/* String used to indicate that no colour management is available. */ +#define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" +/* String used to indicate that basic colour management is available. */ +#define kOfxImageEffectPropColourManagementACESCG "OfxImageEffectPropColourManagementACESCG" +/* String used to indicate that ACES colour management is available. */ +#define kOfxImageEffectPropColourManagementACES "OfxImageEffectPropColourManagementACES" +/* String used to indicate that OCIO colour management is available. */ +#define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" + +/** @brief The path to the OCIO config used for this instance + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - Filesystem path to the config or URI starting ocio:// + +A host must set this property on any effect instances where it has negotiated +OCIO colour management (kOfxImageEffectPropColourManagementOCIO). +Use of URIs for built-in configs, such as ocio://default is permitted. +*/ +#define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" + +/** @brief The colourspace used for this clip + + - Type - string X 1 + - Property Set - clip instance (read/write) + - Valid Values - colourspace that is permitted under the style in use + +Hosts should set this property to the colourspace of the input clip. Typically +it will be set to the working colourspace of the host but could be any valid +colourspace. +Plug-ins may set this property on an output clip. Plug-ins which output motion +vectors or similar images which should not be colour managed can use the data +colourspace which is present in the built-in OCIO configs. +Both host and plug-in should use the value of +kOfxImageClipPropPreferredColourspace where reasonable. +*/ +#define kOfxImageClipPropColourspace "OfxImageClipPropColourspace" + +/** @brief The preferred colourspace for this clip + + - Type - string X 1 + - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) + - Valid Values - colourspace that is permitted under the style in use. + For ACESCG and ACES, this a any colourspace from the colorspaces or roles section of the relevant config. + For OCIO, this could be any string acceptable to Config::getColorSpace(). + +Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences +to request the image in a certain colourspace. Hosts may optionally provide +input images in this colourspace, but must always set +kOfxImageClipPropColourspace to the actual colourspace used. +Hosts may set this on an output clip, which could be helpful in a generator +context. + +It might be much less costly for a host to perform a conversion +than a plug-in, so in the example of a plug-in which performs all internal +processing in scene linear, it is sensible for the plug-in to universally +assert that preference and the host to honour it if possible. However, if a +plug-in is capable of adapting to any input colourspace, it should not set +this preference. +*/ +#define kOfxImageClipPropPreferredColourspace "OfxImageClipPropPreferredColourspace" + +/** @brief The display colourspace used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - colourspace from the display_colorspaces section of the relevant ACES OCIO config + +Used with the ACESCG or ACES colour management styles, this property is relevant +for plug-ins which have their own viewport in a custom window. Plug-ins should +not expect this to be available during a render event. +Hosts should set this property to a display colourspace which matches that +used in its own viewport. For a multi-display system, choose the colourspace +for the display device where a native window would appear by default. +A host which supports OCIO should use the OCIO-specific display, view and look +properties instead. + +*/ +#define kOfxImageEffectPropDisplayColourspace "OfxImageEffectPropDisplayColourspace" + +/** @brief The OCIO display to be used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - OCIO display that is present in the config + +This OCIO-specific property allows the host to specify which OCIO display should be used. +If not defined, the default rules for choosing a display will be followed. +*/ +#define kOfxImageEffectPropOCIODisplay "OfxImageEffectPropOCIODisplay" + +/** @brief The OCIO view to be used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - OCIO view for the display specified by kOfxImageEffectPropOCIODisplay + +This OCIO-specific property allows the host to specify which OCIO view should be used. +If not defined, the default rules for choosing a view will be followed. +*/ +#define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView" + +/** @brief The OCIO look used in the plug-in's viewport + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - OCIO look that is present in the config + +This OCIO-specific property allows the host to specify which OCIO look should be used. +If not defined, no look will be applied. +*/ +#define kOfxImageEffectPropOCIOLook "OfxImageEffectPropOCIOLook" + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index bfa04e21..fdd4e180 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -1035,147 +1035,6 @@ Set this property on any clip which will only ever have single channel alpha ima This property acts as a hint to hosts indicating that they could feed the effect from a rotoshape (or similar) rather than an 'ordinary' clip. */ #define kOfxImageClipPropIsMask "OfxImageClipPropIsMask" - -/** @brief What style of colour management does the host or plug-in offer? - - - Type - string X 1 - - Property Set - host descriptor (read only), plugin descriptor (read/write) - - Default - kOfxImageEffectPropColourManagementStyleNone - - Valid Values - This must be one of - - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementACESCG - colourspaces from the OCIO built-in ACES CG config are available - - ::kOfxImageEffectPropColourManagementACES - colourspaces from the OCIO built-in ACES Studio config are available - - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) - -Hosts should set this property if they will provide colourspace information -to plug-ins. -Plug-ins should set this property if they can use host-provided colourspace -information. OCIO is used as the reference for the colour management API, but -is not required to implement the ACESCG or ACES styles. - -The colourspace strings used in the ACESCG style are from: -https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio - -The colourspace strings used in the ACES style are from: -https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio - -The assumption is that OCIO > ACES > ACESCG so the highest style supported by -both host and plug-in will be chosen. -*/ -#define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" - -/* String used to indicate that no colour management is available. */ -#define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" -/* String used to indicate that basic colour management is available. */ -#define kOfxImageEffectPropColourManagementACESCG "OfxImageEffectPropColourManagementACESCG" -/* String used to indicate that ACES colour management is available. */ -#define kOfxImageEffectPropColourManagementACES "OfxImageEffectPropColourManagementACES" -/* String used to indicate that OCIO colour management is available. */ -#define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" - -/** @brief The path to the OCIO config used for this instance - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - Filesystem path to the config or URI starting ocio:// - -A host must set this property on any effect instances where it has negotiated -OCIO colour management (kOfxImageEffectPropColourManagementOCIO). -Use of URIs for built-in configs, such as ocio://default is permitted. -*/ -#define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" - -/** @brief The colourspace used for this clip - - - Type - string X 1 - - Property Set - clip instance (read/write) - - Valid Values - colourspace that is permitted under the style in use - -Hosts should set this property to the colourspace of the input clip. Typically -it will be set to the working colourspace of the host but could be any valid -colourspace. -Plug-ins may set this property on an output clip. Plug-ins which output motion -vectors or similar images which should not be colour managed can use the data -colourspace which is present in the built-in OCIO configs. -Both host and plug-in should use the value of -kOfxImageClipPropPreferredColourspace where reasonable. -*/ -#define kOfxImageClipPropColourspace "OfxImageClipPropColourspace" - -/** @brief The preferred colourspace for this clip - - - Type - string X 1 - - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - - Valid Values - colourspace that is permitted under the style in use. - For ACESCG and ACES, this a any colourspace from the colorspaces or roles section of the relevant config. - For OCIO, this could be any string acceptable to Config::getColorSpace(). - -Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences -to request the image in a certain colourspace. Hosts may optionally provide -input images in this colourspace, but must always set -kOfxImageClipPropColourspace to the actual colourspace used. -Hosts may set this on an output clip, which could be helpful in a generator -context. - -It might be much less costly for a host to perform a conversion -than a plug-in, so in the example of a plug-in which performs all internal -processing in scene linear, it is sensible for the plug-in to universally -assert that preference and the host to honour it if possible. However, if a -plug-in is capable of adapting to any input colourspace, it should not set -this preference. -*/ -#define kOfxImageClipPropPreferredColourspace "OfxImageClipPropPreferredColourspace" - -/** @brief The display colourspace used in the plug-in's viewport - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - colourspace from the display_colorspaces section of the relevant ACES OCIO config - -Used with the ACESCG or ACES colour management styles, this property is relevant -for plug-ins which have their own viewport in a custom window. Plug-ins should -not expect this to be available during a render event. -Hosts should set this property to a display colourspace which matches that -used in its own viewport. For a multi-display system, choose the colourspace -for the display device where a native window would appear by default. -A host which supports OCIO should use the OCIO-specific display, view and look -properties instead. - -*/ -#define kOfxImageEffectPropDisplayColourspace "OfxImageEffectPropDisplayColourspace" - -/** @brief The OCIO display to be used in the plug-in's viewport - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - OCIO display that is present in the config - -This OCIO-specific property allows the host to specify which OCIO display should be used. -If not defined, the default rules for choosing a display will be followed. -*/ -#define kOfxImageEffectPropOCIODisplay "OfxImageEffectPropOCIODisplay" - -/** @brief The OCIO view to be used in the plug-in's viewport - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - OCIO view for the display specified by kOfxImageEffectPropOCIODisplay - -This OCIO-specific property allows the host to specify which OCIO view should be used. -If not defined, the default rules for choosing a view will be followed. -*/ -#define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView" - -/** @brief The OCIO look used in the plug-in's viewport - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - OCIO look that is present in the config - -This OCIO-specific property allows the host to specify which OCIO look should be used. -If not defined, no look will be applied. -*/ -#define kOfxImageEffectPropOCIOLook "OfxImageEffectPropOCIOLook" /** @brief The pixel aspect ratio of a clip or image. From 3a8e7ee6f4fad40856e2d82d4a8014fa0c442bb5 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sun, 30 Apr 2023 10:56:25 +0100 Subject: [PATCH 07/34] Colourspace defs based on OCIO ACES Studio config The Python script scripts/genColour uses OCIO to process the config and write out a C header file containing preprocessor definitions for various names and attributes related to the colourspaces and roles in the config. ofxColourspaceList.h is the result of running this script on the ACES Studio config, which is the proposed common language the OFX colour support as it can be implemented without actually using OCIO. Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 524 +++++++++++++++++++++++++++++++++++ scripts/genColour | 90 ++++++ 2 files changed, 614 insertions(+) create mode 100644 include/ofxColourspaceList.h create mode 100755 scripts/genColour diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h new file mode 100644 index 00000000..2cfdb2bc --- /dev/null +++ b/include/ofxColourspaceList.h @@ -0,0 +1,524 @@ +#ifndef _ofxColourspaceList_h_ +#define _ofxColourspaceList_h_ + +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#ifdef __cplusplus +extern "C" { +#endif + +/** @file ofxColourspaceList.h +Contains the list of supported colourspaces. +This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces-v1.3_ocio-v2.1. +*/ + +// Roles +#define kOfxColourspaceRoleAcesInterchange "aces_interchange" +#define kOfxColourspaceRoleAcesInterchangeColourspace "ACES2065-1" +#define kOfxColourspaceRoleAcesInterchangeMapping { "aces_interchange", "ACES2065-1" } +#define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange" +#define kOfxColourspaceRoleCieXyzD65InterchangeColourspace "CIE-XYZ-D65" +#define kOfxColourspaceRoleCieXyzD65InterchangeMapping { "cie_xyz_d65_interchange", "CIE-XYZ-D65" } +#define kOfxColourspaceRoleColorPicking "color_picking" +#define kOfxColourspaceRoleColorPickingColourspace "sRGB - Texture" +#define kOfxColourspaceRoleColorPickingMapping { "color_picking", "sRGB - Texture" } +#define kOfxColourspaceRoleColorTiming "color_timing" +#define kOfxColourspaceRoleColorTimingColourspace "ACEScct" +#define kOfxColourspaceRoleColorTimingMapping { "color_timing", "ACEScct" } +#define kOfxColourspaceRoleCompositingLog "compositing_log" +#define kOfxColourspaceRoleCompositingLogColourspace "ACEScct" +#define kOfxColourspaceRoleCompositingLogMapping { "compositing_log", "ACEScct" } +#define kOfxColourspaceRoleData "data" +#define kOfxColourspaceRoleDataColourspace "Raw" +#define kOfxColourspaceRoleDataMapping { "data", "Raw" } +#define kOfxColourspaceRoleMattePaint "matte_paint" +#define kOfxColourspaceRoleMattePaintColourspace "sRGB - Texture" +#define kOfxColourspaceRoleMattePaintMapping { "matte_paint", "sRGB - Texture" } +#define kOfxColourspaceRoleSceneLinear "scene_linear" +#define kOfxColourspaceRoleSceneLinearColourspace "ACEScg" +#define kOfxColourspaceRoleSceneLinearMapping { "scene_linear", "ACEScg" } +#define kOfxColourspaceRoleTexturePaint "texture_paint" +#define kOfxColourspaceRoleTexturePaintColourspace "ACEScct" +#define kOfxColourspaceRoleTexturePaintMapping { "texture_paint", "ACEScct" } + +// Display Colourspaces + +// sRGB - Display +// Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF) +#define kOfxColourspaceSRGBDisplayAliasSrgbDisplay "srgb_display" +#define kOfxColourspaceSRGBDisplayList { "sRGB - Display", "srgb_display" } +#define kOfxColourspaceSRGBDisplayEncoding "sdr-video" +#define kOfxColourspaceSRGBDisplayIsSceneLinear false +#define kOfxColourspaceSRGBDisplayIsData false + +// Rec.1886 Rec.709 - Display +// Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video) +#define kOfxColourspaceRec1886Rec709DisplayAliasRec1886Rec709Display "rec1886_rec709_display" +#define kOfxColourspaceRec1886Rec709DisplayList { "Rec.1886 Rec.709 - Display", "rec1886_rec709_display" } +#define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video" +#define kOfxColourspaceRec1886Rec709DisplayIsSceneLinear false +#define kOfxColourspaceRec1886Rec709DisplayIsData false + +// Rec.1886 Rec.2020 - Display +// Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video) +#define kOfxColourspaceRec1886Rec2020DisplayAliasRec1886Rec2020Display "rec1886_rec2020_display" +#define kOfxColourspaceRec1886Rec2020DisplayList { "Rec.1886 Rec.2020 - Display", "rec1886_rec2020_display" } +#define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video" +#define kOfxColourspaceRec1886Rec2020DisplayIsSceneLinear false +#define kOfxColourspaceRec1886Rec2020DisplayIsData false + +// Rec.2100-HLG - Display +// Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit +#define kOfxColourspaceRec2100HLGDisplayAliasRec2100HlgDisplay "rec2100_hlg_display" +#define kOfxColourspaceRec2100HLGDisplayList { "Rec.2100-HLG - Display", "rec2100_hlg_display" } +#define kOfxColourspaceRec2100HLGDisplayEncoding "hdr-video" +#define kOfxColourspaceRec2100HLGDisplayIsSceneLinear false +#define kOfxColourspaceRec2100HLGDisplayIsData false + +// Rec.2100-PQ - Display +// Convert CIE XYZ (D65 white) to Rec.2100-PQ +#define kOfxColourspaceRec2100PQDisplayAliasRec2100PqDisplay "rec2100_pq_display" +#define kOfxColourspaceRec2100PQDisplayList { "Rec.2100-PQ - Display", "rec2100_pq_display" } +#define kOfxColourspaceRec2100PQDisplayEncoding "hdr-video" +#define kOfxColourspaceRec2100PQDisplayIsSceneLinear false +#define kOfxColourspaceRec2100PQDisplayIsData false + +// ST2084-P3-D65 - Display +// Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries +#define kOfxColourspaceST2084P3D65DisplayAliasSt2084P3d65Display "st2084_p3d65_display" +#define kOfxColourspaceST2084P3D65DisplayList { "ST2084-P3-D65 - Display", "st2084_p3d65_display" } +#define kOfxColourspaceST2084P3D65DisplayEncoding "hdr-video" +#define kOfxColourspaceST2084P3D65DisplayIsSceneLinear false +#define kOfxColourspaceST2084P3D65DisplayIsData false + +// P3-D60 - Display +// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) +#define kOfxColourspaceP3D60DisplayAliasP3d60Display "p3d60_display" +#define kOfxColourspaceP3D60DisplayList { "P3-D60 - Display", "p3d60_display" } +#define kOfxColourspaceP3D60DisplayEncoding "sdr-video" +#define kOfxColourspaceP3D60DisplayIsSceneLinear false +#define kOfxColourspaceP3D60DisplayIsData false + +// P3-D65 - Display +// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 +#define kOfxColourspaceP3D65DisplayAliasP3d65Display "p3d65_display" +#define kOfxColourspaceP3D65DisplayList { "P3-D65 - Display", "p3d65_display" } +#define kOfxColourspaceP3D65DisplayEncoding "sdr-video" +#define kOfxColourspaceP3D65DisplayIsSceneLinear false +#define kOfxColourspaceP3D65DisplayIsData false + +// P3-DCI - Display +// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) +#define kOfxColourspaceP3DCIDisplayAliasP3DciDisplay "p3_dci_display" +#define kOfxColourspaceP3DCIDisplayList { "P3-DCI - Display", "p3_dci_display" } +#define kOfxColourspaceP3DCIDisplayEncoding "sdr-video" +#define kOfxColourspaceP3DCIDisplayIsSceneLinear false +#define kOfxColourspaceP3DCIDisplayIsData false + +// Scene Colourspaces + +// ACES2065-1 +// The "Academy Color Encoding System" reference colorspace. +#define kOfxColourspaceACES20651AliasAces20651 "aces2065_1" +#define kOfxColourspaceACES20651AliasACESACES20651 "ACES - ACES2065-1" +#define kOfxColourspaceACES20651AliasLinAp0 "lin_ap0" +#define kOfxColourspaceACES20651List { "ACES2065-1", "aces2065_1", "ACES - ACES2065-1", "lin_ap0" } +#define kOfxColourspaceACES20651Encoding "scene-linear" +#define kOfxColourspaceACES20651IsSceneLinear true +#define kOfxColourspaceACES20651IsData false + +// ACEScc +// Convert ACEScc to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 +#define kOfxColourspaceACESccAliasACESACEScc "ACES - ACEScc" +#define kOfxColourspaceACESccAliasAcesccAp1 "acescc_ap1" +#define kOfxColourspaceACESccList { "ACEScc", "ACES - ACEScc", "acescc_ap1" } +#define kOfxColourspaceACESccEncoding "log" +#define kOfxColourspaceACESccIsSceneLinear false +#define kOfxColourspaceACESccIsData false + +// ACEScct +// Convert ACEScct to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 +#define kOfxColourspaceACEScctAliasACESACEScct "ACES - ACEScct" +#define kOfxColourspaceACEScctAliasAcescctAp1 "acescct_ap1" +#define kOfxColourspaceACEScctList { "ACEScct", "ACES - ACEScct", "acescct_ap1" } +#define kOfxColourspaceACEScctEncoding "log" +#define kOfxColourspaceACEScctIsSceneLinear false +#define kOfxColourspaceACEScctIsData false + +// ACEScg +// Convert ACEScg to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 +#define kOfxColourspaceACEScgAliasACESACEScg "ACES - ACEScg" +#define kOfxColourspaceACEScgAliasLinAp1 "lin_ap1" +#define kOfxColourspaceACEScgList { "ACEScg", "ACES - ACEScg", "lin_ap1" } +#define kOfxColourspaceACEScgEncoding "scene-linear" +#define kOfxColourspaceACEScgIsSceneLinear true +#define kOfxColourspaceACEScgIsData false + +// ADX10 +// Convert ADX10 to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 +#define kOfxColourspaceADX10AliasInputADXADX10 "Input - ADX - ADX10" +#define kOfxColourspaceADX10List { "ADX10", "Input - ADX - ADX10" } +#define kOfxColourspaceADX10Encoding "log" +#define kOfxColourspaceADX10IsSceneLinear false +#define kOfxColourspaceADX10IsData false + +// ADX16 +// Convert ADX16 to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3 +#define kOfxColourspaceADX16AliasInputADXADX16 "Input - ADX - ADX16" +#define kOfxColourspaceADX16List { "ADX16", "Input - ADX - ADX16" } +#define kOfxColourspaceADX16Encoding "log" +#define kOfxColourspaceADX16IsSceneLinear false +#define kOfxColourspaceADX16IsData false + +// Linear ARRI Wide Gamut 3 +// Convert Linear ARRI Wide Gamut 3 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearARRIWideGamut3AliasLinArriWideGamut3 "lin_arri_wide_gamut_3" +#define kOfxColourspaceLinearARRIWideGamut3AliasInputARRILinearALEXAWideGamut "Input - ARRI - Linear - ALEXA Wide Gamut" +#define kOfxColourspaceLinearARRIWideGamut3AliasLinAlexawide "lin_alexawide" +#define kOfxColourspaceLinearARRIWideGamut3List { "Linear ARRI Wide Gamut 3", "lin_arri_wide_gamut_3", "Input - ARRI - Linear - ALEXA Wide Gamut", "lin_alexawide" } +#define kOfxColourspaceLinearARRIWideGamut3Encoding "scene-linear" +#define kOfxColourspaceLinearARRIWideGamut3IsSceneLinear true +#define kOfxColourspaceLinearARRIWideGamut3IsData false + +// ARRI LogC3 (EI800) +// Convert ARRI LogC3 (EI800) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_EI800_to_ACES2065-1:1.0 +#define kOfxColourspaceARRILogC3EI800AliasArriLogc3Ei800 "arri_logc3_ei800" +#define kOfxColourspaceARRILogC3EI800AliasInputARRIV3LogCEI800WideGamut "Input - ARRI - V3 LogC (EI800) - Wide Gamut" +#define kOfxColourspaceARRILogC3EI800AliasLogc3ei800Alexawide "logc3ei800_alexawide" +#define kOfxColourspaceARRILogC3EI800List { "ARRI LogC3 (EI800)", "arri_logc3_ei800", "Input - ARRI - V3 LogC (EI800) - Wide Gamut", "logc3ei800_alexawide" } +#define kOfxColourspaceARRILogC3EI800Encoding "log" +#define kOfxColourspaceARRILogC3EI800IsSceneLinear false +#define kOfxColourspaceARRILogC3EI800IsData false + +// Linear ARRI Wide Gamut 4 +// Convert Linear ARRI Wide Gamut 4 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearARRIWideGamut4AliasLinArriWideGamut4 "lin_arri_wide_gamut_4" +#define kOfxColourspaceLinearARRIWideGamut4AliasLinAwg4 "lin_awg4" +#define kOfxColourspaceLinearARRIWideGamut4List { "Linear ARRI Wide Gamut 4", "lin_arri_wide_gamut_4", "lin_awg4" } +#define kOfxColourspaceLinearARRIWideGamut4Encoding "scene-linear" +#define kOfxColourspaceLinearARRIWideGamut4IsSceneLinear true +#define kOfxColourspaceLinearARRIWideGamut4IsData false + +// ARRI LogC4 +// Convert ARRI LogC4 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_to_ACES2065-1:1.0 +#define kOfxColourspaceARRILogC4AliasArriLogc4 "arri_logc4" +#define kOfxColourspaceARRILogC4List { "ARRI LogC4", "arri_logc4" } +#define kOfxColourspaceARRILogC4Encoding "log" +#define kOfxColourspaceARRILogC4IsSceneLinear false +#define kOfxColourspaceARRILogC4IsData false + +// BMDFilm WideGamut Gen5 +// Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_WideGamut_Gen5_to_ACES2065-1:1.0 +#define kOfxColourspaceBMDFilmWideGamutGen5AliasBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" +#define kOfxColourspaceBMDFilmWideGamutGen5List { "BMDFilm WideGamut Gen5", "bmdfilm_widegamut_gen5" } +#define kOfxColourspaceBMDFilmWideGamutGen5Encoding "log" +#define kOfxColourspaceBMDFilmWideGamutGen5IsSceneLinear false +#define kOfxColourspaceBMDFilmWideGamutGen5IsData false + +// DaVinci Intermediate WideGamut +// Convert DaVinci Intermediate Wide Gamut to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceDaVinciIntermediateWideGamutAliasDavinciIntermediateWidegamut "davinci_intermediate_widegamut" +#define kOfxColourspaceDaVinciIntermediateWideGamutList { "DaVinci Intermediate WideGamut", "davinci_intermediate_widegamut" } +#define kOfxColourspaceDaVinciIntermediateWideGamutEncoding "log" +#define kOfxColourspaceDaVinciIntermediateWideGamutIsSceneLinear false +#define kOfxColourspaceDaVinciIntermediateWideGamutIsData false + +// Linear BMD WideGamut Gen5 +// Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearBMDWideGamutGen5AliasLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" +#define kOfxColourspaceLinearBMDWideGamutGen5List { "Linear BMD WideGamut Gen5", "lin_bmd_widegamut_gen5" } +#define kOfxColourspaceLinearBMDWideGamutGen5Encoding "scene-linear" +#define kOfxColourspaceLinearBMDWideGamutGen5IsSceneLinear true +#define kOfxColourspaceLinearBMDWideGamutGen5IsData false + +// Linear DaVinci WideGamut +// Convert Linear DaVinci Wide Gamut to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearDaVinciWideGamutAliasLinDavinciWidegamut "lin_davinci_widegamut" +#define kOfxColourspaceLinearDaVinciWideGamutList { "Linear DaVinci WideGamut", "lin_davinci_widegamut" } +#define kOfxColourspaceLinearDaVinciWideGamutEncoding "scene-linear" +#define kOfxColourspaceLinearDaVinciWideGamutIsSceneLinear true +#define kOfxColourspaceLinearDaVinciWideGamutIsData false + +// CanonLog3 CinemaGamut D55 +// Convert Canon Log 3 Cinema Gamut to ACES2065-1 +#define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" +#define kOfxColourspaceCanonLog3CinemaGamutD55AliasInputCanonCanonLog3CinemaGamutDaylight "Input - Canon - Canon-Log3 - Cinema Gamut Daylight" +#define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3Cgamutday "canonlog3_cgamutday" +#define kOfxColourspaceCanonLog3CinemaGamutD55List { "CanonLog3 CinemaGamut D55", "canonlog3_cinemagamut_d55", "Input - Canon - Canon-Log3 - Cinema Gamut Daylight", "canonlog3_cgamutday" } +#define kOfxColourspaceCanonLog3CinemaGamutD55Encoding "log" +#define kOfxColourspaceCanonLog3CinemaGamutD55IsSceneLinear false +#define kOfxColourspaceCanonLog3CinemaGamutD55IsData false + +// Linear CinemaGamut D55 +// Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearCinemaGamutD55AliasLinCinemagamutD55 "lin_cinemagamut_d55" +#define kOfxColourspaceLinearCinemaGamutD55AliasInputCanonLinearCanonCinemaGamutDaylight "Input - Canon - Linear - Canon Cinema Gamut Daylight" +#define kOfxColourspaceLinearCinemaGamutD55AliasLinCanoncgamutday "lin_canoncgamutday" +#define kOfxColourspaceLinearCinemaGamutD55List { "Linear CinemaGamut D55", "lin_cinemagamut_d55", "Input - Canon - Linear - Canon Cinema Gamut Daylight", "lin_canoncgamutday" } +#define kOfxColourspaceLinearCinemaGamutD55Encoding "scene-linear" +#define kOfxColourspaceLinearCinemaGamutD55IsSceneLinear true +#define kOfxColourspaceLinearCinemaGamutD55IsData false + +// Linear V-Gamut +// Convert Linear Panasonic V-Gamut to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVGamutAliasLinVgamut "lin_vgamut" +#define kOfxColourspaceLinearVGamutAliasInputPanasonicLinearVGamut "Input - Panasonic - Linear - V-Gamut" +#define kOfxColourspaceLinearVGamutList { "Linear V-Gamut", "lin_vgamut", "Input - Panasonic - Linear - V-Gamut" } +#define kOfxColourspaceLinearVGamutEncoding "scene-linear" +#define kOfxColourspaceLinearVGamutIsSceneLinear true +#define kOfxColourspaceLinearVGamutIsData false + +// V-Log V-Gamut +// Convert Panasonic V-Log - V-Gamut to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog_VGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceVLogVGamutAliasVlogVgamut "vlog_vgamut" +#define kOfxColourspaceVLogVGamutAliasInputPanasonicVLogVGamut "Input - Panasonic - V-Log - V-Gamut" +#define kOfxColourspaceVLogVGamutList { "V-Log V-Gamut", "vlog_vgamut", "Input - Panasonic - V-Log - V-Gamut" } +#define kOfxColourspaceVLogVGamutEncoding "log" +#define kOfxColourspaceVLogVGamutIsSceneLinear false +#define kOfxColourspaceVLogVGamutIsData false + +// Linear REDWideGamutRGB +// Convert Linear REDWideGamutRGB to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearREDWideGamutRGBAliasLinRedwidegamutrgb "lin_redwidegamutrgb" +#define kOfxColourspaceLinearREDWideGamutRGBAliasInputREDLinearREDWideGamutRGB "Input - RED - Linear - REDWideGamutRGB" +#define kOfxColourspaceLinearREDWideGamutRGBAliasLinRwg "lin_rwg" +#define kOfxColourspaceLinearREDWideGamutRGBList { "Linear REDWideGamutRGB", "lin_redwidegamutrgb", "Input - RED - Linear - REDWideGamutRGB", "lin_rwg" } +#define kOfxColourspaceLinearREDWideGamutRGBEncoding "scene-linear" +#define kOfxColourspaceLinearREDWideGamutRGBIsSceneLinear true +#define kOfxColourspaceLinearREDWideGamutRGBIsData false + +// Log3G10 REDWideGamutRGB +// Convert RED Log3G10 REDWideGamutRGB to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10_REDWideGamutRGB_to_ACES2065-1:1.0 +#define kOfxColourspaceLog3G10REDWideGamutRGBAliasLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" +#define kOfxColourspaceLog3G10REDWideGamutRGBAliasInputREDREDLog3G10REDWideGamutRGB "Input - RED - REDLog3G10 - REDWideGamutRGB" +#define kOfxColourspaceLog3G10REDWideGamutRGBAliasRl3g10Rwg "rl3g10_rwg" +#define kOfxColourspaceLog3G10REDWideGamutRGBList { "Log3G10 REDWideGamutRGB", "log3g10_redwidegamutrgb", "Input - RED - REDLog3G10 - REDWideGamutRGB", "rl3g10_rwg" } +#define kOfxColourspaceLog3G10REDWideGamutRGBEncoding "log" +#define kOfxColourspaceLog3G10REDWideGamutRGBIsSceneLinear false +#define kOfxColourspaceLog3G10REDWideGamutRGBIsData false + +// Linear S-Gamut3 +// Convert Linear S-Gamut3 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearSGamut3AliasLinSgamut3 "lin_sgamut3" +#define kOfxColourspaceLinearSGamut3AliasInputSonyLinearSGamut3 "Input - Sony - Linear - S-Gamut3" +#define kOfxColourspaceLinearSGamut3List { "Linear S-Gamut3", "lin_sgamut3", "Input - Sony - Linear - S-Gamut3" } +#define kOfxColourspaceLinearSGamut3Encoding "scene-linear" +#define kOfxColourspaceLinearSGamut3IsSceneLinear true +#define kOfxColourspaceLinearSGamut3IsData false + +// Linear S-Gamut3.Cine +// Convert Linear S-Gamut3.Cine to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearSGamut3CineAliasLinSgamut3cine "lin_sgamut3cine" +#define kOfxColourspaceLinearSGamut3CineAliasInputSonyLinearSGamut3Cine "Input - Sony - Linear - S-Gamut3.Cine" +#define kOfxColourspaceLinearSGamut3CineList { "Linear S-Gamut3.Cine", "lin_sgamut3cine", "Input - Sony - Linear - S-Gamut3.Cine" } +#define kOfxColourspaceLinearSGamut3CineEncoding "scene-linear" +#define kOfxColourspaceLinearSGamut3CineIsSceneLinear true +#define kOfxColourspaceLinearSGamut3CineIsData false + +// Linear Venice S-Gamut3 +// Convert Linear Venice S-Gamut3 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVeniceSGamut3AliasLinVeniceSgamut3 "lin_venice_sgamut3" +#define kOfxColourspaceLinearVeniceSGamut3AliasInputSonyLinearVeniceSGamut3 "Input - Sony - Linear - Venice S-Gamut3" +#define kOfxColourspaceLinearVeniceSGamut3List { "Linear Venice S-Gamut3", "lin_venice_sgamut3", "Input - Sony - Linear - Venice S-Gamut3" } +#define kOfxColourspaceLinearVeniceSGamut3Encoding "scene-linear" +#define kOfxColourspaceLinearVeniceSGamut3IsSceneLinear true +#define kOfxColourspaceLinearVeniceSGamut3IsData false + +// Linear Venice S-Gamut3.Cine +// Convert Linear Venice S-Gamut3.Cine to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVeniceSGamut3CineAliasLinVeniceSgamut3cine "lin_venice_sgamut3cine" +#define kOfxColourspaceLinearVeniceSGamut3CineAliasInputSonyLinearVeniceSGamut3Cine "Input - Sony - Linear - Venice S-Gamut3.Cine" +#define kOfxColourspaceLinearVeniceSGamut3CineList { "Linear Venice S-Gamut3.Cine", "lin_venice_sgamut3cine", "Input - Sony - Linear - Venice S-Gamut3.Cine" } +#define kOfxColourspaceLinearVeniceSGamut3CineEncoding "scene-linear" +#define kOfxColourspaceLinearVeniceSGamut3CineIsSceneLinear true +#define kOfxColourspaceLinearVeniceSGamut3CineIsData false + +// S-Log3 S-Gamut3 +// Convert Sony S-Log3 S-Gamut3 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3SGamut3AliasSlog3Sgamut3 "slog3_sgamut3" +#define kOfxColourspaceSLog3SGamut3AliasInputSonySLog3SGamut3 "Input - Sony - S-Log3 - S-Gamut3" +#define kOfxColourspaceSLog3SGamut3List { "S-Log3 S-Gamut3", "slog3_sgamut3", "Input - Sony - S-Log3 - S-Gamut3" } +#define kOfxColourspaceSLog3SGamut3Encoding "log" +#define kOfxColourspaceSLog3SGamut3IsSceneLinear false +#define kOfxColourspaceSLog3SGamut3IsData false + +// S-Log3 S-Gamut3.Cine +// Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamut3cine "slog3_sgamut3cine" +#define kOfxColourspaceSLog3SGamut3CineAliasInputSonySLog3SGamut3Cine "Input - Sony - S-Log3 - S-Gamut3.Cine" +#define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamutcine "slog3_sgamutcine" +#define kOfxColourspaceSLog3SGamut3CineList { "S-Log3 S-Gamut3.Cine", "slog3_sgamut3cine", "Input - Sony - S-Log3 - S-Gamut3.Cine", "slog3_sgamutcine" } +#define kOfxColourspaceSLog3SGamut3CineEncoding "log" +#define kOfxColourspaceSLog3SGamut3CineIsSceneLinear false +#define kOfxColourspaceSLog3SGamut3CineIsData false + +// S-Log3 Venice S-Gamut3 +// Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3VeniceSGamut3AliasSlog3VeniceSgamut3 "slog3_venice_sgamut3" +#define kOfxColourspaceSLog3VeniceSGamut3AliasInputSonySLog3VeniceSGamut3 "Input - Sony - S-Log3 - Venice S-Gamut3" +#define kOfxColourspaceSLog3VeniceSGamut3List { "S-Log3 Venice S-Gamut3", "slog3_venice_sgamut3", "Input - Sony - S-Log3 - Venice S-Gamut3" } +#define kOfxColourspaceSLog3VeniceSGamut3Encoding "log" +#define kOfxColourspaceSLog3VeniceSGamut3IsSceneLinear false +#define kOfxColourspaceSLog3VeniceSGamut3IsData false + +// S-Log3 Venice S-Gamut3.Cine +// Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" +#define kOfxColourspaceSLog3VeniceSGamut3CineAliasInputSonySLog3VeniceSGamut3Cine "Input - Sony - S-Log3 - Venice S-Gamut3.Cine" +#define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamutcine "slog3_venice_sgamutcine" +#define kOfxColourspaceSLog3VeniceSGamut3CineList { "S-Log3 Venice S-Gamut3.Cine", "slog3_venice_sgamut3cine", "Input - Sony - S-Log3 - Venice S-Gamut3.Cine", "slog3_venice_sgamutcine" } +#define kOfxColourspaceSLog3VeniceSGamut3CineEncoding "log" +#define kOfxColourspaceSLog3VeniceSGamut3CineIsSceneLinear false +#define kOfxColourspaceSLog3VeniceSGamut3CineIsData false + +// Camera Rec.709 +// Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0 +#define kOfxColourspaceCameraRec709AliasCameraRec709 "camera_rec709" +#define kOfxColourspaceCameraRec709AliasUtilityRec709Camera "Utility - Rec.709 - Camera" +#define kOfxColourspaceCameraRec709AliasRec709Camera "rec709_camera" +#define kOfxColourspaceCameraRec709List { "Camera Rec.709", "camera_rec709", "Utility - Rec.709 - Camera", "rec709_camera" } +#define kOfxColourspaceCameraRec709Encoding "sdr-video" +#define kOfxColourspaceCameraRec709IsSceneLinear false +#define kOfxColourspaceCameraRec709IsData false + +// Linear P3-D65 +// Convert ACES2065-1 to linear P3 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 +#define kOfxColourspaceLinearP3D65AliasLinP3d65 "lin_p3d65" +#define kOfxColourspaceLinearP3D65AliasUtilityLinearP3D65 "Utility - Linear - P3-D65" +#define kOfxColourspaceLinearP3D65List { "Linear P3-D65", "lin_p3d65", "Utility - Linear - P3-D65" } +#define kOfxColourspaceLinearP3D65Encoding "scene-linear" +#define kOfxColourspaceLinearP3D65IsSceneLinear true +#define kOfxColourspaceLinearP3D65IsData false + +// Linear Rec.2020 +// Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 +#define kOfxColourspaceLinearRec2020AliasLinRec2020 "lin_rec2020" +#define kOfxColourspaceLinearRec2020AliasUtilityLinearRec2020 "Utility - Linear - Rec.2020" +#define kOfxColourspaceLinearRec2020List { "Linear Rec.2020", "lin_rec2020", "Utility - Linear - Rec.2020" } +#define kOfxColourspaceLinearRec2020Encoding "scene-linear" +#define kOfxColourspaceLinearRec2020IsSceneLinear true +#define kOfxColourspaceLinearRec2020IsData false + +// Linear Rec.709 (sRGB) +// Convert ACES2065-1 to linear Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 +#define kOfxColourspaceLinearRec709sRGBAliasLinRec709Srgb "lin_rec709_srgb" +#define kOfxColourspaceLinearRec709sRGBAliasUtilityLinearRec709 "Utility - Linear - Rec.709" +#define kOfxColourspaceLinearRec709sRGBAliasLinRec709 "lin_rec709" +#define kOfxColourspaceLinearRec709sRGBAliasLinSrgb "lin_srgb" +#define kOfxColourspaceLinearRec709sRGBAliasUtilityLinearSRGB "Utility - Linear - sRGB" +#define kOfxColourspaceLinearRec709sRGBList { "Linear Rec.709 (sRGB)", "lin_rec709_srgb", "Utility - Linear - Rec.709", "lin_rec709", "lin_srgb", "Utility - Linear - sRGB" } +#define kOfxColourspaceLinearRec709sRGBEncoding "scene-linear" +#define kOfxColourspaceLinearRec709sRGBIsSceneLinear true +#define kOfxColourspaceLinearRec709sRGBIsData false + +// Gamma 1.8 Rec.709 - Texture +// Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 +#define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709Tx "g18_rec709_tx" +#define kOfxColourspaceGamma18Rec709TextureAliasUtilityGamma18Rec709Texture "Utility - Gamma 1.8 - Rec.709 - Texture" +#define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709 "g18_rec709" +#define kOfxColourspaceGamma18Rec709TextureList { "Gamma 1.8 Rec.709 - Texture", "g18_rec709_tx", "Utility - Gamma 1.8 - Rec.709 - Texture", "g18_rec709" } +#define kOfxColourspaceGamma18Rec709TextureEncoding "sdr-video" +#define kOfxColourspaceGamma18Rec709TextureIsSceneLinear false +#define kOfxColourspaceGamma18Rec709TextureIsData false + +// Gamma 2.2 AP1 - Texture +// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, D60 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 +#define kOfxColourspaceGamma22AP1TextureAliasG22Ap1Tx "g22_ap1_tx" +#define kOfxColourspaceGamma22AP1TextureAliasG22Ap1 "g22_ap1" +#define kOfxColourspaceGamma22AP1TextureList { "Gamma 2.2 AP1 - Texture", "g22_ap1_tx", "g22_ap1" } +#define kOfxColourspaceGamma22AP1TextureEncoding "sdr-video" +#define kOfxColourspaceGamma22AP1TextureIsSceneLinear false +#define kOfxColourspaceGamma22AP1TextureIsData false + +// Gamma 2.2 Rec.709 - Texture +// Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 +#define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709Tx "g22_rec709_tx" +#define kOfxColourspaceGamma22Rec709TextureAliasUtilityGamma22Rec709Texture "Utility - Gamma 2.2 - Rec.709 - Texture" +#define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709 "g22_rec709" +#define kOfxColourspaceGamma22Rec709TextureList { "Gamma 2.2 Rec.709 - Texture", "g22_rec709_tx", "Utility - Gamma 2.2 - Rec.709 - Texture", "g22_rec709" } +#define kOfxColourspaceGamma22Rec709TextureEncoding "sdr-video" +#define kOfxColourspaceGamma22Rec709TextureIsSceneLinear false +#define kOfxColourspaceGamma22Rec709TextureIsData false + +// Gamma 2.4 Rec.709 - Texture +// Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 +#define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709Tx "g24_rec709_tx" +#define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709 "g24_rec709" +#define kOfxColourspaceGamma24Rec709TextureAliasRec709Display "rec709_display" +#define kOfxColourspaceGamma24Rec709TextureAliasUtilityRec709Display "Utility - Rec.709 - Display" +#define kOfxColourspaceGamma24Rec709TextureList { "Gamma 2.4 Rec.709 - Texture", "g24_rec709_tx", "g24_rec709", "rec709_display", "Utility - Rec.709 - Display" } +#define kOfxColourspaceGamma24Rec709TextureEncoding "sdr-video" +#define kOfxColourspaceGamma24Rec709TextureIsSceneLinear false +#define kOfxColourspaceGamma24Rec709TextureIsData false + +// sRGB Encoded AP1 - Texture +// Convert ACES2065-1 to sRGB Encoded AP1 primaries, D60 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 +#define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" +#define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbAp1 "srgb_ap1" +#define kOfxColourspaceSRGBEncodedAP1TextureList { "sRGB Encoded AP1 - Texture", "srgb_encoded_ap1_tx", "srgb_ap1" } +#define kOfxColourspaceSRGBEncodedAP1TextureEncoding "sdr-video" +#define kOfxColourspaceSRGBEncodedAP1TextureIsSceneLinear false +#define kOfxColourspaceSRGBEncodedAP1TextureIsData false + +// sRGB - Texture +// Convert ACES2065-1 to sRGB +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 +#define kOfxColourspaceSRGBTextureAliasSrgbTx "srgb_tx" +#define kOfxColourspaceSRGBTextureAliasUtilitySRGBTexture "Utility - sRGB - Texture" +#define kOfxColourspaceSRGBTextureAliasSrgbTexture "srgb_texture" +#define kOfxColourspaceSRGBTextureAliasInputGenericSRGBTexture "Input - Generic - sRGB - Texture" +#define kOfxColourspaceSRGBTextureList { "sRGB - Texture", "srgb_tx", "Utility - sRGB - Texture", "srgb_texture", "Input - Generic - sRGB - Texture" } +#define kOfxColourspaceSRGBTextureEncoding "" +#define kOfxColourspaceSRGBTextureIsSceneLinear false +#define kOfxColourspaceSRGBTextureIsData false + +// Raw +// The utility "Raw" colorspace. +#define kOfxColourspaceRawAliasUtilityRaw "Utility - Raw" +#define kOfxColourspaceRawList { "Raw", "Utility - Raw" } +#define kOfxColourspaceRawEncoding "" +#define kOfxColourspaceRawIsSceneLinear false +#define kOfxColourspaceRawIsData true + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/scripts/genColour b/scripts/genColour new file mode 100755 index 00000000..b3dbf46c --- /dev/null +++ b/scripts/genColour @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 + +# Copyright OpenFX and contributors to the OpenFX project. +# SPDX-License-Identifier: BSD-3-Clause + +# Extract information from an OCIO config to C header. +# OCIO environment variable must point to the config being extracted. +# Example invocation: +# OCIO=ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1 scripts/genColour > include/ofxColourspaceList.h + +import PyOpenColorIO as OCIO +from string import Template + +header = '''#ifndef _ofxColourspaceList_h_ +#define _ofxColourspaceList_h_ + +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + +#ifdef __cplusplus +extern "C" { +#endif + +/** @file ofxColourspaceList.h +Contains the list of supported colourspaces. +This file was auto-generated by scripts/genColour from $config_name. +*/ +''' + +footer = ''' +#ifdef __cplusplus +} +#endif + +#endif +''' + +chars_to_delete = str.maketrans('', '', ' -.()') +def camel_name(name): + return ' '.join([word[0].upper() + word[1:] for word in name.replace(' ', '_').split('_')]).translate(chars_to_delete) + +define_base = '#define kOfxColourspace' + +def print_name(name): + print(f'{define_base}{camel_name(name)} "{name}"') + +def print_role(role): + print(f'{define_base}Role{camel_name(role[0])} "{role[0]}"') + print(f'{define_base}Role{camel_name(role[0])}Colourspace "{role[1]}"') + role_map = '{ "' + role[0] + '", "' + role[1] + '" }' + print(f'{define_base}Role{camel_name(role[0])}Mapping {role_map}') + +def print_string_property(name, propname, value): + print(f'{define_base}{camel_name(name)}{propname} "{value}"') + +def print_bool_property(name, propname, value): + print(f'{define_base}{camel_name(name)}Is{propname} {str(value).lower()}') + +def print_list(name, list): + name_list = '{ "' + '", "'.join(list) + '" }' + print(f'{define_base}{camel_name(name)}List {name_list}') + +config = OCIO.GetCurrentConfig() +def print_colourspace(spc): + name = spc.getName() + print(f'\n// {name}\n//', '\n// '.join(spc.getDescription().split('\n')).replace('\n// \n', '\n')) + name_list = [name] + for alias in spc.getAliases(): + name_list.append(alias) + print_string_property(name, f'Alias{camel_name(alias)}', alias) + print_list(name, name_list) + print_string_property(name, 'Encoding', spc.getEncoding()) + print_bool_property(name, 'SceneLinear', config.isColorSpaceLinear(name, OCIO.REFERENCE_SPACE_SCENE)) + print_bool_property(name, 'Data', spc.isData()) + +print(Template(header).substitute(config_name=config.getName())) + +print('// Roles') +for role in config.getRoles(): + print_role(role) + +print('\n// Display Colourspaces') +for display in config.getDisplays(): + print_colourspace(config.getColorSpace(display)) + +print('\n// Scene Colourspaces') +for spc in config.getColorSpaces(): + print_colourspace(spc) + +print(footer) From 559e0ba49b3476a9fae3c96f312bb4b59fc3e936 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sun, 30 Apr 2023 12:24:58 +0100 Subject: [PATCH 08/34] Improve the readability of roles Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 18 ++++++++++++++++++ scripts/genColour | 1 + 2 files changed, 19 insertions(+) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 2cfdb2bc..a9cc4e29 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -14,30 +14,48 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces */ // Roles + +// aces_interchange #define kOfxColourspaceRoleAcesInterchange "aces_interchange" #define kOfxColourspaceRoleAcesInterchangeColourspace "ACES2065-1" #define kOfxColourspaceRoleAcesInterchangeMapping { "aces_interchange", "ACES2065-1" } + +// cie_xyz_d65_interchange #define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange" #define kOfxColourspaceRoleCieXyzD65InterchangeColourspace "CIE-XYZ-D65" #define kOfxColourspaceRoleCieXyzD65InterchangeMapping { "cie_xyz_d65_interchange", "CIE-XYZ-D65" } + +// color_picking #define kOfxColourspaceRoleColorPicking "color_picking" #define kOfxColourspaceRoleColorPickingColourspace "sRGB - Texture" #define kOfxColourspaceRoleColorPickingMapping { "color_picking", "sRGB - Texture" } + +// color_timing #define kOfxColourspaceRoleColorTiming "color_timing" #define kOfxColourspaceRoleColorTimingColourspace "ACEScct" #define kOfxColourspaceRoleColorTimingMapping { "color_timing", "ACEScct" } + +// compositing_log #define kOfxColourspaceRoleCompositingLog "compositing_log" #define kOfxColourspaceRoleCompositingLogColourspace "ACEScct" #define kOfxColourspaceRoleCompositingLogMapping { "compositing_log", "ACEScct" } + +// data #define kOfxColourspaceRoleData "data" #define kOfxColourspaceRoleDataColourspace "Raw" #define kOfxColourspaceRoleDataMapping { "data", "Raw" } + +// matte_paint #define kOfxColourspaceRoleMattePaint "matte_paint" #define kOfxColourspaceRoleMattePaintColourspace "sRGB - Texture" #define kOfxColourspaceRoleMattePaintMapping { "matte_paint", "sRGB - Texture" } + +// scene_linear #define kOfxColourspaceRoleSceneLinear "scene_linear" #define kOfxColourspaceRoleSceneLinearColourspace "ACEScg" #define kOfxColourspaceRoleSceneLinearMapping { "scene_linear", "ACEScg" } + +// texture_paint #define kOfxColourspaceRoleTexturePaint "texture_paint" #define kOfxColourspaceRoleTexturePaintColourspace "ACEScct" #define kOfxColourspaceRoleTexturePaintMapping { "texture_paint", "ACEScct" } diff --git a/scripts/genColour b/scripts/genColour index b3dbf46c..3001bbda 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -45,6 +45,7 @@ def print_name(name): print(f'{define_base}{camel_name(name)} "{name}"') def print_role(role): + print(f'\n// {role[0]}') print(f'{define_base}Role{camel_name(role[0])} "{role[0]}"') print(f'{define_base}Role{camel_name(role[0])}Colourspace "{role[1]}"') role_map = '{ "' + role[0] + '", "' + role[1] + '" }' From caf96afcdc1c4608f9d306c748cf07b4679f799b Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sun, 30 Apr 2023 12:30:28 +0100 Subject: [PATCH 09/34] Allow a list of preferred colourspaces Also removed the ACESCG style and renamed ACES to Native. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 59 ++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index 0bb90a2b..54ed2f92 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -19,33 +19,28 @@ Contains the API for colourspace data exchange. - Default - kOfxImageEffectPropColourManagementStyleNone - Valid Values - This must be one of - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementACESCG - colourspaces from the OCIO built-in ACES CG config are available - - ::kOfxImageEffectPropColourManagementACES - colourspaces from the OCIO built-in ACES Studio config are available + - ::kOfxImageEffectPropColourManagementNative - colourspaces from the OCIO built-in ACES Studio config are available (see ofxColourspaceList.h) - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) Hosts should set this property if they will provide colourspace information to plug-ins. Plug-ins should set this property if they can use host-provided colourspace information. OCIO is used as the reference for the colour management API, but -is not required to implement the ACESCG or ACES styles. +is not required to implement the Native style. -The colourspace strings used in the ACESCG style are from: -https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio - -The colourspace strings used in the ACES style are from: +The colourspace strings used in the Native style are from: https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio +and stored for OFX purposes in ofxColourspaceList.h. -The assumption is that OCIO > ACES > ACESCG so the highest style supported by +The assumption is that OCIO > Native so the highest style supported by both host and plug-in will be chosen. */ #define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" /* String used to indicate that no colour management is available. */ #define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" -/* String used to indicate that basic colour management is available. */ -#define kOfxImageEffectPropColourManagementACESCG "OfxImageEffectPropColourManagementACESCG" -/* String used to indicate that ACES colour management is available. */ -#define kOfxImageEffectPropColourManagementACES "OfxImageEffectPropColourManagementACES" +/* String used to indicate that Native colour management is available. */ +#define kOfxImageEffectPropColourManagementNative "OfxImageEffectPropColourManagementNative" /* String used to indicate that OCIO colour management is available. */ #define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" @@ -80,18 +75,32 @@ kOfxImageClipPropPreferredColourspace where reasonable. /** @brief The preferred colourspace for this clip - - Type - string X 1 + - Type - string X N - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is permitted under the style in use. - For ACESCG and ACES, this a any colourspace from the colorspaces or roles section of the relevant config. + For Native, this any scene colourspace or role from ofxColourspaceList.h. For OCIO, this could be any string acceptable to Config::getColorSpace(). Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences -to request the image in a certain colourspace. Hosts may optionally provide -input images in this colourspace, but must always set -kOfxImageClipPropColourspace to the actual colourspace used. -Hosts may set this on an output clip, which could be helpful in a generator -context. +to request images in a colourspace which is convenient for them. The +property is an ordered set of colourspace identifiers, which may be any of the +names or aliases supported by the colour management style in use. If plug-ins +prefer more esoteric colourspaces, they are encouraged to also include generic +roles as a fallback. For example a colour grading plug-in which supports a +specific camera and expects a log colourspace might list: + +"arri_logc4", "arri_logc3_ei800", "ACEScct", "color_timing" + +The host should provide input images in the first mutually agreeable +colourspace, and set kOfxImageClipPropColourspace to tell the plug-in which +colourspace has been selected. In the event that the host cannot supply images +in a requested colourspace, it may supply images in any valid colourspace. +Plug-ins must check kOfxImageClipPropColourspace to see if their request was +satisfied. + +Hosts may set this on an output clip, which could be helpful in a generator +context, and plug-ins should follow the same logic as hosts when deciding +which colourspace to use. It might be much less costly for a host to perform a conversion than a plug-in, so in the example of a plug-in which performs all internal @@ -99,16 +108,22 @@ processing in scene linear, it is sensible for the plug-in to universally assert that preference and the host to honour it if possible. However, if a plug-in is capable of adapting to any input colourspace, it should not set this preference. + +If a plug-in has inputs which contain motion vectors, depth values or other +non-colour channels, it should set the preferred colourspace to "data". +Similarly, if a host requests outputs in a typical scene colourspace, but the +plug-in is producing motion vectors, it should ignore the request and set +kOfxImageClipPropColourspace to "data". */ -#define kOfxImageClipPropPreferredColourspace "OfxImageClipPropPreferredColourspace" +#define kOfxImageClipPropPreferredColourspaces "OfxImageClipPropPreferredColourspaces" /** @brief The display colourspace used in the plug-in's viewport - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - colourspace from the display_colorspaces section of the relevant ACES OCIO config + - Valid Values - colourspace from the Display Colorspaces section of ofxColourspaceList.h -Used with the ACESCG or ACES colour management styles, this property is relevant +Used with the Native colour management style, this property is relevant for plug-ins which have their own viewport in a custom window. Plug-ins should not expect this to be available during a render event. Hosts should set this property to a display colourspace which matches that From 132d0277bdefb146964c09e4a99215b6e962490f Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 2 May 2023 20:53:49 +0100 Subject: [PATCH 10/34] Added missing colourspace name definitions Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 48 ++++++++++++++++++++++++++++++++++++ scripts/genColour | 1 + 2 files changed, 49 insertions(+) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index a9cc4e29..b0cbf77c 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -64,6 +64,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // sRGB - Display // Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF) +#define kOfxColourspaceSRGBDisplay "sRGB - Display" #define kOfxColourspaceSRGBDisplayAliasSrgbDisplay "srgb_display" #define kOfxColourspaceSRGBDisplayList { "sRGB - Display", "srgb_display" } #define kOfxColourspaceSRGBDisplayEncoding "sdr-video" @@ -72,6 +73,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Rec.1886 Rec.709 - Display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video) +#define kOfxColourspaceRec1886Rec709Display "Rec.1886 Rec.709 - Display" #define kOfxColourspaceRec1886Rec709DisplayAliasRec1886Rec709Display "rec1886_rec709_display" #define kOfxColourspaceRec1886Rec709DisplayList { "Rec.1886 Rec.709 - Display", "rec1886_rec709_display" } #define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video" @@ -80,6 +82,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Rec.1886 Rec.2020 - Display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video) +#define kOfxColourspaceRec1886Rec2020Display "Rec.1886 Rec.2020 - Display" #define kOfxColourspaceRec1886Rec2020DisplayAliasRec1886Rec2020Display "rec1886_rec2020_display" #define kOfxColourspaceRec1886Rec2020DisplayList { "Rec.1886 Rec.2020 - Display", "rec1886_rec2020_display" } #define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video" @@ -88,6 +91,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Rec.2100-HLG - Display // Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit +#define kOfxColourspaceRec2100HLGDisplay "Rec.2100-HLG - Display" #define kOfxColourspaceRec2100HLGDisplayAliasRec2100HlgDisplay "rec2100_hlg_display" #define kOfxColourspaceRec2100HLGDisplayList { "Rec.2100-HLG - Display", "rec2100_hlg_display" } #define kOfxColourspaceRec2100HLGDisplayEncoding "hdr-video" @@ -96,6 +100,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Rec.2100-PQ - Display // Convert CIE XYZ (D65 white) to Rec.2100-PQ +#define kOfxColourspaceRec2100PQDisplay "Rec.2100-PQ - Display" #define kOfxColourspaceRec2100PQDisplayAliasRec2100PqDisplay "rec2100_pq_display" #define kOfxColourspaceRec2100PQDisplayList { "Rec.2100-PQ - Display", "rec2100_pq_display" } #define kOfxColourspaceRec2100PQDisplayEncoding "hdr-video" @@ -104,6 +109,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ST2084-P3-D65 - Display // Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries +#define kOfxColourspaceST2084P3D65Display "ST2084-P3-D65 - Display" #define kOfxColourspaceST2084P3D65DisplayAliasSt2084P3d65Display "st2084_p3d65_display" #define kOfxColourspaceST2084P3D65DisplayList { "ST2084-P3-D65 - Display", "st2084_p3d65_display" } #define kOfxColourspaceST2084P3D65DisplayEncoding "hdr-video" @@ -112,6 +118,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // P3-D60 - Display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) +#define kOfxColourspaceP3D60Display "P3-D60 - Display" #define kOfxColourspaceP3D60DisplayAliasP3d60Display "p3d60_display" #define kOfxColourspaceP3D60DisplayList { "P3-D60 - Display", "p3d60_display" } #define kOfxColourspaceP3D60DisplayEncoding "sdr-video" @@ -120,6 +127,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // P3-D65 - Display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 +#define kOfxColourspaceP3D65Display "P3-D65 - Display" #define kOfxColourspaceP3D65DisplayAliasP3d65Display "p3d65_display" #define kOfxColourspaceP3D65DisplayList { "P3-D65 - Display", "p3d65_display" } #define kOfxColourspaceP3D65DisplayEncoding "sdr-video" @@ -128,6 +136,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // P3-DCI - Display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) +#define kOfxColourspaceP3DCIDisplay "P3-DCI - Display" #define kOfxColourspaceP3DCIDisplayAliasP3DciDisplay "p3_dci_display" #define kOfxColourspaceP3DCIDisplayList { "P3-DCI - Display", "p3_dci_display" } #define kOfxColourspaceP3DCIDisplayEncoding "sdr-video" @@ -138,6 +147,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ACES2065-1 // The "Academy Color Encoding System" reference colorspace. +#define kOfxColourspaceACES20651 "ACES2065-1" #define kOfxColourspaceACES20651AliasAces20651 "aces2065_1" #define kOfxColourspaceACES20651AliasACESACES20651 "ACES - ACES2065-1" #define kOfxColourspaceACES20651AliasLinAp0 "lin_ap0" @@ -149,6 +159,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ACEScc // Convert ACEScc to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 +#define kOfxColourspaceACEScc "ACEScc" #define kOfxColourspaceACESccAliasACESACEScc "ACES - ACEScc" #define kOfxColourspaceACESccAliasAcesccAp1 "acescc_ap1" #define kOfxColourspaceACESccList { "ACEScc", "ACES - ACEScc", "acescc_ap1" } @@ -159,6 +170,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ACEScct // Convert ACEScct to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 +#define kOfxColourspaceACEScct "ACEScct" #define kOfxColourspaceACEScctAliasACESACEScct "ACES - ACEScct" #define kOfxColourspaceACEScctAliasAcescctAp1 "acescct_ap1" #define kOfxColourspaceACEScctList { "ACEScct", "ACES - ACEScct", "acescct_ap1" } @@ -169,6 +181,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ACEScg // Convert ACEScg to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 +#define kOfxColourspaceACEScg "ACEScg" #define kOfxColourspaceACEScgAliasACESACEScg "ACES - ACEScg" #define kOfxColourspaceACEScgAliasLinAp1 "lin_ap1" #define kOfxColourspaceACEScgList { "ACEScg", "ACES - ACEScg", "lin_ap1" } @@ -179,6 +192,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ADX10 // Convert ADX10 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 +#define kOfxColourspaceADX10 "ADX10" #define kOfxColourspaceADX10AliasInputADXADX10 "Input - ADX - ADX10" #define kOfxColourspaceADX10List { "ADX10", "Input - ADX - ADX10" } #define kOfxColourspaceADX10Encoding "log" @@ -188,6 +202,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ADX16 // Convert ADX16 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3 +#define kOfxColourspaceADX16 "ADX16" #define kOfxColourspaceADX16AliasInputADXADX16 "Input - ADX - ADX16" #define kOfxColourspaceADX16List { "ADX16", "Input - ADX - ADX16" } #define kOfxColourspaceADX16Encoding "log" @@ -197,6 +212,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear ARRI Wide Gamut 3 // Convert Linear ARRI Wide Gamut 3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearARRIWideGamut3 "Linear ARRI Wide Gamut 3" #define kOfxColourspaceLinearARRIWideGamut3AliasLinArriWideGamut3 "lin_arri_wide_gamut_3" #define kOfxColourspaceLinearARRIWideGamut3AliasInputARRILinearALEXAWideGamut "Input - ARRI - Linear - ALEXA Wide Gamut" #define kOfxColourspaceLinearARRIWideGamut3AliasLinAlexawide "lin_alexawide" @@ -208,6 +224,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ARRI LogC3 (EI800) // Convert ARRI LogC3 (EI800) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_EI800_to_ACES2065-1:1.0 +#define kOfxColourspaceARRILogC3EI800 "ARRI LogC3 (EI800)" #define kOfxColourspaceARRILogC3EI800AliasArriLogc3Ei800 "arri_logc3_ei800" #define kOfxColourspaceARRILogC3EI800AliasInputARRIV3LogCEI800WideGamut "Input - ARRI - V3 LogC (EI800) - Wide Gamut" #define kOfxColourspaceARRILogC3EI800AliasLogc3ei800Alexawide "logc3ei800_alexawide" @@ -219,6 +236,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear ARRI Wide Gamut 4 // Convert Linear ARRI Wide Gamut 4 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearARRIWideGamut4 "Linear ARRI Wide Gamut 4" #define kOfxColourspaceLinearARRIWideGamut4AliasLinArriWideGamut4 "lin_arri_wide_gamut_4" #define kOfxColourspaceLinearARRIWideGamut4AliasLinAwg4 "lin_awg4" #define kOfxColourspaceLinearARRIWideGamut4List { "Linear ARRI Wide Gamut 4", "lin_arri_wide_gamut_4", "lin_awg4" } @@ -229,6 +247,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // ARRI LogC4 // Convert ARRI LogC4 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_to_ACES2065-1:1.0 +#define kOfxColourspaceARRILogC4 "ARRI LogC4" #define kOfxColourspaceARRILogC4AliasArriLogc4 "arri_logc4" #define kOfxColourspaceARRILogC4List { "ARRI LogC4", "arri_logc4" } #define kOfxColourspaceARRILogC4Encoding "log" @@ -238,6 +257,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // BMDFilm WideGamut Gen5 // Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_WideGamut_Gen5_to_ACES2065-1:1.0 +#define kOfxColourspaceBMDFilmWideGamutGen5 "BMDFilm WideGamut Gen5" #define kOfxColourspaceBMDFilmWideGamutGen5AliasBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" #define kOfxColourspaceBMDFilmWideGamutGen5List { "BMDFilm WideGamut Gen5", "bmdfilm_widegamut_gen5" } #define kOfxColourspaceBMDFilmWideGamutGen5Encoding "log" @@ -247,6 +267,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // DaVinci Intermediate WideGamut // Convert DaVinci Intermediate Wide Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceDaVinciIntermediateWideGamut "DaVinci Intermediate WideGamut" #define kOfxColourspaceDaVinciIntermediateWideGamutAliasDavinciIntermediateWidegamut "davinci_intermediate_widegamut" #define kOfxColourspaceDaVinciIntermediateWideGamutList { "DaVinci Intermediate WideGamut", "davinci_intermediate_widegamut" } #define kOfxColourspaceDaVinciIntermediateWideGamutEncoding "log" @@ -256,6 +277,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear BMD WideGamut Gen5 // Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearBMDWideGamutGen5 "Linear BMD WideGamut Gen5" #define kOfxColourspaceLinearBMDWideGamutGen5AliasLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" #define kOfxColourspaceLinearBMDWideGamutGen5List { "Linear BMD WideGamut Gen5", "lin_bmd_widegamut_gen5" } #define kOfxColourspaceLinearBMDWideGamutGen5Encoding "scene-linear" @@ -265,6 +287,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear DaVinci WideGamut // Convert Linear DaVinci Wide Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearDaVinciWideGamut "Linear DaVinci WideGamut" #define kOfxColourspaceLinearDaVinciWideGamutAliasLinDavinciWidegamut "lin_davinci_widegamut" #define kOfxColourspaceLinearDaVinciWideGamutList { "Linear DaVinci WideGamut", "lin_davinci_widegamut" } #define kOfxColourspaceLinearDaVinciWideGamutEncoding "scene-linear" @@ -273,6 +296,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // CanonLog3 CinemaGamut D55 // Convert Canon Log 3 Cinema Gamut to ACES2065-1 +#define kOfxColourspaceCanonLog3CinemaGamutD55 "CanonLog3 CinemaGamut D55" #define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" #define kOfxColourspaceCanonLog3CinemaGamutD55AliasInputCanonCanonLog3CinemaGamutDaylight "Input - Canon - Canon-Log3 - Cinema Gamut Daylight" #define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3Cgamutday "canonlog3_cgamutday" @@ -284,6 +308,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear CinemaGamut D55 // Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearCinemaGamutD55 "Linear CinemaGamut D55" #define kOfxColourspaceLinearCinemaGamutD55AliasLinCinemagamutD55 "lin_cinemagamut_d55" #define kOfxColourspaceLinearCinemaGamutD55AliasInputCanonLinearCanonCinemaGamutDaylight "Input - Canon - Linear - Canon Cinema Gamut Daylight" #define kOfxColourspaceLinearCinemaGamutD55AliasLinCanoncgamutday "lin_canoncgamutday" @@ -295,6 +320,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear V-Gamut // Convert Linear Panasonic V-Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVGamut "Linear V-Gamut" #define kOfxColourspaceLinearVGamutAliasLinVgamut "lin_vgamut" #define kOfxColourspaceLinearVGamutAliasInputPanasonicLinearVGamut "Input - Panasonic - Linear - V-Gamut" #define kOfxColourspaceLinearVGamutList { "Linear V-Gamut", "lin_vgamut", "Input - Panasonic - Linear - V-Gamut" } @@ -305,6 +331,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // V-Log V-Gamut // Convert Panasonic V-Log - V-Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog_VGamut_to_ACES2065-1:1.0 +#define kOfxColourspaceVLogVGamut "V-Log V-Gamut" #define kOfxColourspaceVLogVGamutAliasVlogVgamut "vlog_vgamut" #define kOfxColourspaceVLogVGamutAliasInputPanasonicVLogVGamut "Input - Panasonic - V-Log - V-Gamut" #define kOfxColourspaceVLogVGamutList { "V-Log V-Gamut", "vlog_vgamut", "Input - Panasonic - V-Log - V-Gamut" } @@ -315,6 +342,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear REDWideGamutRGB // Convert Linear REDWideGamutRGB to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearREDWideGamutRGB "Linear REDWideGamutRGB" #define kOfxColourspaceLinearREDWideGamutRGBAliasLinRedwidegamutrgb "lin_redwidegamutrgb" #define kOfxColourspaceLinearREDWideGamutRGBAliasInputREDLinearREDWideGamutRGB "Input - RED - Linear - REDWideGamutRGB" #define kOfxColourspaceLinearREDWideGamutRGBAliasLinRwg "lin_rwg" @@ -326,6 +354,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Log3G10 REDWideGamutRGB // Convert RED Log3G10 REDWideGamutRGB to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10_REDWideGamutRGB_to_ACES2065-1:1.0 +#define kOfxColourspaceLog3G10REDWideGamutRGB "Log3G10 REDWideGamutRGB" #define kOfxColourspaceLog3G10REDWideGamutRGBAliasLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" #define kOfxColourspaceLog3G10REDWideGamutRGBAliasInputREDREDLog3G10REDWideGamutRGB "Input - RED - REDLog3G10 - REDWideGamutRGB" #define kOfxColourspaceLog3G10REDWideGamutRGBAliasRl3g10Rwg "rl3g10_rwg" @@ -337,6 +366,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear S-Gamut3 // Convert Linear S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearSGamut3 "Linear S-Gamut3" #define kOfxColourspaceLinearSGamut3AliasLinSgamut3 "lin_sgamut3" #define kOfxColourspaceLinearSGamut3AliasInputSonyLinearSGamut3 "Input - Sony - Linear - S-Gamut3" #define kOfxColourspaceLinearSGamut3List { "Linear S-Gamut3", "lin_sgamut3", "Input - Sony - Linear - S-Gamut3" } @@ -347,6 +377,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear S-Gamut3.Cine // Convert Linear S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearSGamut3Cine "Linear S-Gamut3.Cine" #define kOfxColourspaceLinearSGamut3CineAliasLinSgamut3cine "lin_sgamut3cine" #define kOfxColourspaceLinearSGamut3CineAliasInputSonyLinearSGamut3Cine "Input - Sony - Linear - S-Gamut3.Cine" #define kOfxColourspaceLinearSGamut3CineList { "Linear S-Gamut3.Cine", "lin_sgamut3cine", "Input - Sony - Linear - S-Gamut3.Cine" } @@ -357,6 +388,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear Venice S-Gamut3 // Convert Linear Venice S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVeniceSGamut3 "Linear Venice S-Gamut3" #define kOfxColourspaceLinearVeniceSGamut3AliasLinVeniceSgamut3 "lin_venice_sgamut3" #define kOfxColourspaceLinearVeniceSGamut3AliasInputSonyLinearVeniceSGamut3 "Input - Sony - Linear - Venice S-Gamut3" #define kOfxColourspaceLinearVeniceSGamut3List { "Linear Venice S-Gamut3", "lin_venice_sgamut3", "Input - Sony - Linear - Venice S-Gamut3" } @@ -367,6 +399,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear Venice S-Gamut3.Cine // Convert Linear Venice S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceLinearVeniceSGamut3Cine "Linear Venice S-Gamut3.Cine" #define kOfxColourspaceLinearVeniceSGamut3CineAliasLinVeniceSgamut3cine "lin_venice_sgamut3cine" #define kOfxColourspaceLinearVeniceSGamut3CineAliasInputSonyLinearVeniceSGamut3Cine "Input - Sony - Linear - Venice S-Gamut3.Cine" #define kOfxColourspaceLinearVeniceSGamut3CineList { "Linear Venice S-Gamut3.Cine", "lin_venice_sgamut3cine", "Input - Sony - Linear - Venice S-Gamut3.Cine" } @@ -377,6 +410,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // S-Log3 S-Gamut3 // Convert Sony S-Log3 S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3SGamut3 "S-Log3 S-Gamut3" #define kOfxColourspaceSLog3SGamut3AliasSlog3Sgamut3 "slog3_sgamut3" #define kOfxColourspaceSLog3SGamut3AliasInputSonySLog3SGamut3 "Input - Sony - S-Log3 - S-Gamut3" #define kOfxColourspaceSLog3SGamut3List { "S-Log3 S-Gamut3", "slog3_sgamut3", "Input - Sony - S-Log3 - S-Gamut3" } @@ -387,6 +421,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // S-Log3 S-Gamut3.Cine // Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3SGamut3Cine "S-Log3 S-Gamut3.Cine" #define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamut3cine "slog3_sgamut3cine" #define kOfxColourspaceSLog3SGamut3CineAliasInputSonySLog3SGamut3Cine "Input - Sony - S-Log3 - S-Gamut3.Cine" #define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamutcine "slog3_sgamutcine" @@ -398,6 +433,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // S-Log3 Venice S-Gamut3 // Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3VeniceSGamut3 "S-Log3 Venice S-Gamut3" #define kOfxColourspaceSLog3VeniceSGamut3AliasSlog3VeniceSgamut3 "slog3_venice_sgamut3" #define kOfxColourspaceSLog3VeniceSGamut3AliasInputSonySLog3VeniceSGamut3 "Input - Sony - S-Log3 - Venice S-Gamut3" #define kOfxColourspaceSLog3VeniceSGamut3List { "S-Log3 Venice S-Gamut3", "slog3_venice_sgamut3", "Input - Sony - S-Log3 - Venice S-Gamut3" } @@ -408,6 +444,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // S-Log3 Venice S-Gamut3.Cine // Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3Cine_to_ACES2065-1:1.0 +#define kOfxColourspaceSLog3VeniceSGamut3Cine "S-Log3 Venice S-Gamut3.Cine" #define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" #define kOfxColourspaceSLog3VeniceSGamut3CineAliasInputSonySLog3VeniceSGamut3Cine "Input - Sony - S-Log3 - Venice S-Gamut3.Cine" #define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamutcine "slog3_venice_sgamutcine" @@ -419,6 +456,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Camera Rec.709 // Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0 +#define kOfxColourspaceCameraRec709 "Camera Rec.709" #define kOfxColourspaceCameraRec709AliasCameraRec709 "camera_rec709" #define kOfxColourspaceCameraRec709AliasUtilityRec709Camera "Utility - Rec.709 - Camera" #define kOfxColourspaceCameraRec709AliasRec709Camera "rec709_camera" @@ -430,6 +468,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear P3-D65 // Convert ACES2065-1 to linear P3 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 +#define kOfxColourspaceLinearP3D65 "Linear P3-D65" #define kOfxColourspaceLinearP3D65AliasLinP3d65 "lin_p3d65" #define kOfxColourspaceLinearP3D65AliasUtilityLinearP3D65 "Utility - Linear - P3-D65" #define kOfxColourspaceLinearP3D65List { "Linear P3-D65", "lin_p3d65", "Utility - Linear - P3-D65" } @@ -440,6 +479,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear Rec.2020 // Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 +#define kOfxColourspaceLinearRec2020 "Linear Rec.2020" #define kOfxColourspaceLinearRec2020AliasLinRec2020 "lin_rec2020" #define kOfxColourspaceLinearRec2020AliasUtilityLinearRec2020 "Utility - Linear - Rec.2020" #define kOfxColourspaceLinearRec2020List { "Linear Rec.2020", "lin_rec2020", "Utility - Linear - Rec.2020" } @@ -450,6 +490,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Linear Rec.709 (sRGB) // Convert ACES2065-1 to linear Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 +#define kOfxColourspaceLinearRec709sRGB "Linear Rec.709 (sRGB)" #define kOfxColourspaceLinearRec709sRGBAliasLinRec709Srgb "lin_rec709_srgb" #define kOfxColourspaceLinearRec709sRGBAliasUtilityLinearRec709 "Utility - Linear - Rec.709" #define kOfxColourspaceLinearRec709sRGBAliasLinRec709 "lin_rec709" @@ -463,6 +504,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Gamma 1.8 Rec.709 - Texture // Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 +#define kOfxColourspaceGamma18Rec709Texture "Gamma 1.8 Rec.709 - Texture" #define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709Tx "g18_rec709_tx" #define kOfxColourspaceGamma18Rec709TextureAliasUtilityGamma18Rec709Texture "Utility - Gamma 1.8 - Rec.709 - Texture" #define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709 "g18_rec709" @@ -474,6 +516,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Gamma 2.2 AP1 - Texture // Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 +#define kOfxColourspaceGamma22AP1Texture "Gamma 2.2 AP1 - Texture" #define kOfxColourspaceGamma22AP1TextureAliasG22Ap1Tx "g22_ap1_tx" #define kOfxColourspaceGamma22AP1TextureAliasG22Ap1 "g22_ap1" #define kOfxColourspaceGamma22AP1TextureList { "Gamma 2.2 AP1 - Texture", "g22_ap1_tx", "g22_ap1" } @@ -484,6 +527,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Gamma 2.2 Rec.709 - Texture // Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 +#define kOfxColourspaceGamma22Rec709Texture "Gamma 2.2 Rec.709 - Texture" #define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709Tx "g22_rec709_tx" #define kOfxColourspaceGamma22Rec709TextureAliasUtilityGamma22Rec709Texture "Utility - Gamma 2.2 - Rec.709 - Texture" #define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709 "g22_rec709" @@ -495,6 +539,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Gamma 2.4 Rec.709 - Texture // Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 +#define kOfxColourspaceGamma24Rec709Texture "Gamma 2.4 Rec.709 - Texture" #define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709Tx "g24_rec709_tx" #define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709 "g24_rec709" #define kOfxColourspaceGamma24Rec709TextureAliasRec709Display "rec709_display" @@ -507,6 +552,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // sRGB Encoded AP1 - Texture // Convert ACES2065-1 to sRGB Encoded AP1 primaries, D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 +#define kOfxColourspaceSRGBEncodedAP1Texture "sRGB Encoded AP1 - Texture" #define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" #define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbAp1 "srgb_ap1" #define kOfxColourspaceSRGBEncodedAP1TextureList { "sRGB Encoded AP1 - Texture", "srgb_encoded_ap1_tx", "srgb_ap1" } @@ -517,6 +563,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // sRGB - Texture // Convert ACES2065-1 to sRGB // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 +#define kOfxColourspaceSRGBTexture "sRGB - Texture" #define kOfxColourspaceSRGBTextureAliasSrgbTx "srgb_tx" #define kOfxColourspaceSRGBTextureAliasUtilitySRGBTexture "Utility - sRGB - Texture" #define kOfxColourspaceSRGBTextureAliasSrgbTexture "srgb_texture" @@ -528,6 +575,7 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // Raw // The utility "Raw" colorspace. +#define kOfxColourspaceRaw "Raw" #define kOfxColourspaceRawAliasUtilityRaw "Utility - Raw" #define kOfxColourspaceRawList { "Raw", "Utility - Raw" } #define kOfxColourspaceRawEncoding "" diff --git a/scripts/genColour b/scripts/genColour index 3001bbda..2eb19d90 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -65,6 +65,7 @@ config = OCIO.GetCurrentConfig() def print_colourspace(spc): name = spc.getName() print(f'\n// {name}\n//', '\n// '.join(spc.getDescription().split('\n')).replace('\n// \n', '\n')) + print_name(name) name_list = [name] for alias in spc.getAliases(): name_list.append(alias) From f69bfec1244e549268f71daf1ed8dd586f04f568 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sat, 13 Apr 2024 12:54:16 -0700 Subject: [PATCH 11/34] Added the concept of core colourspaces and display names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The colourspace list has been updated to studio-config-v2.1.0_aces-v1.3_ocio-v2.3. The Studio and CG configs are compared to add a new attribute “IsCore”. This is true if the colourspae is present in the CG config, and defines a smaller set of colourspaces. Also, for most colourspaces, the first alias is a better short name than the actual colourspace name. The name is now used as the “DisplayName” attribute and the first alias is used as the base name instead. genColour is now hard-coded to specific OCIO configs so it’s easier to do the Studio vs CG comparisons. Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 986 ++++++++++++++++++++++------------- scripts/genColour | 53 +- 2 files changed, 660 insertions(+), 379 deletions(-) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index b0cbf77c..815e304d 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -10,7 +10,7 @@ extern "C" { /** @file ofxColourspaceList.h Contains the list of supported colourspaces. -This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces-v1.3_ocio-v2.1. +This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces-v1.3_ocio-v2.3. */ // Roles @@ -27,8 +27,8 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // color_picking #define kOfxColourspaceRoleColorPicking "color_picking" -#define kOfxColourspaceRoleColorPickingColourspace "sRGB - Texture" -#define kOfxColourspaceRoleColorPickingMapping { "color_picking", "sRGB - Texture" } +#define kOfxColourspaceRoleColorPickingColourspace "srgb_tx" +#define kOfxColourspaceRoleColorPickingMapping { "color_picking", "srgb_tx" } // color_timing #define kOfxColourspaceRoleColorTiming "color_timing" @@ -47,8 +47,8 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // matte_paint #define kOfxColourspaceRoleMattePaint "matte_paint" -#define kOfxColourspaceRoleMattePaintColourspace "sRGB - Texture" -#define kOfxColourspaceRoleMattePaintMapping { "matte_paint", "sRGB - Texture" } +#define kOfxColourspaceRoleMattePaintColourspace "ACEScct" +#define kOfxColourspaceRoleMattePaintMapping { "matte_paint", "ACEScct" } // scene_linear #define kOfxColourspaceRoleSceneLinear "scene_linear" @@ -57,97 +57,190 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces // texture_paint #define kOfxColourspaceRoleTexturePaint "texture_paint" -#define kOfxColourspaceRoleTexturePaintColourspace "ACEScct" -#define kOfxColourspaceRoleTexturePaintMapping { "texture_paint", "ACEScct" } +#define kOfxColourspaceRoleTexturePaintColourspace "srgb_tx" +#define kOfxColourspaceRoleTexturePaintMapping { "texture_paint", "srgb_tx" } // Display Colourspaces -// sRGB - Display +// srgb_display // Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF) -#define kOfxColourspaceSRGBDisplay "sRGB - Display" -#define kOfxColourspaceSRGBDisplayAliasSrgbDisplay "srgb_display" -#define kOfxColourspaceSRGBDisplayList { "sRGB - Display", "srgb_display" } -#define kOfxColourspaceSRGBDisplayEncoding "sdr-video" -#define kOfxColourspaceSRGBDisplayIsSceneLinear false -#define kOfxColourspaceSRGBDisplayIsData false - -// Rec.1886 Rec.709 - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 +#define kOfxColourspaceSrgbDisplay "srgb_display" +#define kOfxColourspaceSrgbDisplayDisplayName "sRGB - Display" +#define kOfxColourspaceSrgbDisplayAliasSrgbDisplay "srgb_display" +#define kOfxColourspaceSrgbDisplayList { "sRGB - Display", "srgb_display" } +#define kOfxColourspaceSrgbDisplayEncoding "sdr-video" +#define kOfxColourspaceSrgbDisplayIsSceneLinear false +#define kOfxColourspaceSrgbDisplayIsData false +#define kOfxColourspaceSrgbDisplayIsCore true + +// displayp3_display +// Convert CIE XYZ (D65 white) to Apple Display P3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_dim.a1.0.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_dim.a1.0.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_D60sim_dim.a1.0.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_D60sim_dim.a1.0.0 +#define kOfxColourspaceDisplayp3Display "displayp3_display" +#define kOfxColourspaceDisplayp3DisplayDisplayName "Display P3 - Display" +#define kOfxColourspaceDisplayp3DisplayAliasDisplayp3Display "displayp3_display" +#define kOfxColourspaceDisplayp3DisplayList { "Display P3 - Display", "displayp3_display" } +#define kOfxColourspaceDisplayp3DisplayEncoding "sdr-video" +#define kOfxColourspaceDisplayp3DisplayIsSceneLinear false +#define kOfxColourspaceDisplayp3DisplayIsData false +#define kOfxColourspaceDisplayp3DisplayIsCore true + +// rec1886_rec709_display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video) -#define kOfxColourspaceRec1886Rec709Display "Rec.1886 Rec.709 - Display" +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 +#define kOfxColourspaceRec1886Rec709Display "rec1886_rec709_display" +#define kOfxColourspaceRec1886Rec709DisplayDisplayName "Rec.1886 Rec.709 - Display" #define kOfxColourspaceRec1886Rec709DisplayAliasRec1886Rec709Display "rec1886_rec709_display" #define kOfxColourspaceRec1886Rec709DisplayList { "Rec.1886 Rec.709 - Display", "rec1886_rec709_display" } #define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video" #define kOfxColourspaceRec1886Rec709DisplayIsSceneLinear false #define kOfxColourspaceRec1886Rec709DisplayIsData false +#define kOfxColourspaceRec1886Rec709DisplayIsCore true -// Rec.1886 Rec.2020 - Display +// rec1886_rec2020_display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video) -#define kOfxColourspaceRec1886Rec2020Display "Rec.1886 Rec.2020 - Display" +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec2020_100nits_dim.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_P3D65limited_100nits_dim.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_Rec709limited_100nits_dim.a1.1.0 +#define kOfxColourspaceRec1886Rec2020Display "rec1886_rec2020_display" +#define kOfxColourspaceRec1886Rec2020DisplayDisplayName "Rec.1886 Rec.2020 - Display" #define kOfxColourspaceRec1886Rec2020DisplayAliasRec1886Rec2020Display "rec1886_rec2020_display" #define kOfxColourspaceRec1886Rec2020DisplayList { "Rec.1886 Rec.2020 - Display", "rec1886_rec2020_display" } #define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video" #define kOfxColourspaceRec1886Rec2020DisplayIsSceneLinear false #define kOfxColourspaceRec1886Rec2020DisplayIsData false +#define kOfxColourspaceRec1886Rec2020DisplayIsCore false -// Rec.2100-HLG - Display +// rec2100_hlg_display // Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit -#define kOfxColourspaceRec2100HLGDisplay "Rec.2100-HLG - Display" -#define kOfxColourspaceRec2100HLGDisplayAliasRec2100HlgDisplay "rec2100_hlg_display" -#define kOfxColourspaceRec2100HLGDisplayList { "Rec.2100-HLG - Display", "rec2100_hlg_display" } -#define kOfxColourspaceRec2100HLGDisplayEncoding "hdr-video" -#define kOfxColourspaceRec2100HLGDisplayIsSceneLinear false -#define kOfxColourspaceRec2100HLGDisplayIsData false - -// Rec.2100-PQ - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 +#define kOfxColourspaceRec2100HlgDisplay "rec2100_hlg_display" +#define kOfxColourspaceRec2100HlgDisplayDisplayName "Rec.2100-HLG - Display" +#define kOfxColourspaceRec2100HlgDisplayAliasRec2100HlgDisplay "rec2100_hlg_display" +#define kOfxColourspaceRec2100HlgDisplayList { "Rec.2100-HLG - Display", "rec2100_hlg_display" } +#define kOfxColourspaceRec2100HlgDisplayEncoding "hdr-video" +#define kOfxColourspaceRec2100HlgDisplayIsSceneLinear false +#define kOfxColourspaceRec2100HlgDisplayIsData false +#define kOfxColourspaceRec2100HlgDisplayIsCore false + +// rec2100_pq_display // Convert CIE XYZ (D65 white) to Rec.2100-PQ -#define kOfxColourspaceRec2100PQDisplay "Rec.2100-PQ - Display" -#define kOfxColourspaceRec2100PQDisplayAliasRec2100PqDisplay "rec2100_pq_display" -#define kOfxColourspaceRec2100PQDisplayList { "Rec.2100-PQ - Display", "rec2100_pq_display" } -#define kOfxColourspaceRec2100PQDisplayEncoding "hdr-video" -#define kOfxColourspaceRec2100PQDisplayIsSceneLinear false -#define kOfxColourspaceRec2100PQDisplayIsData false - -// ST2084-P3-D65 - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 +#define kOfxColourspaceRec2100PqDisplay "rec2100_pq_display" +#define kOfxColourspaceRec2100PqDisplayDisplayName "Rec.2100-PQ - Display" +#define kOfxColourspaceRec2100PqDisplayAliasRec2100PqDisplay "rec2100_pq_display" +#define kOfxColourspaceRec2100PqDisplayList { "Rec.2100-PQ - Display", "rec2100_pq_display" } +#define kOfxColourspaceRec2100PqDisplayEncoding "hdr-video" +#define kOfxColourspaceRec2100PqDisplayIsSceneLinear false +#define kOfxColourspaceRec2100PqDisplayIsData false +#define kOfxColourspaceRec2100PqDisplayIsCore false + +// st2084_p3d65_display // Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries -#define kOfxColourspaceST2084P3D65Display "ST2084-P3-D65 - Display" -#define kOfxColourspaceST2084P3D65DisplayAliasSt2084P3d65Display "st2084_p3d65_display" -#define kOfxColourspaceST2084P3D65DisplayList { "ST2084-P3-D65 - Display", "st2084_p3d65_display" } -#define kOfxColourspaceST2084P3D65DisplayEncoding "hdr-video" -#define kOfxColourspaceST2084P3D65DisplayIsSceneLinear false -#define kOfxColourspaceST2084P3D65DisplayIsData false - -// P3-D60 - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 +#define kOfxColourspaceSt2084P3d65Display "st2084_p3d65_display" +#define kOfxColourspaceSt2084P3d65DisplayDisplayName "ST2084-P3-D65 - Display" +#define kOfxColourspaceSt2084P3d65DisplayAliasSt2084P3d65Display "st2084_p3d65_display" +#define kOfxColourspaceSt2084P3d65DisplayList { "ST2084-P3-D65 - Display", "st2084_p3d65_display" } +#define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video" +#define kOfxColourspaceSt2084P3d65DisplayIsSceneLinear false +#define kOfxColourspaceSt2084P3d65DisplayIsData false +#define kOfxColourspaceSt2084P3d65DisplayIsCore false + +// p3d60_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) -#define kOfxColourspaceP3D60Display "P3-D60 - Display" -#define kOfxColourspaceP3D60DisplayAliasP3d60Display "p3d60_display" -#define kOfxColourspaceP3D60DisplayList { "P3-D60 - Display", "p3d60_display" } -#define kOfxColourspaceP3D60DisplayEncoding "sdr-video" -#define kOfxColourspaceP3D60DisplayIsSceneLinear false -#define kOfxColourspaceP3D60DisplayIsData false - -// P3-D65 - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D60_48nits.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D60_48nits.a1.0.3 +#define kOfxColourspaceP3d60Display "p3d60_display" +#define kOfxColourspaceP3d60DisplayDisplayName "P3-D60 - Display" +#define kOfxColourspaceP3d60DisplayAliasP3d60Display "p3d60_display" +#define kOfxColourspaceP3d60DisplayList { "P3-D60 - Display", "p3d60_display" } +#define kOfxColourspaceP3d60DisplayEncoding "sdr-video" +#define kOfxColourspaceP3d60DisplayIsSceneLinear false +#define kOfxColourspaceP3d60DisplayIsData false +#define kOfxColourspaceP3d60DisplayIsCore false + +// p3d65_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 -#define kOfxColourspaceP3D65Display "P3-D65 - Display" -#define kOfxColourspaceP3D65DisplayAliasP3d65Display "p3d65_display" -#define kOfxColourspaceP3D65DisplayList { "P3-D65 - Display", "p3d65_display" } -#define kOfxColourspaceP3D65DisplayEncoding "sdr-video" -#define kOfxColourspaceP3D65DisplayIsSceneLinear false -#define kOfxColourspaceP3D65DisplayIsData false - -// P3-DCI - Display +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 +#define kOfxColourspaceP3d65Display "p3d65_display" +#define kOfxColourspaceP3d65DisplayDisplayName "P3-D65 - Display" +#define kOfxColourspaceP3d65DisplayAliasP3d65Display "p3d65_display" +#define kOfxColourspaceP3d65DisplayList { "P3-D65 - Display", "p3d65_display" } +#define kOfxColourspaceP3d65DisplayEncoding "sdr-video" +#define kOfxColourspaceP3d65DisplayIsSceneLinear false +#define kOfxColourspaceP3d65DisplayIsData false +#define kOfxColourspaceP3d65DisplayIsCore false + +// p3_dci_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) -#define kOfxColourspaceP3DCIDisplay "P3-DCI - Display" -#define kOfxColourspaceP3DCIDisplayAliasP3DciDisplay "p3_dci_display" -#define kOfxColourspaceP3DCIDisplayList { "P3-DCI - Display", "p3_dci_display" } -#define kOfxColourspaceP3DCIDisplayEncoding "sdr-video" -#define kOfxColourspaceP3DCIDisplayIsSceneLinear false -#define kOfxColourspaceP3DCIDisplayIsData false +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_48nits.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_48nits.a1.0.3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_D65sim_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_D65sim_48nits.a1.1.0 +#define kOfxColourspaceP3DciDisplay "p3_dci_display" +#define kOfxColourspaceP3DciDisplayDisplayName "P3-DCI - Display" +#define kOfxColourspaceP3DciDisplayAliasP3DciDisplay "p3_dci_display" +#define kOfxColourspaceP3DciDisplayList { "P3-DCI - Display", "p3_dci_display" } +#define kOfxColourspaceP3DciDisplayEncoding "sdr-video" +#define kOfxColourspaceP3DciDisplayIsSceneLinear false +#define kOfxColourspaceP3DciDisplayIsData false +#define kOfxColourspaceP3DciDisplayIsCore false // Scene Colourspaces // ACES2065-1 // The "Academy Color Encoding System" reference colorspace. #define kOfxColourspaceACES20651 "ACES2065-1" +#define kOfxColourspaceACES20651DisplayName "ACES2065-1" #define kOfxColourspaceACES20651AliasAces20651 "aces2065_1" #define kOfxColourspaceACES20651AliasACESACES20651 "ACES - ACES2065-1" #define kOfxColourspaceACES20651AliasLinAp0 "lin_ap0" @@ -155,308 +248,442 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces #define kOfxColourspaceACES20651Encoding "scene-linear" #define kOfxColourspaceACES20651IsSceneLinear true #define kOfxColourspaceACES20651IsData false +#define kOfxColourspaceACES20651IsCore true // ACEScc // Convert ACEScc to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3 #define kOfxColourspaceACEScc "ACEScc" +#define kOfxColourspaceACESccDisplayName "ACEScc" #define kOfxColourspaceACESccAliasACESACEScc "ACES - ACEScc" #define kOfxColourspaceACESccAliasAcesccAp1 "acescc_ap1" #define kOfxColourspaceACESccList { "ACEScc", "ACES - ACEScc", "acescc_ap1" } #define kOfxColourspaceACESccEncoding "log" #define kOfxColourspaceACESccIsSceneLinear false #define kOfxColourspaceACESccIsData false +#define kOfxColourspaceACESccIsCore true // ACEScct // Convert ACEScct to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3 #define kOfxColourspaceACEScct "ACEScct" +#define kOfxColourspaceACEScctDisplayName "ACEScct" #define kOfxColourspaceACEScctAliasACESACEScct "ACES - ACEScct" #define kOfxColourspaceACEScctAliasAcescctAp1 "acescct_ap1" #define kOfxColourspaceACEScctList { "ACEScct", "ACES - ACEScct", "acescct_ap1" } #define kOfxColourspaceACEScctEncoding "log" #define kOfxColourspaceACEScctIsSceneLinear false #define kOfxColourspaceACEScctIsData false +#define kOfxColourspaceACEScctIsCore true // ACEScg // Convert ACEScg to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3 #define kOfxColourspaceACEScg "ACEScg" +#define kOfxColourspaceACEScgDisplayName "ACEScg" #define kOfxColourspaceACEScgAliasACESACEScg "ACES - ACEScg" #define kOfxColourspaceACEScgAliasLinAp1 "lin_ap1" #define kOfxColourspaceACEScgList { "ACEScg", "ACES - ACEScg", "lin_ap1" } #define kOfxColourspaceACEScgEncoding "scene-linear" #define kOfxColourspaceACEScgIsSceneLinear true #define kOfxColourspaceACEScgIsData false +#define kOfxColourspaceACEScgIsCore true // ADX10 // Convert ADX10 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 #define kOfxColourspaceADX10 "ADX10" +#define kOfxColourspaceADX10DisplayName "ADX10" #define kOfxColourspaceADX10AliasInputADXADX10 "Input - ADX - ADX10" #define kOfxColourspaceADX10List { "ADX10", "Input - ADX - ADX10" } #define kOfxColourspaceADX10Encoding "log" #define kOfxColourspaceADX10IsSceneLinear false #define kOfxColourspaceADX10IsData false +#define kOfxColourspaceADX10IsCore false // ADX16 // Convert ADX16 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3 #define kOfxColourspaceADX16 "ADX16" +#define kOfxColourspaceADX16DisplayName "ADX16" #define kOfxColourspaceADX16AliasInputADXADX16 "Input - ADX - ADX16" #define kOfxColourspaceADX16List { "ADX16", "Input - ADX - ADX16" } #define kOfxColourspaceADX16Encoding "log" #define kOfxColourspaceADX16IsSceneLinear false #define kOfxColourspaceADX16IsData false +#define kOfxColourspaceADX16IsCore false -// Linear ARRI Wide Gamut 3 +// lin_arri_wide_gamut_3 // Convert Linear ARRI Wide Gamut 3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearARRIWideGamut3 "Linear ARRI Wide Gamut 3" -#define kOfxColourspaceLinearARRIWideGamut3AliasLinArriWideGamut3 "lin_arri_wide_gamut_3" -#define kOfxColourspaceLinearARRIWideGamut3AliasInputARRILinearALEXAWideGamut "Input - ARRI - Linear - ALEXA Wide Gamut" -#define kOfxColourspaceLinearARRIWideGamut3AliasLinAlexawide "lin_alexawide" -#define kOfxColourspaceLinearARRIWideGamut3List { "Linear ARRI Wide Gamut 3", "lin_arri_wide_gamut_3", "Input - ARRI - Linear - ALEXA Wide Gamut", "lin_alexawide" } -#define kOfxColourspaceLinearARRIWideGamut3Encoding "scene-linear" -#define kOfxColourspaceLinearARRIWideGamut3IsSceneLinear true -#define kOfxColourspaceLinearARRIWideGamut3IsData false - -// ARRI LogC3 (EI800) +#define kOfxColourspaceLinArriWideGamut3 "lin_arri_wide_gamut_3" +#define kOfxColourspaceLinArriWideGamut3DisplayName "Linear ARRI Wide Gamut 3" +#define kOfxColourspaceLinArriWideGamut3AliasLinArriWideGamut3 "lin_arri_wide_gamut_3" +#define kOfxColourspaceLinArriWideGamut3AliasInputARRILinearALEXAWideGamut "Input - ARRI - Linear - ALEXA Wide Gamut" +#define kOfxColourspaceLinArriWideGamut3AliasLinAlexawide "lin_alexawide" +#define kOfxColourspaceLinArriWideGamut3List { "Linear ARRI Wide Gamut 3", "lin_arri_wide_gamut_3", "Input - ARRI - Linear - ALEXA Wide Gamut", "lin_alexawide" } +#define kOfxColourspaceLinArriWideGamut3Encoding "scene-linear" +#define kOfxColourspaceLinArriWideGamut3IsSceneLinear true +#define kOfxColourspaceLinArriWideGamut3IsData false +#define kOfxColourspaceLinArriWideGamut3IsCore false + +// arri_logc3_ei800 // Convert ARRI LogC3 (EI800) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_EI800_to_ACES2065-1:1.0 -#define kOfxColourspaceARRILogC3EI800 "ARRI LogC3 (EI800)" -#define kOfxColourspaceARRILogC3EI800AliasArriLogc3Ei800 "arri_logc3_ei800" -#define kOfxColourspaceARRILogC3EI800AliasInputARRIV3LogCEI800WideGamut "Input - ARRI - V3 LogC (EI800) - Wide Gamut" -#define kOfxColourspaceARRILogC3EI800AliasLogc3ei800Alexawide "logc3ei800_alexawide" -#define kOfxColourspaceARRILogC3EI800List { "ARRI LogC3 (EI800)", "arri_logc3_ei800", "Input - ARRI - V3 LogC (EI800) - Wide Gamut", "logc3ei800_alexawide" } -#define kOfxColourspaceARRILogC3EI800Encoding "log" -#define kOfxColourspaceARRILogC3EI800IsSceneLinear false -#define kOfxColourspaceARRILogC3EI800IsData false - -// Linear ARRI Wide Gamut 4 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.Alexa-v3-logC-EI800.a1.v2 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC_EI800_AWG.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC_EI800_AWG_to_ACES.a1.1.0 +#define kOfxColourspaceArriLogc3Ei800 "arri_logc3_ei800" +#define kOfxColourspaceArriLogc3Ei800DisplayName "ARRI LogC3 (EI800)" +#define kOfxColourspaceArriLogc3Ei800AliasArriLogc3Ei800 "arri_logc3_ei800" +#define kOfxColourspaceArriLogc3Ei800AliasInputARRIV3LogCEI800WideGamut "Input - ARRI - V3 LogC (EI800) - Wide Gamut" +#define kOfxColourspaceArriLogc3Ei800AliasLogc3ei800Alexawide "logc3ei800_alexawide" +#define kOfxColourspaceArriLogc3Ei800List { "ARRI LogC3 (EI800)", "arri_logc3_ei800", "Input - ARRI - V3 LogC (EI800) - Wide Gamut", "logc3ei800_alexawide" } +#define kOfxColourspaceArriLogc3Ei800Encoding "log" +#define kOfxColourspaceArriLogc3Ei800IsSceneLinear false +#define kOfxColourspaceArriLogc3Ei800IsData false +#define kOfxColourspaceArriLogc3Ei800IsCore false + +// lin_arri_wide_gamut_4 // Convert Linear ARRI Wide Gamut 4 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearARRIWideGamut4 "Linear ARRI Wide Gamut 4" -#define kOfxColourspaceLinearARRIWideGamut4AliasLinArriWideGamut4 "lin_arri_wide_gamut_4" -#define kOfxColourspaceLinearARRIWideGamut4AliasLinAwg4 "lin_awg4" -#define kOfxColourspaceLinearARRIWideGamut4List { "Linear ARRI Wide Gamut 4", "lin_arri_wide_gamut_4", "lin_awg4" } -#define kOfxColourspaceLinearARRIWideGamut4Encoding "scene-linear" -#define kOfxColourspaceLinearARRIWideGamut4IsSceneLinear true -#define kOfxColourspaceLinearARRIWideGamut4IsData false - -// ARRI LogC4 +#define kOfxColourspaceLinArriWideGamut4 "lin_arri_wide_gamut_4" +#define kOfxColourspaceLinArriWideGamut4DisplayName "Linear ARRI Wide Gamut 4" +#define kOfxColourspaceLinArriWideGamut4AliasLinArriWideGamut4 "lin_arri_wide_gamut_4" +#define kOfxColourspaceLinArriWideGamut4AliasLinAwg4 "lin_awg4" +#define kOfxColourspaceLinArriWideGamut4List { "Linear ARRI Wide Gamut 4", "lin_arri_wide_gamut_4", "lin_awg4" } +#define kOfxColourspaceLinArriWideGamut4Encoding "scene-linear" +#define kOfxColourspaceLinArriWideGamut4IsSceneLinear true +#define kOfxColourspaceLinArriWideGamut4IsData false +#define kOfxColourspaceLinArriWideGamut4IsCore false + +// arri_logc4 // Convert ARRI LogC4 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_to_ACES2065-1:1.0 -#define kOfxColourspaceARRILogC4 "ARRI LogC4" -#define kOfxColourspaceARRILogC4AliasArriLogc4 "arri_logc4" -#define kOfxColourspaceARRILogC4List { "ARRI LogC4", "arri_logc4" } -#define kOfxColourspaceARRILogC4Encoding "log" -#define kOfxColourspaceARRILogC4IsSceneLinear false -#define kOfxColourspaceARRILogC4IsData false - -// BMDFilm WideGamut Gen5 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.ARRI-LogC4.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC4_to_ACES.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC4.a1.1.0 +#define kOfxColourspaceArriLogc4 "arri_logc4" +#define kOfxColourspaceArriLogc4DisplayName "ARRI LogC4" +#define kOfxColourspaceArriLogc4AliasArriLogc4 "arri_logc4" +#define kOfxColourspaceArriLogc4List { "ARRI LogC4", "arri_logc4" } +#define kOfxColourspaceArriLogc4Encoding "log" +#define kOfxColourspaceArriLogc4IsSceneLinear false +#define kOfxColourspaceArriLogc4IsData false +#define kOfxColourspaceArriLogc4IsCore false + +// bmdfilm_widegamut_gen5 // Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_WideGamut_Gen5_to_ACES2065-1:1.0 -#define kOfxColourspaceBMDFilmWideGamutGen5 "BMDFilm WideGamut Gen5" -#define kOfxColourspaceBMDFilmWideGamutGen5AliasBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" -#define kOfxColourspaceBMDFilmWideGamutGen5List { "BMDFilm WideGamut Gen5", "bmdfilm_widegamut_gen5" } -#define kOfxColourspaceBMDFilmWideGamutGen5Encoding "log" -#define kOfxColourspaceBMDFilmWideGamutGen5IsSceneLinear false -#define kOfxColourspaceBMDFilmWideGamutGen5IsData false - -// DaVinci Intermediate WideGamut +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.BlackmagicDesign.BMDFilm_WideGamut_Gen5.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_BMDFilm_WideGamut_Gen5.a1.v1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.BMDFilm_WideGamut_Gen5_to_ACES.a1.v1 +#define kOfxColourspaceBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" +#define kOfxColourspaceBmdfilmWidegamutGen5DisplayName "BMDFilm WideGamut Gen5" +#define kOfxColourspaceBmdfilmWidegamutGen5AliasBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" +#define kOfxColourspaceBmdfilmWidegamutGen5List { "BMDFilm WideGamut Gen5", "bmdfilm_widegamut_gen5" } +#define kOfxColourspaceBmdfilmWidegamutGen5Encoding "log" +#define kOfxColourspaceBmdfilmWidegamutGen5IsSceneLinear false +#define kOfxColourspaceBmdfilmWidegamutGen5IsData false +#define kOfxColourspaceBmdfilmWidegamutGen5IsCore false + +// davinci_intermediate_widegamut // Convert DaVinci Intermediate Wide Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0 -#define kOfxColourspaceDaVinciIntermediateWideGamut "DaVinci Intermediate WideGamut" -#define kOfxColourspaceDaVinciIntermediateWideGamutAliasDavinciIntermediateWidegamut "davinci_intermediate_widegamut" -#define kOfxColourspaceDaVinciIntermediateWideGamutList { "DaVinci Intermediate WideGamut", "davinci_intermediate_widegamut" } -#define kOfxColourspaceDaVinciIntermediateWideGamutEncoding "log" -#define kOfxColourspaceDaVinciIntermediateWideGamutIsSceneLinear false -#define kOfxColourspaceDaVinciIntermediateWideGamutIsData false - -// Linear BMD WideGamut Gen5 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.DaVinci_Intermediate_WideGamut_to_ACES.a1.v1 +#define kOfxColourspaceDavinciIntermediateWidegamut "davinci_intermediate_widegamut" +#define kOfxColourspaceDavinciIntermediateWidegamutDisplayName "DaVinci Intermediate WideGamut" +#define kOfxColourspaceDavinciIntermediateWidegamutAliasDavinciIntermediateWidegamut "davinci_intermediate_widegamut" +#define kOfxColourspaceDavinciIntermediateWidegamutList { "DaVinci Intermediate WideGamut", "davinci_intermediate_widegamut" } +#define kOfxColourspaceDavinciIntermediateWidegamutEncoding "log" +#define kOfxColourspaceDavinciIntermediateWidegamutIsSceneLinear false +#define kOfxColourspaceDavinciIntermediateWidegamutIsData false +#define kOfxColourspaceDavinciIntermediateWidegamutIsCore false + +// lin_bmd_widegamut_gen5 // Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearBMDWideGamutGen5 "Linear BMD WideGamut Gen5" -#define kOfxColourspaceLinearBMDWideGamutGen5AliasLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" -#define kOfxColourspaceLinearBMDWideGamutGen5List { "Linear BMD WideGamut Gen5", "lin_bmd_widegamut_gen5" } -#define kOfxColourspaceLinearBMDWideGamutGen5Encoding "scene-linear" -#define kOfxColourspaceLinearBMDWideGamutGen5IsSceneLinear true -#define kOfxColourspaceLinearBMDWideGamutGen5IsData false - -// Linear DaVinci WideGamut +#define kOfxColourspaceLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" +#define kOfxColourspaceLinBmdWidegamutGen5DisplayName "Linear BMD WideGamut Gen5" +#define kOfxColourspaceLinBmdWidegamutGen5AliasLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" +#define kOfxColourspaceLinBmdWidegamutGen5List { "Linear BMD WideGamut Gen5", "lin_bmd_widegamut_gen5" } +#define kOfxColourspaceLinBmdWidegamutGen5Encoding "scene-linear" +#define kOfxColourspaceLinBmdWidegamutGen5IsSceneLinear true +#define kOfxColourspaceLinBmdWidegamutGen5IsData false +#define kOfxColourspaceLinBmdWidegamutGen5IsCore false + +// lin_davinci_widegamut // Convert Linear DaVinci Wide Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearDaVinciWideGamut "Linear DaVinci WideGamut" -#define kOfxColourspaceLinearDaVinciWideGamutAliasLinDavinciWidegamut "lin_davinci_widegamut" -#define kOfxColourspaceLinearDaVinciWideGamutList { "Linear DaVinci WideGamut", "lin_davinci_widegamut" } -#define kOfxColourspaceLinearDaVinciWideGamutEncoding "scene-linear" -#define kOfxColourspaceLinearDaVinciWideGamutIsSceneLinear true -#define kOfxColourspaceLinearDaVinciWideGamutIsData false - -// CanonLog3 CinemaGamut D55 -// Convert Canon Log 3 Cinema Gamut to ACES2065-1 -#define kOfxColourspaceCanonLog3CinemaGamutD55 "CanonLog3 CinemaGamut D55" -#define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" -#define kOfxColourspaceCanonLog3CinemaGamutD55AliasInputCanonCanonLog3CinemaGamutDaylight "Input - Canon - Canon-Log3 - Cinema Gamut Daylight" -#define kOfxColourspaceCanonLog3CinemaGamutD55AliasCanonlog3Cgamutday "canonlog3_cgamutday" -#define kOfxColourspaceCanonLog3CinemaGamutD55List { "CanonLog3 CinemaGamut D55", "canonlog3_cinemagamut_d55", "Input - Canon - Canon-Log3 - Cinema Gamut Daylight", "canonlog3_cgamutday" } -#define kOfxColourspaceCanonLog3CinemaGamutD55Encoding "log" -#define kOfxColourspaceCanonLog3CinemaGamutD55IsSceneLinear false -#define kOfxColourspaceCanonLog3CinemaGamutD55IsData false - -// Linear CinemaGamut D55 +#define kOfxColourspaceLinDavinciWidegamut "lin_davinci_widegamut" +#define kOfxColourspaceLinDavinciWidegamutDisplayName "Linear DaVinci WideGamut" +#define kOfxColourspaceLinDavinciWidegamutAliasLinDavinciWidegamut "lin_davinci_widegamut" +#define kOfxColourspaceLinDavinciWidegamutList { "Linear DaVinci WideGamut", "lin_davinci_widegamut" } +#define kOfxColourspaceLinDavinciWidegamutEncoding "scene-linear" +#define kOfxColourspaceLinDavinciWidegamutIsSceneLinear true +#define kOfxColourspaceLinDavinciWidegamutIsData false +#define kOfxColourspaceLinDavinciWidegamutIsCore false + +// canonlog2_cinemagamut_d55 +// Convert Canon Log 2 Cinema Gamut (Daylight) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog2_CinemaGamut-D55_to_ACES2065-1:1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog2_CGamut_to_ACES.a1.1.0 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog2_CGamut.a1.1.0 +#define kOfxColourspaceCanonlog2CinemagamutD55 "canonlog2_cinemagamut_d55" +#define kOfxColourspaceCanonlog2CinemagamutD55DisplayName "CanonLog2 CinemaGamut D55" +#define kOfxColourspaceCanonlog2CinemagamutD55AliasCanonlog2CinemagamutD55 "canonlog2_cinemagamut_d55" +#define kOfxColourspaceCanonlog2CinemagamutD55AliasInputCanonCanonLog2CinemaGamutDaylight "Input - Canon - Canon-Log2 - Cinema Gamut Daylight" +#define kOfxColourspaceCanonlog2CinemagamutD55AliasCanonlog2Cgamutday "canonlog2_cgamutday" +#define kOfxColourspaceCanonlog2CinemagamutD55List { "CanonLog2 CinemaGamut D55", "canonlog2_cinemagamut_d55", "Input - Canon - Canon-Log2 - Cinema Gamut Daylight", "canonlog2_cgamutday" } +#define kOfxColourspaceCanonlog2CinemagamutD55Encoding "log" +#define kOfxColourspaceCanonlog2CinemagamutD55IsSceneLinear false +#define kOfxColourspaceCanonlog2CinemagamutD55IsData false +#define kOfxColourspaceCanonlog2CinemagamutD55IsCore false + +// canonlog3_cinemagamut_d55 +// Convert Canon Log 3 Cinema Gamut (Daylight) to ACES2065-1 +// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog3_CinemaGamut-D55_to_ACES2065-1:1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog3_CGamut_to_ACES.a1.1.0 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog3_CGamut.a1.1.0 +#define kOfxColourspaceCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" +#define kOfxColourspaceCanonlog3CinemagamutD55DisplayName "CanonLog3 CinemaGamut D55" +#define kOfxColourspaceCanonlog3CinemagamutD55AliasCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" +#define kOfxColourspaceCanonlog3CinemagamutD55AliasInputCanonCanonLog3CinemaGamutDaylight "Input - Canon - Canon-Log3 - Cinema Gamut Daylight" +#define kOfxColourspaceCanonlog3CinemagamutD55AliasCanonlog3Cgamutday "canonlog3_cgamutday" +#define kOfxColourspaceCanonlog3CinemagamutD55List { "CanonLog3 CinemaGamut D55", "canonlog3_cinemagamut_d55", "Input - Canon - Canon-Log3 - Cinema Gamut Daylight", "canonlog3_cgamutday" } +#define kOfxColourspaceCanonlog3CinemagamutD55Encoding "log" +#define kOfxColourspaceCanonlog3CinemagamutD55IsSceneLinear false +#define kOfxColourspaceCanonlog3CinemagamutD55IsData false +#define kOfxColourspaceCanonlog3CinemagamutD55IsCore false + +// lin_cinemagamut_d55 // Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearCinemaGamutD55 "Linear CinemaGamut D55" -#define kOfxColourspaceLinearCinemaGamutD55AliasLinCinemagamutD55 "lin_cinemagamut_d55" -#define kOfxColourspaceLinearCinemaGamutD55AliasInputCanonLinearCanonCinemaGamutDaylight "Input - Canon - Linear - Canon Cinema Gamut Daylight" -#define kOfxColourspaceLinearCinemaGamutD55AliasLinCanoncgamutday "lin_canoncgamutday" -#define kOfxColourspaceLinearCinemaGamutD55List { "Linear CinemaGamut D55", "lin_cinemagamut_d55", "Input - Canon - Linear - Canon Cinema Gamut Daylight", "lin_canoncgamutday" } -#define kOfxColourspaceLinearCinemaGamutD55Encoding "scene-linear" -#define kOfxColourspaceLinearCinemaGamutD55IsSceneLinear true -#define kOfxColourspaceLinearCinemaGamutD55IsData false - -// Linear V-Gamut +#define kOfxColourspaceLinCinemagamutD55 "lin_cinemagamut_d55" +#define kOfxColourspaceLinCinemagamutD55DisplayName "Linear CinemaGamut D55" +#define kOfxColourspaceLinCinemagamutD55AliasLinCinemagamutD55 "lin_cinemagamut_d55" +#define kOfxColourspaceLinCinemagamutD55AliasInputCanonLinearCanonCinemaGamutDaylight "Input - Canon - Linear - Canon Cinema Gamut Daylight" +#define kOfxColourspaceLinCinemagamutD55AliasLinCanoncgamutday "lin_canoncgamutday" +#define kOfxColourspaceLinCinemagamutD55List { "Linear CinemaGamut D55", "lin_cinemagamut_d55", "Input - Canon - Linear - Canon Cinema Gamut Daylight", "lin_canoncgamutday" } +#define kOfxColourspaceLinCinemagamutD55Encoding "scene-linear" +#define kOfxColourspaceLinCinemagamutD55IsSceneLinear true +#define kOfxColourspaceLinCinemagamutD55IsData false +#define kOfxColourspaceLinCinemagamutD55IsCore false + +// lin_vgamut // Convert Linear Panasonic V-Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearVGamut "Linear V-Gamut" -#define kOfxColourspaceLinearVGamutAliasLinVgamut "lin_vgamut" -#define kOfxColourspaceLinearVGamutAliasInputPanasonicLinearVGamut "Input - Panasonic - Linear - V-Gamut" -#define kOfxColourspaceLinearVGamutList { "Linear V-Gamut", "lin_vgamut", "Input - Panasonic - Linear - V-Gamut" } -#define kOfxColourspaceLinearVGamutEncoding "scene-linear" -#define kOfxColourspaceLinearVGamutIsSceneLinear true -#define kOfxColourspaceLinearVGamutIsData false - -// V-Log V-Gamut +#define kOfxColourspaceLinVgamut "lin_vgamut" +#define kOfxColourspaceLinVgamutDisplayName "Linear V-Gamut" +#define kOfxColourspaceLinVgamutAliasLinVgamut "lin_vgamut" +#define kOfxColourspaceLinVgamutAliasInputPanasonicLinearVGamut "Input - Panasonic - Linear - V-Gamut" +#define kOfxColourspaceLinVgamutList { "Linear V-Gamut", "lin_vgamut", "Input - Panasonic - Linear - V-Gamut" } +#define kOfxColourspaceLinVgamutEncoding "scene-linear" +#define kOfxColourspaceLinVgamutIsSceneLinear true +#define kOfxColourspaceLinVgamutIsData false +#define kOfxColourspaceLinVgamutIsCore false + +// vlog_vgamut // Convert Panasonic V-Log - V-Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog_VGamut_to_ACES2065-1:1.0 -#define kOfxColourspaceVLogVGamut "V-Log V-Gamut" -#define kOfxColourspaceVLogVGamutAliasVlogVgamut "vlog_vgamut" -#define kOfxColourspaceVLogVGamutAliasInputPanasonicVLogVGamut "Input - Panasonic - V-Log - V-Gamut" -#define kOfxColourspaceVLogVGamutList { "V-Log V-Gamut", "vlog_vgamut", "Input - Panasonic - V-Log - V-Gamut" } -#define kOfxColourspaceVLogVGamutEncoding "log" -#define kOfxColourspaceVLogVGamutIsSceneLinear false -#define kOfxColourspaceVLogVGamutIsData false - -// Linear REDWideGamutRGB +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.VLog_VGamut_to_ACES.a1.1.0 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_VLog_VGamut.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Panasonic.VLog_VGamut.a1.v1 +#define kOfxColourspaceVlogVgamut "vlog_vgamut" +#define kOfxColourspaceVlogVgamutDisplayName "V-Log V-Gamut" +#define kOfxColourspaceVlogVgamutAliasVlogVgamut "vlog_vgamut" +#define kOfxColourspaceVlogVgamutAliasInputPanasonicVLogVGamut "Input - Panasonic - V-Log - V-Gamut" +#define kOfxColourspaceVlogVgamutList { "V-Log V-Gamut", "vlog_vgamut", "Input - Panasonic - V-Log - V-Gamut" } +#define kOfxColourspaceVlogVgamutEncoding "log" +#define kOfxColourspaceVlogVgamutIsSceneLinear false +#define kOfxColourspaceVlogVgamutIsData false +#define kOfxColourspaceVlogVgamutIsCore false + +// lin_redwidegamutrgb // Convert Linear REDWideGamutRGB to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearREDWideGamutRGB "Linear REDWideGamutRGB" -#define kOfxColourspaceLinearREDWideGamutRGBAliasLinRedwidegamutrgb "lin_redwidegamutrgb" -#define kOfxColourspaceLinearREDWideGamutRGBAliasInputREDLinearREDWideGamutRGB "Input - RED - Linear - REDWideGamutRGB" -#define kOfxColourspaceLinearREDWideGamutRGBAliasLinRwg "lin_rwg" -#define kOfxColourspaceLinearREDWideGamutRGBList { "Linear REDWideGamutRGB", "lin_redwidegamutrgb", "Input - RED - Linear - REDWideGamutRGB", "lin_rwg" } -#define kOfxColourspaceLinearREDWideGamutRGBEncoding "scene-linear" -#define kOfxColourspaceLinearREDWideGamutRGBIsSceneLinear true -#define kOfxColourspaceLinearREDWideGamutRGBIsData false - -// Log3G10 REDWideGamutRGB +#define kOfxColourspaceLinRedwidegamutrgb "lin_redwidegamutrgb" +#define kOfxColourspaceLinRedwidegamutrgbDisplayName "Linear REDWideGamutRGB" +#define kOfxColourspaceLinRedwidegamutrgbAliasLinRedwidegamutrgb "lin_redwidegamutrgb" +#define kOfxColourspaceLinRedwidegamutrgbAliasInputREDLinearREDWideGamutRGB "Input - RED - Linear - REDWideGamutRGB" +#define kOfxColourspaceLinRedwidegamutrgbAliasLinRwg "lin_rwg" +#define kOfxColourspaceLinRedwidegamutrgbList { "Linear REDWideGamutRGB", "lin_redwidegamutrgb", "Input - RED - Linear - REDWideGamutRGB", "lin_rwg" } +#define kOfxColourspaceLinRedwidegamutrgbEncoding "scene-linear" +#define kOfxColourspaceLinRedwidegamutrgbIsSceneLinear true +#define kOfxColourspaceLinRedwidegamutrgbIsData false +#define kOfxColourspaceLinRedwidegamutrgbIsCore false + +// log3g10_redwidegamutrgb // Convert RED Log3G10 REDWideGamutRGB to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10_REDWideGamutRGB_to_ACES2065-1:1.0 -#define kOfxColourspaceLog3G10REDWideGamutRGB "Log3G10 REDWideGamutRGB" -#define kOfxColourspaceLog3G10REDWideGamutRGBAliasLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" -#define kOfxColourspaceLog3G10REDWideGamutRGBAliasInputREDREDLog3G10REDWideGamutRGB "Input - RED - REDLog3G10 - REDWideGamutRGB" -#define kOfxColourspaceLog3G10REDWideGamutRGBAliasRl3g10Rwg "rl3g10_rwg" -#define kOfxColourspaceLog3G10REDWideGamutRGBList { "Log3G10 REDWideGamutRGB", "log3g10_redwidegamutrgb", "Input - RED - REDLog3G10 - REDWideGamutRGB", "rl3g10_rwg" } -#define kOfxColourspaceLog3G10REDWideGamutRGBEncoding "log" -#define kOfxColourspaceLog3G10REDWideGamutRGBIsSceneLinear false -#define kOfxColourspaceLog3G10REDWideGamutRGBIsData false - -// Linear S-Gamut3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.RED.Log3G10_REDWideGamutRGB.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_Log3G10_RWG.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.Log3G10_RWG_to_ACES.a1.1.0 +#define kOfxColourspaceLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" +#define kOfxColourspaceLog3g10RedwidegamutrgbDisplayName "Log3G10 REDWideGamutRGB" +#define kOfxColourspaceLog3g10RedwidegamutrgbAliasLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" +#define kOfxColourspaceLog3g10RedwidegamutrgbAliasInputREDREDLog3G10REDWideGamutRGB "Input - RED - REDLog3G10 - REDWideGamutRGB" +#define kOfxColourspaceLog3g10RedwidegamutrgbAliasRl3g10Rwg "rl3g10_rwg" +#define kOfxColourspaceLog3g10RedwidegamutrgbList { "Log3G10 REDWideGamutRGB", "log3g10_redwidegamutrgb", "Input - RED - REDLog3G10 - REDWideGamutRGB", "rl3g10_rwg" } +#define kOfxColourspaceLog3g10RedwidegamutrgbEncoding "log" +#define kOfxColourspaceLog3g10RedwidegamutrgbIsSceneLinear false +#define kOfxColourspaceLog3g10RedwidegamutrgbIsData false +#define kOfxColourspaceLog3g10RedwidegamutrgbIsCore false + +// lin_sgamut3 // Convert Linear S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearSGamut3 "Linear S-Gamut3" -#define kOfxColourspaceLinearSGamut3AliasLinSgamut3 "lin_sgamut3" -#define kOfxColourspaceLinearSGamut3AliasInputSonyLinearSGamut3 "Input - Sony - Linear - S-Gamut3" -#define kOfxColourspaceLinearSGamut3List { "Linear S-Gamut3", "lin_sgamut3", "Input - Sony - Linear - S-Gamut3" } -#define kOfxColourspaceLinearSGamut3Encoding "scene-linear" -#define kOfxColourspaceLinearSGamut3IsSceneLinear true -#define kOfxColourspaceLinearSGamut3IsData false - -// Linear S-Gamut3.Cine +#define kOfxColourspaceLinSgamut3 "lin_sgamut3" +#define kOfxColourspaceLinSgamut3DisplayName "Linear S-Gamut3" +#define kOfxColourspaceLinSgamut3AliasLinSgamut3 "lin_sgamut3" +#define kOfxColourspaceLinSgamut3AliasInputSonyLinearSGamut3 "Input - Sony - Linear - S-Gamut3" +#define kOfxColourspaceLinSgamut3List { "Linear S-Gamut3", "lin_sgamut3", "Input - Sony - Linear - S-Gamut3" } +#define kOfxColourspaceLinSgamut3Encoding "scene-linear" +#define kOfxColourspaceLinSgamut3IsSceneLinear true +#define kOfxColourspaceLinSgamut3IsData false +#define kOfxColourspaceLinSgamut3IsCore false + +// lin_sgamut3cine // Convert Linear S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearSGamut3Cine "Linear S-Gamut3.Cine" -#define kOfxColourspaceLinearSGamut3CineAliasLinSgamut3cine "lin_sgamut3cine" -#define kOfxColourspaceLinearSGamut3CineAliasInputSonyLinearSGamut3Cine "Input - Sony - Linear - S-Gamut3.Cine" -#define kOfxColourspaceLinearSGamut3CineList { "Linear S-Gamut3.Cine", "lin_sgamut3cine", "Input - Sony - Linear - S-Gamut3.Cine" } -#define kOfxColourspaceLinearSGamut3CineEncoding "scene-linear" -#define kOfxColourspaceLinearSGamut3CineIsSceneLinear true -#define kOfxColourspaceLinearSGamut3CineIsData false - -// Linear Venice S-Gamut3 +#define kOfxColourspaceLinSgamut3cine "lin_sgamut3cine" +#define kOfxColourspaceLinSgamut3cineDisplayName "Linear S-Gamut3.Cine" +#define kOfxColourspaceLinSgamut3cineAliasLinSgamut3cine "lin_sgamut3cine" +#define kOfxColourspaceLinSgamut3cineAliasInputSonyLinearSGamut3Cine "Input - Sony - Linear - S-Gamut3.Cine" +#define kOfxColourspaceLinSgamut3cineList { "Linear S-Gamut3.Cine", "lin_sgamut3cine", "Input - Sony - Linear - S-Gamut3.Cine" } +#define kOfxColourspaceLinSgamut3cineEncoding "scene-linear" +#define kOfxColourspaceLinSgamut3cineIsSceneLinear true +#define kOfxColourspaceLinSgamut3cineIsData false +#define kOfxColourspaceLinSgamut3cineIsCore false + +// lin_venice_sgamut3 // Convert Linear Venice S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearVeniceSGamut3 "Linear Venice S-Gamut3" -#define kOfxColourspaceLinearVeniceSGamut3AliasLinVeniceSgamut3 "lin_venice_sgamut3" -#define kOfxColourspaceLinearVeniceSGamut3AliasInputSonyLinearVeniceSGamut3 "Input - Sony - Linear - Venice S-Gamut3" -#define kOfxColourspaceLinearVeniceSGamut3List { "Linear Venice S-Gamut3", "lin_venice_sgamut3", "Input - Sony - Linear - Venice S-Gamut3" } -#define kOfxColourspaceLinearVeniceSGamut3Encoding "scene-linear" -#define kOfxColourspaceLinearVeniceSGamut3IsSceneLinear true -#define kOfxColourspaceLinearVeniceSGamut3IsData false - -// Linear Venice S-Gamut3.Cine +#define kOfxColourspaceLinVeniceSgamut3 "lin_venice_sgamut3" +#define kOfxColourspaceLinVeniceSgamut3DisplayName "Linear Venice S-Gamut3" +#define kOfxColourspaceLinVeniceSgamut3AliasLinVeniceSgamut3 "lin_venice_sgamut3" +#define kOfxColourspaceLinVeniceSgamut3AliasInputSonyLinearVeniceSGamut3 "Input - Sony - Linear - Venice S-Gamut3" +#define kOfxColourspaceLinVeniceSgamut3List { "Linear Venice S-Gamut3", "lin_venice_sgamut3", "Input - Sony - Linear - Venice S-Gamut3" } +#define kOfxColourspaceLinVeniceSgamut3Encoding "scene-linear" +#define kOfxColourspaceLinVeniceSgamut3IsSceneLinear true +#define kOfxColourspaceLinVeniceSgamut3IsData false +#define kOfxColourspaceLinVeniceSgamut3IsCore false + +// lin_venice_sgamut3cine // Convert Linear Venice S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0 -#define kOfxColourspaceLinearVeniceSGamut3Cine "Linear Venice S-Gamut3.Cine" -#define kOfxColourspaceLinearVeniceSGamut3CineAliasLinVeniceSgamut3cine "lin_venice_sgamut3cine" -#define kOfxColourspaceLinearVeniceSGamut3CineAliasInputSonyLinearVeniceSGamut3Cine "Input - Sony - Linear - Venice S-Gamut3.Cine" -#define kOfxColourspaceLinearVeniceSGamut3CineList { "Linear Venice S-Gamut3.Cine", "lin_venice_sgamut3cine", "Input - Sony - Linear - Venice S-Gamut3.Cine" } -#define kOfxColourspaceLinearVeniceSGamut3CineEncoding "scene-linear" -#define kOfxColourspaceLinearVeniceSGamut3CineIsSceneLinear true -#define kOfxColourspaceLinearVeniceSGamut3CineIsData false - -// S-Log3 S-Gamut3 +#define kOfxColourspaceLinVeniceSgamut3cine "lin_venice_sgamut3cine" +#define kOfxColourspaceLinVeniceSgamut3cineDisplayName "Linear Venice S-Gamut3.Cine" +#define kOfxColourspaceLinVeniceSgamut3cineAliasLinVeniceSgamut3cine "lin_venice_sgamut3cine" +#define kOfxColourspaceLinVeniceSgamut3cineAliasInputSonyLinearVeniceSGamut3Cine "Input - Sony - Linear - Venice S-Gamut3.Cine" +#define kOfxColourspaceLinVeniceSgamut3cineList { "Linear Venice S-Gamut3.Cine", "lin_venice_sgamut3cine", "Input - Sony - Linear - Venice S-Gamut3.Cine" } +#define kOfxColourspaceLinVeniceSgamut3cineEncoding "scene-linear" +#define kOfxColourspaceLinVeniceSgamut3cineIsSceneLinear true +#define kOfxColourspaceLinVeniceSgamut3cineIsData false +#define kOfxColourspaceLinVeniceSgamut3cineIsCore false + +// slog3_sgamut3 // Convert Sony S-Log3 S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3_to_ACES2065-1:1.0 -#define kOfxColourspaceSLog3SGamut3 "S-Log3 S-Gamut3" -#define kOfxColourspaceSLog3SGamut3AliasSlog3Sgamut3 "slog3_sgamut3" -#define kOfxColourspaceSLog3SGamut3AliasInputSonySLog3SGamut3 "Input - Sony - S-Log3 - S-Gamut3" -#define kOfxColourspaceSLog3SGamut3List { "S-Log3 S-Gamut3", "slog3_sgamut3", "Input - Sony - S-Log3 - S-Gamut3" } -#define kOfxColourspaceSLog3SGamut3Encoding "log" -#define kOfxColourspaceSLog3SGamut3IsSceneLinear false -#define kOfxColourspaceSLog3SGamut3IsData false - -// S-Log3 S-Gamut3.Cine +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3_to_ACES.a1.1.0 +#define kOfxColourspaceSlog3Sgamut3 "slog3_sgamut3" +#define kOfxColourspaceSlog3Sgamut3DisplayName "S-Log3 S-Gamut3" +#define kOfxColourspaceSlog3Sgamut3AliasSlog3Sgamut3 "slog3_sgamut3" +#define kOfxColourspaceSlog3Sgamut3AliasInputSonySLog3SGamut3 "Input - Sony - S-Log3 - S-Gamut3" +#define kOfxColourspaceSlog3Sgamut3List { "S-Log3 S-Gamut3", "slog3_sgamut3", "Input - Sony - S-Log3 - S-Gamut3" } +#define kOfxColourspaceSlog3Sgamut3Encoding "log" +#define kOfxColourspaceSlog3Sgamut3IsSceneLinear false +#define kOfxColourspaceSlog3Sgamut3IsData false +#define kOfxColourspaceSlog3Sgamut3IsCore false + +// slog3_sgamut3cine // Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3Cine_to_ACES2065-1:1.0 -#define kOfxColourspaceSLog3SGamut3Cine "S-Log3 S-Gamut3.Cine" -#define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamut3cine "slog3_sgamut3cine" -#define kOfxColourspaceSLog3SGamut3CineAliasInputSonySLog3SGamut3Cine "Input - Sony - S-Log3 - S-Gamut3.Cine" -#define kOfxColourspaceSLog3SGamut3CineAliasSlog3Sgamutcine "slog3_sgamutcine" -#define kOfxColourspaceSLog3SGamut3CineList { "S-Log3 S-Gamut3.Cine", "slog3_sgamut3cine", "Input - Sony - S-Log3 - S-Gamut3.Cine", "slog3_sgamutcine" } -#define kOfxColourspaceSLog3SGamut3CineEncoding "log" -#define kOfxColourspaceSLog3SGamut3CineIsSceneLinear false -#define kOfxColourspaceSLog3SGamut3CineIsData false - -// S-Log3 Venice S-Gamut3 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3Cine.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3Cine.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3Cine_to_ACES.a1.1.0 +#define kOfxColourspaceSlog3Sgamut3cine "slog3_sgamut3cine" +#define kOfxColourspaceSlog3Sgamut3cineDisplayName "S-Log3 S-Gamut3.Cine" +#define kOfxColourspaceSlog3Sgamut3cineAliasSlog3Sgamut3cine "slog3_sgamut3cine" +#define kOfxColourspaceSlog3Sgamut3cineAliasInputSonySLog3SGamut3Cine "Input - Sony - S-Log3 - S-Gamut3.Cine" +#define kOfxColourspaceSlog3Sgamut3cineAliasSlog3Sgamutcine "slog3_sgamutcine" +#define kOfxColourspaceSlog3Sgamut3cineList { "S-Log3 S-Gamut3.Cine", "slog3_sgamut3cine", "Input - Sony - S-Log3 - S-Gamut3.Cine", "slog3_sgamutcine" } +#define kOfxColourspaceSlog3Sgamut3cineEncoding "log" +#define kOfxColourspaceSlog3Sgamut3cineIsSceneLinear false +#define kOfxColourspaceSlog3Sgamut3cineIsData false +#define kOfxColourspaceSlog3Sgamut3cineIsCore false + +// slog3_venice_sgamut3 // Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3_to_ACES2065-1:1.0 -#define kOfxColourspaceSLog3VeniceSGamut3 "S-Log3 Venice S-Gamut3" -#define kOfxColourspaceSLog3VeniceSGamut3AliasSlog3VeniceSgamut3 "slog3_venice_sgamut3" -#define kOfxColourspaceSLog3VeniceSGamut3AliasInputSonySLog3VeniceSGamut3 "Input - Sony - S-Log3 - Venice S-Gamut3" -#define kOfxColourspaceSLog3VeniceSGamut3List { "S-Log3 Venice S-Gamut3", "slog3_venice_sgamut3", "Input - Sony - S-Log3 - Venice S-Gamut3" } -#define kOfxColourspaceSLog3VeniceSGamut3Encoding "log" -#define kOfxColourspaceSLog3VeniceSGamut3IsSceneLinear false -#define kOfxColourspaceSLog3VeniceSGamut3IsData false - -// S-Log3 Venice S-Gamut3.Cine +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3_to_ACES.a1.1.0 +#define kOfxColourspaceSlog3VeniceSgamut3 "slog3_venice_sgamut3" +#define kOfxColourspaceSlog3VeniceSgamut3DisplayName "S-Log3 Venice S-Gamut3" +#define kOfxColourspaceSlog3VeniceSgamut3AliasSlog3VeniceSgamut3 "slog3_venice_sgamut3" +#define kOfxColourspaceSlog3VeniceSgamut3AliasInputSonySLog3VeniceSGamut3 "Input - Sony - S-Log3 - Venice S-Gamut3" +#define kOfxColourspaceSlog3VeniceSgamut3List { "S-Log3 Venice S-Gamut3", "slog3_venice_sgamut3", "Input - Sony - S-Log3 - Venice S-Gamut3" } +#define kOfxColourspaceSlog3VeniceSgamut3Encoding "log" +#define kOfxColourspaceSlog3VeniceSgamut3IsSceneLinear false +#define kOfxColourspaceSlog3VeniceSgamut3IsData false +#define kOfxColourspaceSlog3VeniceSgamut3IsCore false + +// slog3_venice_sgamut3cine // Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3Cine_to_ACES2065-1:1.0 -#define kOfxColourspaceSLog3VeniceSGamut3Cine "S-Log3 Venice S-Gamut3.Cine" -#define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" -#define kOfxColourspaceSLog3VeniceSGamut3CineAliasInputSonySLog3VeniceSGamut3Cine "Input - Sony - S-Log3 - Venice S-Gamut3.Cine" -#define kOfxColourspaceSLog3VeniceSGamut3CineAliasSlog3VeniceSgamutcine "slog3_venice_sgamutcine" -#define kOfxColourspaceSLog3VeniceSGamut3CineList { "S-Log3 Venice S-Gamut3.Cine", "slog3_venice_sgamut3cine", "Input - Sony - S-Log3 - Venice S-Gamut3.Cine", "slog3_venice_sgamutcine" } -#define kOfxColourspaceSLog3VeniceSGamut3CineEncoding "log" -#define kOfxColourspaceSLog3VeniceSGamut3CineIsSceneLinear false -#define kOfxColourspaceSLog3VeniceSGamut3CineIsData false - -// Camera Rec.709 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3Cine.a1.v1 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3Cine.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3Cine_to_ACES.a1.1.0 +#define kOfxColourspaceSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" +#define kOfxColourspaceSlog3VeniceSgamut3cineDisplayName "S-Log3 Venice S-Gamut3.Cine" +#define kOfxColourspaceSlog3VeniceSgamut3cineAliasSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" +#define kOfxColourspaceSlog3VeniceSgamut3cineAliasInputSonySLog3VeniceSGamut3Cine "Input - Sony - S-Log3 - Venice S-Gamut3.Cine" +#define kOfxColourspaceSlog3VeniceSgamut3cineAliasSlog3VeniceSgamutcine "slog3_venice_sgamutcine" +#define kOfxColourspaceSlog3VeniceSgamut3cineList { "S-Log3 Venice S-Gamut3.Cine", "slog3_venice_sgamut3cine", "Input - Sony - S-Log3 - Venice S-Gamut3.Cine", "slog3_venice_sgamutcine" } +#define kOfxColourspaceSlog3VeniceSgamut3cineEncoding "log" +#define kOfxColourspaceSlog3VeniceSgamut3cineIsSceneLinear false +#define kOfxColourspaceSlog3VeniceSgamut3cineIsData false +#define kOfxColourspaceSlog3VeniceSgamut3cineIsCore false + +// camera_rec709 // Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0 -#define kOfxColourspaceCameraRec709 "Camera Rec.709" +#define kOfxColourspaceCameraRec709 "camera_rec709" +#define kOfxColourspaceCameraRec709DisplayName "Camera Rec.709" #define kOfxColourspaceCameraRec709AliasCameraRec709 "camera_rec709" #define kOfxColourspaceCameraRec709AliasUtilityRec709Camera "Utility - Rec.709 - Camera" #define kOfxColourspaceCameraRec709AliasRec709Camera "rec709_camera" @@ -464,123 +691,160 @@ This file was auto-generated by scripts/genColour from studio-config-v1.0.0_aces #define kOfxColourspaceCameraRec709Encoding "sdr-video" #define kOfxColourspaceCameraRec709IsSceneLinear false #define kOfxColourspaceCameraRec709IsData false +#define kOfxColourspaceCameraRec709IsCore false -// Linear P3-D65 +// lin_p3d65 // Convert ACES2065-1 to linear P3 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 -#define kOfxColourspaceLinearP3D65 "Linear P3-D65" -#define kOfxColourspaceLinearP3D65AliasLinP3d65 "lin_p3d65" -#define kOfxColourspaceLinearP3D65AliasUtilityLinearP3D65 "Utility - Linear - P3-D65" -#define kOfxColourspaceLinearP3D65List { "Linear P3-D65", "lin_p3d65", "Utility - Linear - P3-D65" } -#define kOfxColourspaceLinearP3D65Encoding "scene-linear" -#define kOfxColourspaceLinearP3D65IsSceneLinear true -#define kOfxColourspaceLinearP3D65IsData false - -// Linear Rec.2020 +#define kOfxColourspaceLinP3d65 "lin_p3d65" +#define kOfxColourspaceLinP3d65DisplayName "Linear P3-D65" +#define kOfxColourspaceLinP3d65AliasLinP3d65 "lin_p3d65" +#define kOfxColourspaceLinP3d65AliasUtilityLinearP3D65 "Utility - Linear - P3-D65" +#define kOfxColourspaceLinP3d65AliasLinDisplayp3 "lin_displayp3" +#define kOfxColourspaceLinP3d65AliasLinearDisplayP3 "Linear Display P3" +#define kOfxColourspaceLinP3d65List { "Linear P3-D65", "lin_p3d65", "Utility - Linear - P3-D65", "lin_displayp3", "Linear Display P3" } +#define kOfxColourspaceLinP3d65Encoding "scene-linear" +#define kOfxColourspaceLinP3d65IsSceneLinear true +#define kOfxColourspaceLinP3d65IsData false +#define kOfxColourspaceLinP3d65IsCore false + +// lin_rec2020 // Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 -#define kOfxColourspaceLinearRec2020 "Linear Rec.2020" -#define kOfxColourspaceLinearRec2020AliasLinRec2020 "lin_rec2020" -#define kOfxColourspaceLinearRec2020AliasUtilityLinearRec2020 "Utility - Linear - Rec.2020" -#define kOfxColourspaceLinearRec2020List { "Linear Rec.2020", "lin_rec2020", "Utility - Linear - Rec.2020" } -#define kOfxColourspaceLinearRec2020Encoding "scene-linear" -#define kOfxColourspaceLinearRec2020IsSceneLinear true -#define kOfxColourspaceLinearRec2020IsData false - -// Linear Rec.709 (sRGB) +#define kOfxColourspaceLinRec2020 "lin_rec2020" +#define kOfxColourspaceLinRec2020DisplayName "Linear Rec.2020" +#define kOfxColourspaceLinRec2020AliasLinRec2020 "lin_rec2020" +#define kOfxColourspaceLinRec2020AliasUtilityLinearRec2020 "Utility - Linear - Rec.2020" +#define kOfxColourspaceLinRec2020List { "Linear Rec.2020", "lin_rec2020", "Utility - Linear - Rec.2020" } +#define kOfxColourspaceLinRec2020Encoding "scene-linear" +#define kOfxColourspaceLinRec2020IsSceneLinear true +#define kOfxColourspaceLinRec2020IsData false +#define kOfxColourspaceLinRec2020IsCore false + +// lin_rec709_srgb // Convert ACES2065-1 to linear Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 -#define kOfxColourspaceLinearRec709sRGB "Linear Rec.709 (sRGB)" -#define kOfxColourspaceLinearRec709sRGBAliasLinRec709Srgb "lin_rec709_srgb" -#define kOfxColourspaceLinearRec709sRGBAliasUtilityLinearRec709 "Utility - Linear - Rec.709" -#define kOfxColourspaceLinearRec709sRGBAliasLinRec709 "lin_rec709" -#define kOfxColourspaceLinearRec709sRGBAliasLinSrgb "lin_srgb" -#define kOfxColourspaceLinearRec709sRGBAliasUtilityLinearSRGB "Utility - Linear - sRGB" -#define kOfxColourspaceLinearRec709sRGBList { "Linear Rec.709 (sRGB)", "lin_rec709_srgb", "Utility - Linear - Rec.709", "lin_rec709", "lin_srgb", "Utility - Linear - sRGB" } -#define kOfxColourspaceLinearRec709sRGBEncoding "scene-linear" -#define kOfxColourspaceLinearRec709sRGBIsSceneLinear true -#define kOfxColourspaceLinearRec709sRGBIsData false - -// Gamma 1.8 Rec.709 - Texture +#define kOfxColourspaceLinRec709Srgb "lin_rec709_srgb" +#define kOfxColourspaceLinRec709SrgbDisplayName "Linear Rec.709 (sRGB)" +#define kOfxColourspaceLinRec709SrgbAliasLinRec709Srgb "lin_rec709_srgb" +#define kOfxColourspaceLinRec709SrgbAliasUtilityLinearRec709 "Utility - Linear - Rec.709" +#define kOfxColourspaceLinRec709SrgbAliasLinRec709 "lin_rec709" +#define kOfxColourspaceLinRec709SrgbAliasLinSrgb "lin_srgb" +#define kOfxColourspaceLinRec709SrgbAliasUtilityLinearSRGB "Utility - Linear - sRGB" +#define kOfxColourspaceLinRec709SrgbList { "Linear Rec.709 (sRGB)", "lin_rec709_srgb", "Utility - Linear - Rec.709", "lin_rec709", "lin_srgb", "Utility - Linear - sRGB" } +#define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" +#define kOfxColourspaceLinRec709SrgbIsSceneLinear true +#define kOfxColourspaceLinRec709SrgbIsData false +#define kOfxColourspaceLinRec709SrgbIsCore false + +// g18_rec709_tx // Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 -#define kOfxColourspaceGamma18Rec709Texture "Gamma 1.8 Rec.709 - Texture" -#define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709Tx "g18_rec709_tx" -#define kOfxColourspaceGamma18Rec709TextureAliasUtilityGamma18Rec709Texture "Utility - Gamma 1.8 - Rec.709 - Texture" -#define kOfxColourspaceGamma18Rec709TextureAliasG18Rec709 "g18_rec709" -#define kOfxColourspaceGamma18Rec709TextureList { "Gamma 1.8 Rec.709 - Texture", "g18_rec709_tx", "Utility - Gamma 1.8 - Rec.709 - Texture", "g18_rec709" } -#define kOfxColourspaceGamma18Rec709TextureEncoding "sdr-video" -#define kOfxColourspaceGamma18Rec709TextureIsSceneLinear false -#define kOfxColourspaceGamma18Rec709TextureIsData false - -// Gamma 2.2 AP1 - Texture -// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, D60 white point +#define kOfxColourspaceG18Rec709Tx "g18_rec709_tx" +#define kOfxColourspaceG18Rec709TxDisplayName "Gamma 1.8 Rec.709 - Texture" +#define kOfxColourspaceG18Rec709TxAliasG18Rec709Tx "g18_rec709_tx" +#define kOfxColourspaceG18Rec709TxAliasUtilityGamma18Rec709Texture "Utility - Gamma 1.8 - Rec.709 - Texture" +#define kOfxColourspaceG18Rec709TxAliasG18Rec709 "g18_rec709" +#define kOfxColourspaceG18Rec709TxList { "Gamma 1.8 Rec.709 - Texture", "g18_rec709_tx", "Utility - Gamma 1.8 - Rec.709 - Texture", "g18_rec709" } +#define kOfxColourspaceG18Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG18Rec709TxIsSceneLinear false +#define kOfxColourspaceG18Rec709TxIsData false +#define kOfxColourspaceG18Rec709TxIsCore false + +// g22_ap1_tx +// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 -#define kOfxColourspaceGamma22AP1Texture "Gamma 2.2 AP1 - Texture" -#define kOfxColourspaceGamma22AP1TextureAliasG22Ap1Tx "g22_ap1_tx" -#define kOfxColourspaceGamma22AP1TextureAliasG22Ap1 "g22_ap1" -#define kOfxColourspaceGamma22AP1TextureList { "Gamma 2.2 AP1 - Texture", "g22_ap1_tx", "g22_ap1" } -#define kOfxColourspaceGamma22AP1TextureEncoding "sdr-video" -#define kOfxColourspaceGamma22AP1TextureIsSceneLinear false -#define kOfxColourspaceGamma22AP1TextureIsData false - -// Gamma 2.2 Rec.709 - Texture +#define kOfxColourspaceG22Ap1Tx "g22_ap1_tx" +#define kOfxColourspaceG22Ap1TxDisplayName "Gamma 2.2 AP1 - Texture" +#define kOfxColourspaceG22Ap1TxAliasG22Ap1Tx "g22_ap1_tx" +#define kOfxColourspaceG22Ap1TxAliasG22Ap1 "g22_ap1" +#define kOfxColourspaceG22Ap1TxList { "Gamma 2.2 AP1 - Texture", "g22_ap1_tx", "g22_ap1" } +#define kOfxColourspaceG22Ap1TxEncoding "sdr-video" +#define kOfxColourspaceG22Ap1TxIsSceneLinear false +#define kOfxColourspaceG22Ap1TxIsData false +#define kOfxColourspaceG22Ap1TxIsCore false + +// g22_rec709_tx // Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 -#define kOfxColourspaceGamma22Rec709Texture "Gamma 2.2 Rec.709 - Texture" -#define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709Tx "g22_rec709_tx" -#define kOfxColourspaceGamma22Rec709TextureAliasUtilityGamma22Rec709Texture "Utility - Gamma 2.2 - Rec.709 - Texture" -#define kOfxColourspaceGamma22Rec709TextureAliasG22Rec709 "g22_rec709" -#define kOfxColourspaceGamma22Rec709TextureList { "Gamma 2.2 Rec.709 - Texture", "g22_rec709_tx", "Utility - Gamma 2.2 - Rec.709 - Texture", "g22_rec709" } -#define kOfxColourspaceGamma22Rec709TextureEncoding "sdr-video" -#define kOfxColourspaceGamma22Rec709TextureIsSceneLinear false -#define kOfxColourspaceGamma22Rec709TextureIsData false - -// Gamma 2.4 Rec.709 - Texture +#define kOfxColourspaceG22Rec709Tx "g22_rec709_tx" +#define kOfxColourspaceG22Rec709TxDisplayName "Gamma 2.2 Rec.709 - Texture" +#define kOfxColourspaceG22Rec709TxAliasG22Rec709Tx "g22_rec709_tx" +#define kOfxColourspaceG22Rec709TxAliasUtilityGamma22Rec709Texture "Utility - Gamma 2.2 - Rec.709 - Texture" +#define kOfxColourspaceG22Rec709TxAliasG22Rec709 "g22_rec709" +#define kOfxColourspaceG22Rec709TxList { "Gamma 2.2 Rec.709 - Texture", "g22_rec709_tx", "Utility - Gamma 2.2 - Rec.709 - Texture", "g22_rec709" } +#define kOfxColourspaceG22Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG22Rec709TxIsSceneLinear false +#define kOfxColourspaceG22Rec709TxIsData false +#define kOfxColourspaceG22Rec709TxIsCore false + +// g24_rec709_tx // Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 -#define kOfxColourspaceGamma24Rec709Texture "Gamma 2.4 Rec.709 - Texture" -#define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709Tx "g24_rec709_tx" -#define kOfxColourspaceGamma24Rec709TextureAliasG24Rec709 "g24_rec709" -#define kOfxColourspaceGamma24Rec709TextureAliasRec709Display "rec709_display" -#define kOfxColourspaceGamma24Rec709TextureAliasUtilityRec709Display "Utility - Rec.709 - Display" -#define kOfxColourspaceGamma24Rec709TextureList { "Gamma 2.4 Rec.709 - Texture", "g24_rec709_tx", "g24_rec709", "rec709_display", "Utility - Rec.709 - Display" } -#define kOfxColourspaceGamma24Rec709TextureEncoding "sdr-video" -#define kOfxColourspaceGamma24Rec709TextureIsSceneLinear false -#define kOfxColourspaceGamma24Rec709TextureIsData false - -// sRGB Encoded AP1 - Texture -// Convert ACES2065-1 to sRGB Encoded AP1 primaries, D60 white point +#define kOfxColourspaceG24Rec709Tx "g24_rec709_tx" +#define kOfxColourspaceG24Rec709TxDisplayName "Gamma 2.4 Rec.709 - Texture" +#define kOfxColourspaceG24Rec709TxAliasG24Rec709Tx "g24_rec709_tx" +#define kOfxColourspaceG24Rec709TxAliasG24Rec709 "g24_rec709" +#define kOfxColourspaceG24Rec709TxAliasRec709Display "rec709_display" +#define kOfxColourspaceG24Rec709TxAliasUtilityRec709Display "Utility - Rec.709 - Display" +#define kOfxColourspaceG24Rec709TxList { "Gamma 2.4 Rec.709 - Texture", "g24_rec709_tx", "g24_rec709", "rec709_display", "Utility - Rec.709 - Display" } +#define kOfxColourspaceG24Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG24Rec709TxIsSceneLinear false +#define kOfxColourspaceG24Rec709TxIsData false +#define kOfxColourspaceG24Rec709TxIsCore false + +// srgb_encoded_ap1_tx +// Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 -#define kOfxColourspaceSRGBEncodedAP1Texture "sRGB Encoded AP1 - Texture" -#define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" -#define kOfxColourspaceSRGBEncodedAP1TextureAliasSrgbAp1 "srgb_ap1" -#define kOfxColourspaceSRGBEncodedAP1TextureList { "sRGB Encoded AP1 - Texture", "srgb_encoded_ap1_tx", "srgb_ap1" } -#define kOfxColourspaceSRGBEncodedAP1TextureEncoding "sdr-video" -#define kOfxColourspaceSRGBEncodedAP1TextureIsSceneLinear false -#define kOfxColourspaceSRGBEncodedAP1TextureIsData false - -// sRGB - Texture +#define kOfxColourspaceSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" +#define kOfxColourspaceSrgbEncodedAp1TxDisplayName "sRGB Encoded AP1 - Texture" +#define kOfxColourspaceSrgbEncodedAp1TxAliasSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" +#define kOfxColourspaceSrgbEncodedAp1TxAliasSrgbAp1 "srgb_ap1" +#define kOfxColourspaceSrgbEncodedAp1TxList { "sRGB Encoded AP1 - Texture", "srgb_encoded_ap1_tx", "srgb_ap1" } +#define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" +#define kOfxColourspaceSrgbEncodedAp1TxIsSceneLinear false +#define kOfxColourspaceSrgbEncodedAp1TxIsData false +#define kOfxColourspaceSrgbEncodedAp1TxIsCore false + +// srgb_encoded_p3d65_tx +// Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_P3-D65-Texture:1.0 +#define kOfxColourspaceSrgbEncodedP3d65Tx "srgb_encoded_p3d65_tx" +#define kOfxColourspaceSrgbEncodedP3d65TxDisplayName "sRGB Encoded P3-D65 - Texture" +#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbEncodedP3d65Tx "srgb_encoded_p3d65_tx" +#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbP3d65 "srgb_p3d65" +#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbDisplayp3 "srgb_displayp3" +#define kOfxColourspaceSrgbEncodedP3d65TxList { "sRGB Encoded P3-D65 - Texture", "srgb_encoded_p3d65_tx", "srgb_p3d65", "srgb_displayp3" } +#define kOfxColourspaceSrgbEncodedP3d65TxEncoding "sdr-video" +#define kOfxColourspaceSrgbEncodedP3d65TxIsSceneLinear false +#define kOfxColourspaceSrgbEncodedP3d65TxIsData false +#define kOfxColourspaceSrgbEncodedP3d65TxIsCore false + +// srgb_tx // Convert ACES2065-1 to sRGB // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 -#define kOfxColourspaceSRGBTexture "sRGB - Texture" -#define kOfxColourspaceSRGBTextureAliasSrgbTx "srgb_tx" -#define kOfxColourspaceSRGBTextureAliasUtilitySRGBTexture "Utility - sRGB - Texture" -#define kOfxColourspaceSRGBTextureAliasSrgbTexture "srgb_texture" -#define kOfxColourspaceSRGBTextureAliasInputGenericSRGBTexture "Input - Generic - sRGB - Texture" -#define kOfxColourspaceSRGBTextureList { "sRGB - Texture", "srgb_tx", "Utility - sRGB - Texture", "srgb_texture", "Input - Generic - sRGB - Texture" } -#define kOfxColourspaceSRGBTextureEncoding "" -#define kOfxColourspaceSRGBTextureIsSceneLinear false -#define kOfxColourspaceSRGBTextureIsData false +#define kOfxColourspaceSrgbTx "srgb_tx" +#define kOfxColourspaceSrgbTxDisplayName "sRGB - Texture" +#define kOfxColourspaceSrgbTxAliasSrgbTx "srgb_tx" +#define kOfxColourspaceSrgbTxAliasUtilitySRGBTexture "Utility - sRGB - Texture" +#define kOfxColourspaceSrgbTxAliasSrgbTexture "srgb_texture" +#define kOfxColourspaceSrgbTxAliasInputGenericSRGBTexture "Input - Generic - sRGB - Texture" +#define kOfxColourspaceSrgbTxList { "sRGB - Texture", "srgb_tx", "Utility - sRGB - Texture", "srgb_texture", "Input - Generic - sRGB - Texture" } +#define kOfxColourspaceSrgbTxEncoding "" +#define kOfxColourspaceSrgbTxIsSceneLinear false +#define kOfxColourspaceSrgbTxIsData false +#define kOfxColourspaceSrgbTxIsCore false // Raw // The utility "Raw" colorspace. #define kOfxColourspaceRaw "Raw" +#define kOfxColourspaceRawDisplayName "Raw" #define kOfxColourspaceRawAliasUtilityRaw "Utility - Raw" #define kOfxColourspaceRawList { "Raw", "Utility - Raw" } #define kOfxColourspaceRawEncoding "" #define kOfxColourspaceRawIsSceneLinear false #define kOfxColourspaceRawIsData true +#define kOfxColourspaceRawIsCore false #ifdef __cplusplus } diff --git a/scripts/genColour b/scripts/genColour index 2eb19d90..7d12a122 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -4,9 +4,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Extract information from an OCIO config to C header. -# OCIO environment variable must point to the config being extracted. # Example invocation: -# OCIO=ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1 scripts/genColour > include/ofxColourspaceList.h +# scripts/genColour > include/ofxColourspaceList.h import PyOpenColorIO as OCIO from string import Template @@ -41,15 +40,25 @@ def camel_name(name): define_base = '#define kOfxColourspace' +def colourspace_short_name(spc): + name = spc.getName() + aliases = spc.getAliases() + if ' ' in name and len(aliases) > 0: + return aliases[0] + else: + return name + def print_name(name): print(f'{define_base}{camel_name(name)} "{name}"') def print_role(role): - print(f'\n// {role[0]}') - print(f'{define_base}Role{camel_name(role[0])} "{role[0]}"') - print(f'{define_base}Role{camel_name(role[0])}Colourspace "{role[1]}"') - role_map = '{ "' + role[0] + '", "' + role[1] + '" }' - print(f'{define_base}Role{camel_name(role[0])}Mapping {role_map}') + role_name = role[0] + colourspace_name = colourspace_short_name(studio_config.getColorSpace(role[1])) + print(f'\n// {role_name}') + print(f'{define_base}Role{camel_name(role_name)} "{role_name}"') + print(f'{define_base}Role{camel_name(role_name)}Colourspace "{colourspace_name}"') + role_map = '{ "' + role_name + '", "' + colourspace_name + '" }' + print(f'{define_base}Role{camel_name(role_name)}Mapping {role_map}') def print_string_property(name, propname, value): print(f'{define_base}{camel_name(name)}{propname} "{value}"') @@ -61,32 +70,40 @@ def print_list(name, list): name_list = '{ "' + '", "'.join(list) + '" }' print(f'{define_base}{camel_name(name)}List {name_list}') -config = OCIO.GetCurrentConfig() -def print_colourspace(spc): - name = spc.getName() +cg_config = OCIO.Config.CreateFromBuiltinConfig('cg-config-v2.1.0_aces-v1.3_ocio-v2.3') +studio_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3_ocio-v2.3') +def print_colourspace(spc, is_core): + name = colourspace_short_name(spc) + display_name = spc.getName() print(f'\n// {name}\n//', '\n// '.join(spc.getDescription().split('\n')).replace('\n// \n', '\n')) print_name(name) - name_list = [name] + print_string_property(name, 'DisplayName', display_name) + name_list = [display_name] for alias in spc.getAliases(): name_list.append(alias) print_string_property(name, f'Alias{camel_name(alias)}', alias) print_list(name, name_list) print_string_property(name, 'Encoding', spc.getEncoding()) - print_bool_property(name, 'SceneLinear', config.isColorSpaceLinear(name, OCIO.REFERENCE_SPACE_SCENE)) + print_bool_property(name, 'SceneLinear', studio_config.isColorSpaceLinear(name, OCIO.REFERENCE_SPACE_SCENE)) print_bool_property(name, 'Data', spc.isData()) + print_bool_property(name, 'Core', is_core) -print(Template(header).substitute(config_name=config.getName())) +print(Template(header).substitute(config_name=studio_config.getName())) print('// Roles') -for role in config.getRoles(): +for role in studio_config.getRoles(): print_role(role) print('\n// Display Colourspaces') -for display in config.getDisplays(): - print_colourspace(config.getColorSpace(display)) +core_displays = cg_config.getDisplays() +for display in studio_config.getDisplays(): + is_core = display in core_displays + print_colourspace(studio_config.getColorSpace(display), is_core) print('\n// Scene Colourspaces') -for spc in config.getColorSpaces(): - print_colourspace(spc) +core_colourspaces = cg_config.getColorSpaceNames() +for spc in studio_config.getColorSpaces(): + is_core = spc.getName() in core_colourspaces + print_colourspace(spc, is_core) print(footer) From ff9b2250ddc3122a8530b5ae81e3753c7e1d0933 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sun, 14 Apr 2024 08:46:47 -0700 Subject: [PATCH 12/34] Workaround for missing srgb_tx encoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an error in the studio config, workaround it until it’s fixed upstream by manually setting the encoding. See AcademySoftwareFoundation/OpenColorIO-Config-ACES#123. Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 2 +- scripts/genColour | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 815e304d..61c61fbb 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -830,7 +830,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceSrgbTxAliasSrgbTexture "srgb_texture" #define kOfxColourspaceSrgbTxAliasInputGenericSRGBTexture "Input - Generic - sRGB - Texture" #define kOfxColourspaceSrgbTxList { "sRGB - Texture", "srgb_tx", "Utility - sRGB - Texture", "srgb_texture", "Input - Generic - sRGB - Texture" } -#define kOfxColourspaceSrgbTxEncoding "" +#define kOfxColourspaceSrgbTxEncoding "sdr-video" #define kOfxColourspaceSrgbTxIsSceneLinear false #define kOfxColourspaceSrgbTxIsData false #define kOfxColourspaceSrgbTxIsCore false diff --git a/scripts/genColour b/scripts/genColour index 7d12a122..99e41d11 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -72,6 +72,11 @@ def print_list(name, list): cg_config = OCIO.Config.CreateFromBuiltinConfig('cg-config-v2.1.0_aces-v1.3_ocio-v2.3') studio_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3_ocio-v2.3') + +# Workaround for OCIO issue #123, missing encoding on srgb_tx +srgb_tx = studio_config.getColorSpace('srgb_tx') +srgb_tx.setEncoding('sdr-video') + def print_colourspace(spc, is_core): name = colourspace_short_name(spc) display_name = spc.getName() From 122c534d6959e1d3e4f370430d8a8f86e4667182 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Sun, 14 Apr 2024 09:06:33 -0700 Subject: [PATCH 13/34] Fix core colourspace labelling logic The core colourspace list now contains more items, better matching the CG config. Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 22 +++++++++++----------- scripts/genColour | 6 ++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 61c61fbb..72dfed90 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -706,7 +706,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceLinP3d65Encoding "scene-linear" #define kOfxColourspaceLinP3d65IsSceneLinear true #define kOfxColourspaceLinP3d65IsData false -#define kOfxColourspaceLinP3d65IsCore false +#define kOfxColourspaceLinP3d65IsCore true // lin_rec2020 // Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point @@ -719,7 +719,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceLinRec2020Encoding "scene-linear" #define kOfxColourspaceLinRec2020IsSceneLinear true #define kOfxColourspaceLinRec2020IsData false -#define kOfxColourspaceLinRec2020IsCore false +#define kOfxColourspaceLinRec2020IsCore true // lin_rec709_srgb // Convert ACES2065-1 to linear Rec.709 primaries, D65 white point @@ -735,7 +735,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" #define kOfxColourspaceLinRec709SrgbIsSceneLinear true #define kOfxColourspaceLinRec709SrgbIsData false -#define kOfxColourspaceLinRec709SrgbIsCore false +#define kOfxColourspaceLinRec709SrgbIsCore true // g18_rec709_tx // Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point @@ -749,7 +749,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceG18Rec709TxEncoding "sdr-video" #define kOfxColourspaceG18Rec709TxIsSceneLinear false #define kOfxColourspaceG18Rec709TxIsData false -#define kOfxColourspaceG18Rec709TxIsCore false +#define kOfxColourspaceG18Rec709TxIsCore true // g22_ap1_tx // Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point @@ -762,7 +762,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceG22Ap1TxEncoding "sdr-video" #define kOfxColourspaceG22Ap1TxIsSceneLinear false #define kOfxColourspaceG22Ap1TxIsData false -#define kOfxColourspaceG22Ap1TxIsCore false +#define kOfxColourspaceG22Ap1TxIsCore true // g22_rec709_tx // Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point @@ -776,7 +776,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceG22Rec709TxEncoding "sdr-video" #define kOfxColourspaceG22Rec709TxIsSceneLinear false #define kOfxColourspaceG22Rec709TxIsData false -#define kOfxColourspaceG22Rec709TxIsCore false +#define kOfxColourspaceG22Rec709TxIsCore true // g24_rec709_tx // Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point @@ -791,7 +791,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceG24Rec709TxEncoding "sdr-video" #define kOfxColourspaceG24Rec709TxIsSceneLinear false #define kOfxColourspaceG24Rec709TxIsData false -#define kOfxColourspaceG24Rec709TxIsCore false +#define kOfxColourspaceG24Rec709TxIsCore true // srgb_encoded_ap1_tx // Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point @@ -804,7 +804,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" #define kOfxColourspaceSrgbEncodedAp1TxIsSceneLinear false #define kOfxColourspaceSrgbEncodedAp1TxIsData false -#define kOfxColourspaceSrgbEncodedAp1TxIsCore false +#define kOfxColourspaceSrgbEncodedAp1TxIsCore true // srgb_encoded_p3d65_tx // Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point @@ -818,7 +818,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceSrgbEncodedP3d65TxEncoding "sdr-video" #define kOfxColourspaceSrgbEncodedP3d65TxIsSceneLinear false #define kOfxColourspaceSrgbEncodedP3d65TxIsData false -#define kOfxColourspaceSrgbEncodedP3d65TxIsCore false +#define kOfxColourspaceSrgbEncodedP3d65TxIsCore true // srgb_tx // Convert ACES2065-1 to sRGB @@ -833,7 +833,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceSrgbTxEncoding "sdr-video" #define kOfxColourspaceSrgbTxIsSceneLinear false #define kOfxColourspaceSrgbTxIsData false -#define kOfxColourspaceSrgbTxIsCore false +#define kOfxColourspaceSrgbTxIsCore true // Raw // The utility "Raw" colorspace. @@ -844,7 +844,7 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces #define kOfxColourspaceRawEncoding "" #define kOfxColourspaceRawIsSceneLinear false #define kOfxColourspaceRawIsData true -#define kOfxColourspaceRawIsCore false +#define kOfxColourspaceRawIsCore true #ifdef __cplusplus } diff --git a/scripts/genColour b/scripts/genColour index 99e41d11..0a63cc13 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -106,9 +106,11 @@ for display in studio_config.getDisplays(): print_colourspace(studio_config.getColorSpace(display), is_core) print('\n// Scene Colourspaces') -core_colourspaces = cg_config.getColorSpaceNames() for spc in studio_config.getColorSpaces(): - is_core = spc.getName() in core_colourspaces + if None == cg_config.getColorSpace(spc.getName()): + is_core = False + else: + is_core = True print_colourspace(spc, is_core) print(footer) From e0cca3c984f2ee89cccc82653ba336f30950f5f4 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Thu, 9 May 2024 18:11:21 +0100 Subject: [PATCH 14/34] Multiple improvements from code review 1. The OCIO Look property has been removed as this information is part of a View. 2. The Native mode header has been simplified, removing unnecessary aliases and the role mappings. DisplayName has been changed to Label. 3. The definition of core colourspaces has been changed to no longer depend on the OCIO cg config. genColour has a list of core colourspaces, now including HDR colourspaces as requested by @SonyDennisAdams. 4. New roles have been added for sdr_video and hdr_video. These are arbitrarily mapped but the intention is that plug-ins use them to request any sdr/hdr video colourspace. 5. The colourspace header now includes docs for roles, explaining their meaning. 6. The new genOCIOConfig script produces an OpenFX OCIO config, which includes the above changes. Hosts should ship this config so that even with running in Native mode, they can supply it to a plug-in that uses OCIO, via kOfxImageEffectPropOCIOConfig. This config is now used to produce the colourspace header. 7. A config generated by the above script is included as well - I put it in include for now but it could go elsewhere. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 45 +- include/ofxColourspaceList.h | 389 +---- ...dio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio | 1552 +++++++++++++++++ scripts/genColour | 70 +- scripts/genOCIOConfig | 27 + 5 files changed, 1738 insertions(+), 345 deletions(-) create mode 100644 include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio create mode 100755 scripts/genOCIOConfig diff --git a/include/ofxColour.h b/include/ofxColour.h index 54ed2f92..0c1cda61 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -53,6 +53,11 @@ both host and plug-in will be chosen. A host must set this property on any effect instances where it has negotiated OCIO colour management (kOfxImageEffectPropColourManagementOCIO). Use of URIs for built-in configs, such as ocio://default is permitted. + +When native colour management is in use, a host must set this property to point +to the OCIO config used to define strings for the version of OFX it was built +against. This will allow a plug-in which uses OCIO to work directly with native +mode. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" @@ -70,6 +75,9 @@ vectors or similar images which should not be colour managed can use the data colourspace which is present in the built-in OCIO configs. Both host and plug-in should use the value of kOfxImageClipPropPreferredColourspace where reasonable. +If a clip sets OfxImageClipPropIsMask or it only supports +OfxImageComponentAlpha, colour management is disabled and this property +must be unset. */ #define kOfxImageClipPropColourspace "OfxImageClipPropColourspace" @@ -91,12 +99,16 @@ specific camera and expects a log colourspace might list: "arri_logc4", "arri_logc3_ei800", "ACEScct", "color_timing" -The host should provide input images in the first mutually agreeable -colourspace, and set kOfxImageClipPropColourspace to tell the plug-in which -colourspace has been selected. In the event that the host cannot supply images -in a requested colourspace, it may supply images in any valid colourspace. -Plug-ins must check kOfxImageClipPropColourspace to see if their request was -satisfied. +The host is free to choose any colourspace from this list, but should favour +the first mutually agreeable colourspace, and set kOfxImageClipPropColourspace +to tell the plug-in which colourspace has been selected. A host does not need +to convert into the first choice just because it can, as this might be +inefficient, and should scene-to-display or display-to-scene conversions where +possible. + +In the event that the host cannot supply images in a requested colourspace, +it may supply images in any valid colourspace. Plug-ins must check +kOfxImageClipPropColourspace to see if their request was satisfied. Hosts may set this on an output clip, which could be helpful in a generator context, and plug-ins should follow the same logic as hosts when deciding @@ -110,10 +122,10 @@ plug-in is capable of adapting to any input colourspace, it should not set this preference. If a plug-in has inputs which contain motion vectors, depth values or other -non-colour channels, it should set the preferred colourspace to "data". -Similarly, if a host requests outputs in a typical scene colourspace, but the -plug-in is producing motion vectors, it should ignore the request and set -kOfxImageClipPropColourspace to "data". +non-colour channels, it should set the preferred colourspace to +kOfxColourspaceRaw. Similarly, if a host requests outputs in a typical scene +colourspace, but the plug-in is producing motion vectors, it should ignore +the request and set kOfxImageClipPropColourspace to kOfxColourspaceRaw. */ #define kOfxImageClipPropPreferredColourspaces "OfxImageClipPropPreferredColourspaces" @@ -129,7 +141,7 @@ not expect this to be available during a render event. Hosts should set this property to a display colourspace which matches that used in its own viewport. For a multi-display system, choose the colourspace for the display device where a native window would appear by default. -A host which supports OCIO should use the OCIO-specific display, view and look +A host which supports OCIO should use the OCIO-specific display and view properties instead. */ @@ -157,17 +169,6 @@ If not defined, the default rules for choosing a view will be followed. */ #define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView" -/** @brief The OCIO look used in the plug-in's viewport - - - Type - string X 1 - - Property Set - image effect instance (read only) - - Valid Values - OCIO look that is present in the config - -This OCIO-specific property allows the host to specify which OCIO look should be used. -If not defined, no look will be applied. -*/ -#define kOfxImageEffectPropOCIOLook "OfxImageEffectPropOCIOLook" - #ifdef __cplusplus } #endif diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 72dfed90..6f8cccc1 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -10,55 +10,67 @@ extern "C" { /** @file ofxColourspaceList.h Contains the list of supported colourspaces. -This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces-v1.3_ocio-v2.3. +This file was auto-generated by scripts/genColour from openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3. */ -// Roles +/** @brief Roles - generic names for types of colourspace +Use a role when the specific colourspace is not important. +*/ -// aces_interchange +/** @brief aces_interchange +Guaranteed to be ACES2065-1. +*/ #define kOfxColourspaceRoleAcesInterchange "aces_interchange" -#define kOfxColourspaceRoleAcesInterchangeColourspace "ACES2065-1" -#define kOfxColourspaceRoleAcesInterchangeMapping { "aces_interchange", "ACES2065-1" } -// cie_xyz_d65_interchange +/** @brief cie_xyz_d65_interchange +CIE XYZ colorimetry with the neutral axis at D65. +*/ #define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange" -#define kOfxColourspaceRoleCieXyzD65InterchangeColourspace "CIE-XYZ-D65" -#define kOfxColourspaceRoleCieXyzD65InterchangeMapping { "cie_xyz_d65_interchange", "CIE-XYZ-D65" } -// color_picking +/** @brief color_picking +The colourspace to use for colour pickers, typically a display colourspace. +*/ #define kOfxColourspaceRoleColorPicking "color_picking" -#define kOfxColourspaceRoleColorPickingColourspace "srgb_tx" -#define kOfxColourspaceRoleColorPickingMapping { "color_picking", "srgb_tx" } -// color_timing +/** @brief color_timing +A colourspace suitable for colour grading, typically a log colourspace. +*/ #define kOfxColourspaceRoleColorTiming "color_timing" -#define kOfxColourspaceRoleColorTimingColourspace "ACEScct" -#define kOfxColourspaceRoleColorTimingMapping { "color_timing", "ACEScct" } -// compositing_log +/** @brief compositing_log +Any colourspace with a log transfer function. +*/ #define kOfxColourspaceRoleCompositingLog "compositing_log" -#define kOfxColourspaceRoleCompositingLogColourspace "ACEScct" -#define kOfxColourspaceRoleCompositingLogMapping { "compositing_log", "ACEScct" } -// data +/** @brief data +Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace. +*/ #define kOfxColourspaceRoleData "data" -#define kOfxColourspaceRoleDataColourspace "Raw" -#define kOfxColourspaceRoleDataMapping { "data", "Raw" } -// matte_paint +/** @brief hdr_video +Any display-referred HDR video such as Rec. 2020 HLG or PQ. +*/ +#define kOfxColourspaceRoleHdrVideo "hdr_video" + +/** @brief matte_paint +A colourspace suitable for matte painting. +*/ #define kOfxColourspaceRoleMattePaint "matte_paint" -#define kOfxColourspaceRoleMattePaintColourspace "ACEScct" -#define kOfxColourspaceRoleMattePaintMapping { "matte_paint", "ACEScct" } -// scene_linear +/** @brief scene_linear +Any scene-referred linear colourspace. +*/ #define kOfxColourspaceRoleSceneLinear "scene_linear" -#define kOfxColourspaceRoleSceneLinearColourspace "ACEScg" -#define kOfxColourspaceRoleSceneLinearMapping { "scene_linear", "ACEScg" } -// texture_paint +/** @brief sdr_video +Any display-referred SDR video such as Rec. 709. +*/ +#define kOfxColourspaceRoleSdrVideo "sdr_video" + +/** @brief texture_paint +A colourspace suitable for texture painting, typically sRGB. +*/ #define kOfxColourspaceRoleTexturePaint "texture_paint" -#define kOfxColourspaceRoleTexturePaintColourspace "srgb_tx" -#define kOfxColourspaceRoleTexturePaintMapping { "texture_paint", "srgb_tx" } // Display Colourspaces @@ -71,11 +83,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 #define kOfxColourspaceSrgbDisplay "srgb_display" -#define kOfxColourspaceSrgbDisplayDisplayName "sRGB - Display" -#define kOfxColourspaceSrgbDisplayAliasSrgbDisplay "srgb_display" -#define kOfxColourspaceSrgbDisplayList { "sRGB - Display", "srgb_display" } +#define kOfxColourspaceSrgbDisplayLabel "sRGB - Display" #define kOfxColourspaceSrgbDisplayEncoding "sdr-video" -#define kOfxColourspaceSrgbDisplayIsSceneLinear false #define kOfxColourspaceSrgbDisplayIsData false #define kOfxColourspaceSrgbDisplayIsCore true @@ -88,11 +97,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_D60sim_dim.a1.0.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_D60sim_dim.a1.0.0 #define kOfxColourspaceDisplayp3Display "displayp3_display" -#define kOfxColourspaceDisplayp3DisplayDisplayName "Display P3 - Display" -#define kOfxColourspaceDisplayp3DisplayAliasDisplayp3Display "displayp3_display" -#define kOfxColourspaceDisplayp3DisplayList { "Display P3 - Display", "displayp3_display" } +#define kOfxColourspaceDisplayp3DisplayLabel "Display P3 - Display" #define kOfxColourspaceDisplayp3DisplayEncoding "sdr-video" -#define kOfxColourspaceDisplayp3DisplayIsSceneLinear false #define kOfxColourspaceDisplayp3DisplayIsData false #define kOfxColourspaceDisplayp3DisplayIsCore true @@ -105,11 +111,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 #define kOfxColourspaceRec1886Rec709Display "rec1886_rec709_display" -#define kOfxColourspaceRec1886Rec709DisplayDisplayName "Rec.1886 Rec.709 - Display" -#define kOfxColourspaceRec1886Rec709DisplayAliasRec1886Rec709Display "rec1886_rec709_display" -#define kOfxColourspaceRec1886Rec709DisplayList { "Rec.1886 Rec.709 - Display", "rec1886_rec709_display" } +#define kOfxColourspaceRec1886Rec709DisplayLabel "Rec.1886 Rec.709 - Display" #define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video" -#define kOfxColourspaceRec1886Rec709DisplayIsSceneLinear false #define kOfxColourspaceRec1886Rec709DisplayIsData false #define kOfxColourspaceRec1886Rec709DisplayIsCore true @@ -122,13 +125,10 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_P3D65limited_100nits_dim.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_Rec709limited_100nits_dim.a1.1.0 #define kOfxColourspaceRec1886Rec2020Display "rec1886_rec2020_display" -#define kOfxColourspaceRec1886Rec2020DisplayDisplayName "Rec.1886 Rec.2020 - Display" -#define kOfxColourspaceRec1886Rec2020DisplayAliasRec1886Rec2020Display "rec1886_rec2020_display" -#define kOfxColourspaceRec1886Rec2020DisplayList { "Rec.1886 Rec.2020 - Display", "rec1886_rec2020_display" } +#define kOfxColourspaceRec1886Rec2020DisplayLabel "Rec.1886 Rec.2020 - Display" #define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video" -#define kOfxColourspaceRec1886Rec2020DisplayIsSceneLinear false #define kOfxColourspaceRec1886Rec2020DisplayIsData false -#define kOfxColourspaceRec1886Rec2020DisplayIsCore false +#define kOfxColourspaceRec1886Rec2020DisplayIsCore true // rec2100_hlg_display // Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit @@ -137,13 +137,10 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 #define kOfxColourspaceRec2100HlgDisplay "rec2100_hlg_display" -#define kOfxColourspaceRec2100HlgDisplayDisplayName "Rec.2100-HLG - Display" -#define kOfxColourspaceRec2100HlgDisplayAliasRec2100HlgDisplay "rec2100_hlg_display" -#define kOfxColourspaceRec2100HlgDisplayList { "Rec.2100-HLG - Display", "rec2100_hlg_display" } +#define kOfxColourspaceRec2100HlgDisplayLabel "Rec.2100-HLG - Display" #define kOfxColourspaceRec2100HlgDisplayEncoding "hdr-video" -#define kOfxColourspaceRec2100HlgDisplayIsSceneLinear false #define kOfxColourspaceRec2100HlgDisplayIsData false -#define kOfxColourspaceRec2100HlgDisplayIsCore false +#define kOfxColourspaceRec2100HlgDisplayIsCore true // rec2100_pq_display // Convert CIE XYZ (D65 white) to Rec.2100-PQ @@ -156,13 +153,10 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 #define kOfxColourspaceRec2100PqDisplay "rec2100_pq_display" -#define kOfxColourspaceRec2100PqDisplayDisplayName "Rec.2100-PQ - Display" -#define kOfxColourspaceRec2100PqDisplayAliasRec2100PqDisplay "rec2100_pq_display" -#define kOfxColourspaceRec2100PqDisplayList { "Rec.2100-PQ - Display", "rec2100_pq_display" } +#define kOfxColourspaceRec2100PqDisplayLabel "Rec.2100-PQ - Display" #define kOfxColourspaceRec2100PqDisplayEncoding "hdr-video" -#define kOfxColourspaceRec2100PqDisplayIsSceneLinear false #define kOfxColourspaceRec2100PqDisplayIsData false -#define kOfxColourspaceRec2100PqDisplayIsCore false +#define kOfxColourspaceRec2100PqDisplayIsCore true // st2084_p3d65_display // Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries @@ -177,11 +171,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 #define kOfxColourspaceSt2084P3d65Display "st2084_p3d65_display" -#define kOfxColourspaceSt2084P3d65DisplayDisplayName "ST2084-P3-D65 - Display" -#define kOfxColourspaceSt2084P3d65DisplayAliasSt2084P3d65Display "st2084_p3d65_display" -#define kOfxColourspaceSt2084P3d65DisplayList { "ST2084-P3-D65 - Display", "st2084_p3d65_display" } +#define kOfxColourspaceSt2084P3d65DisplayLabel "ST2084-P3-D65 - Display" #define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video" -#define kOfxColourspaceSt2084P3d65DisplayIsSceneLinear false #define kOfxColourspaceSt2084P3d65DisplayIsData false #define kOfxColourspaceSt2084P3d65DisplayIsCore false @@ -192,11 +183,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D60_48nits.a1.0.3 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D60_48nits.a1.0.3 #define kOfxColourspaceP3d60Display "p3d60_display" -#define kOfxColourspaceP3d60DisplayDisplayName "P3-D60 - Display" -#define kOfxColourspaceP3d60DisplayAliasP3d60Display "p3d60_display" -#define kOfxColourspaceP3d60DisplayList { "P3-D60 - Display", "p3d60_display" } +#define kOfxColourspaceP3d60DisplayLabel "P3-D60 - Display" #define kOfxColourspaceP3d60DisplayEncoding "sdr-video" -#define kOfxColourspaceP3d60DisplayIsSceneLinear false #define kOfxColourspaceP3d60DisplayIsData false #define kOfxColourspaceP3d60DisplayIsCore false @@ -210,11 +198,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 #define kOfxColourspaceP3d65Display "p3d65_display" -#define kOfxColourspaceP3d65DisplayDisplayName "P3-D65 - Display" -#define kOfxColourspaceP3d65DisplayAliasP3d65Display "p3d65_display" -#define kOfxColourspaceP3d65DisplayList { "P3-D65 - Display", "p3d65_display" } +#define kOfxColourspaceP3d65DisplayLabel "P3-D65 - Display" #define kOfxColourspaceP3d65DisplayEncoding "sdr-video" -#define kOfxColourspaceP3d65DisplayIsSceneLinear false #define kOfxColourspaceP3d65DisplayIsData false #define kOfxColourspaceP3d65DisplayIsCore false @@ -227,11 +212,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_D65sim_48nits.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_D65sim_48nits.a1.1.0 #define kOfxColourspaceP3DciDisplay "p3_dci_display" -#define kOfxColourspaceP3DciDisplayDisplayName "P3-DCI - Display" -#define kOfxColourspaceP3DciDisplayAliasP3DciDisplay "p3_dci_display" -#define kOfxColourspaceP3DciDisplayList { "P3-DCI - Display", "p3_dci_display" } +#define kOfxColourspaceP3DciDisplayLabel "P3-DCI - Display" #define kOfxColourspaceP3DciDisplayEncoding "sdr-video" -#define kOfxColourspaceP3DciDisplayIsSceneLinear false #define kOfxColourspaceP3DciDisplayIsData false #define kOfxColourspaceP3DciDisplayIsCore false @@ -240,13 +222,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACES2065-1 // The "Academy Color Encoding System" reference colorspace. #define kOfxColourspaceACES20651 "ACES2065-1" -#define kOfxColourspaceACES20651DisplayName "ACES2065-1" -#define kOfxColourspaceACES20651AliasAces20651 "aces2065_1" -#define kOfxColourspaceACES20651AliasACESACES20651 "ACES - ACES2065-1" -#define kOfxColourspaceACES20651AliasLinAp0 "lin_ap0" -#define kOfxColourspaceACES20651List { "ACES2065-1", "aces2065_1", "ACES - ACES2065-1", "lin_ap0" } +#define kOfxColourspaceACES20651Label "ACES2065-1" #define kOfxColourspaceACES20651Encoding "scene-linear" -#define kOfxColourspaceACES20651IsSceneLinear true #define kOfxColourspaceACES20651IsData false #define kOfxColourspaceACES20651IsCore true @@ -257,12 +234,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // -------------- // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3 #define kOfxColourspaceACEScc "ACEScc" -#define kOfxColourspaceACESccDisplayName "ACEScc" -#define kOfxColourspaceACESccAliasACESACEScc "ACES - ACEScc" -#define kOfxColourspaceACESccAliasAcesccAp1 "acescc_ap1" -#define kOfxColourspaceACESccList { "ACEScc", "ACES - ACEScc", "acescc_ap1" } +#define kOfxColourspaceACESccLabel "ACEScc" #define kOfxColourspaceACESccEncoding "log" -#define kOfxColourspaceACESccIsSceneLinear false #define kOfxColourspaceACESccIsData false #define kOfxColourspaceACESccIsCore true @@ -273,12 +246,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // -------------- // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3 #define kOfxColourspaceACEScct "ACEScct" -#define kOfxColourspaceACEScctDisplayName "ACEScct" -#define kOfxColourspaceACEScctAliasACESACEScct "ACES - ACEScct" -#define kOfxColourspaceACEScctAliasAcescctAp1 "acescct_ap1" -#define kOfxColourspaceACEScctList { "ACEScct", "ACES - ACEScct", "acescct_ap1" } +#define kOfxColourspaceACEScctLabel "ACEScct" #define kOfxColourspaceACEScctEncoding "log" -#define kOfxColourspaceACEScctIsSceneLinear false #define kOfxColourspaceACEScctIsData false #define kOfxColourspaceACEScctIsCore true @@ -289,12 +258,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // -------------- // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3 #define kOfxColourspaceACEScg "ACEScg" -#define kOfxColourspaceACEScgDisplayName "ACEScg" -#define kOfxColourspaceACEScgAliasACESACEScg "ACES - ACEScg" -#define kOfxColourspaceACEScgAliasLinAp1 "lin_ap1" -#define kOfxColourspaceACEScgList { "ACEScg", "ACES - ACEScg", "lin_ap1" } +#define kOfxColourspaceACEScgLabel "ACEScg" #define kOfxColourspaceACEScgEncoding "scene-linear" -#define kOfxColourspaceACEScgIsSceneLinear true #define kOfxColourspaceACEScgIsData false #define kOfxColourspaceACEScgIsCore true @@ -302,11 +267,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ADX10 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 #define kOfxColourspaceADX10 "ADX10" -#define kOfxColourspaceADX10DisplayName "ADX10" -#define kOfxColourspaceADX10AliasInputADXADX10 "Input - ADX - ADX10" -#define kOfxColourspaceADX10List { "ADX10", "Input - ADX - ADX10" } +#define kOfxColourspaceADX10Label "ADX10" #define kOfxColourspaceADX10Encoding "log" -#define kOfxColourspaceADX10IsSceneLinear false #define kOfxColourspaceADX10IsData false #define kOfxColourspaceADX10IsCore false @@ -314,11 +276,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ADX16 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3 #define kOfxColourspaceADX16 "ADX16" -#define kOfxColourspaceADX16DisplayName "ADX16" -#define kOfxColourspaceADX16AliasInputADXADX16 "Input - ADX - ADX16" -#define kOfxColourspaceADX16List { "ADX16", "Input - ADX - ADX16" } +#define kOfxColourspaceADX16Label "ADX16" #define kOfxColourspaceADX16Encoding "log" -#define kOfxColourspaceADX16IsSceneLinear false #define kOfxColourspaceADX16IsData false #define kOfxColourspaceADX16IsCore false @@ -326,13 +285,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear ARRI Wide Gamut 3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0 #define kOfxColourspaceLinArriWideGamut3 "lin_arri_wide_gamut_3" -#define kOfxColourspaceLinArriWideGamut3DisplayName "Linear ARRI Wide Gamut 3" -#define kOfxColourspaceLinArriWideGamut3AliasLinArriWideGamut3 "lin_arri_wide_gamut_3" -#define kOfxColourspaceLinArriWideGamut3AliasInputARRILinearALEXAWideGamut "Input - ARRI - Linear - ALEXA Wide Gamut" -#define kOfxColourspaceLinArriWideGamut3AliasLinAlexawide "lin_alexawide" -#define kOfxColourspaceLinArriWideGamut3List { "Linear ARRI Wide Gamut 3", "lin_arri_wide_gamut_3", "Input - ARRI - Linear - ALEXA Wide Gamut", "lin_alexawide" } +#define kOfxColourspaceLinArriWideGamut3Label "Linear ARRI Wide Gamut 3" #define kOfxColourspaceLinArriWideGamut3Encoding "scene-linear" -#define kOfxColourspaceLinArriWideGamut3IsSceneLinear true #define kOfxColourspaceLinArriWideGamut3IsData false #define kOfxColourspaceLinArriWideGamut3IsCore false @@ -345,13 +299,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC_EI800_AWG.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC_EI800_AWG_to_ACES.a1.1.0 #define kOfxColourspaceArriLogc3Ei800 "arri_logc3_ei800" -#define kOfxColourspaceArriLogc3Ei800DisplayName "ARRI LogC3 (EI800)" -#define kOfxColourspaceArriLogc3Ei800AliasArriLogc3Ei800 "arri_logc3_ei800" -#define kOfxColourspaceArriLogc3Ei800AliasInputARRIV3LogCEI800WideGamut "Input - ARRI - V3 LogC (EI800) - Wide Gamut" -#define kOfxColourspaceArriLogc3Ei800AliasLogc3ei800Alexawide "logc3ei800_alexawide" -#define kOfxColourspaceArriLogc3Ei800List { "ARRI LogC3 (EI800)", "arri_logc3_ei800", "Input - ARRI - V3 LogC (EI800) - Wide Gamut", "logc3ei800_alexawide" } +#define kOfxColourspaceArriLogc3Ei800Label "ARRI LogC3 (EI800)" #define kOfxColourspaceArriLogc3Ei800Encoding "log" -#define kOfxColourspaceArriLogc3Ei800IsSceneLinear false #define kOfxColourspaceArriLogc3Ei800IsData false #define kOfxColourspaceArriLogc3Ei800IsCore false @@ -359,12 +308,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear ARRI Wide Gamut 4 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0 #define kOfxColourspaceLinArriWideGamut4 "lin_arri_wide_gamut_4" -#define kOfxColourspaceLinArriWideGamut4DisplayName "Linear ARRI Wide Gamut 4" -#define kOfxColourspaceLinArriWideGamut4AliasLinArriWideGamut4 "lin_arri_wide_gamut_4" -#define kOfxColourspaceLinArriWideGamut4AliasLinAwg4 "lin_awg4" -#define kOfxColourspaceLinArriWideGamut4List { "Linear ARRI Wide Gamut 4", "lin_arri_wide_gamut_4", "lin_awg4" } +#define kOfxColourspaceLinArriWideGamut4Label "Linear ARRI Wide Gamut 4" #define kOfxColourspaceLinArriWideGamut4Encoding "scene-linear" -#define kOfxColourspaceLinArriWideGamut4IsSceneLinear true #define kOfxColourspaceLinArriWideGamut4IsData false #define kOfxColourspaceLinArriWideGamut4IsCore false @@ -377,11 +322,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC4_to_ACES.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC4.a1.1.0 #define kOfxColourspaceArriLogc4 "arri_logc4" -#define kOfxColourspaceArriLogc4DisplayName "ARRI LogC4" -#define kOfxColourspaceArriLogc4AliasArriLogc4 "arri_logc4" -#define kOfxColourspaceArriLogc4List { "ARRI LogC4", "arri_logc4" } +#define kOfxColourspaceArriLogc4Label "ARRI LogC4" #define kOfxColourspaceArriLogc4Encoding "log" -#define kOfxColourspaceArriLogc4IsSceneLinear false #define kOfxColourspaceArriLogc4IsData false #define kOfxColourspaceArriLogc4IsCore false @@ -394,11 +336,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_BMDFilm_WideGamut_Gen5.a1.v1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.BMDFilm_WideGamut_Gen5_to_ACES.a1.v1 #define kOfxColourspaceBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" -#define kOfxColourspaceBmdfilmWidegamutGen5DisplayName "BMDFilm WideGamut Gen5" -#define kOfxColourspaceBmdfilmWidegamutGen5AliasBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5" -#define kOfxColourspaceBmdfilmWidegamutGen5List { "BMDFilm WideGamut Gen5", "bmdfilm_widegamut_gen5" } +#define kOfxColourspaceBmdfilmWidegamutGen5Label "BMDFilm WideGamut Gen5" #define kOfxColourspaceBmdfilmWidegamutGen5Encoding "log" -#define kOfxColourspaceBmdfilmWidegamutGen5IsSceneLinear false #define kOfxColourspaceBmdfilmWidegamutGen5IsData false #define kOfxColourspaceBmdfilmWidegamutGen5IsCore false @@ -407,11 +346,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.DaVinci_Intermediate_WideGamut_to_ACES.a1.v1 #define kOfxColourspaceDavinciIntermediateWidegamut "davinci_intermediate_widegamut" -#define kOfxColourspaceDavinciIntermediateWidegamutDisplayName "DaVinci Intermediate WideGamut" -#define kOfxColourspaceDavinciIntermediateWidegamutAliasDavinciIntermediateWidegamut "davinci_intermediate_widegamut" -#define kOfxColourspaceDavinciIntermediateWidegamutList { "DaVinci Intermediate WideGamut", "davinci_intermediate_widegamut" } +#define kOfxColourspaceDavinciIntermediateWidegamutLabel "DaVinci Intermediate WideGamut" #define kOfxColourspaceDavinciIntermediateWidegamutEncoding "log" -#define kOfxColourspaceDavinciIntermediateWidegamutIsSceneLinear false #define kOfxColourspaceDavinciIntermediateWidegamutIsData false #define kOfxColourspaceDavinciIntermediateWidegamutIsCore false @@ -419,11 +355,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0 #define kOfxColourspaceLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" -#define kOfxColourspaceLinBmdWidegamutGen5DisplayName "Linear BMD WideGamut Gen5" -#define kOfxColourspaceLinBmdWidegamutGen5AliasLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5" -#define kOfxColourspaceLinBmdWidegamutGen5List { "Linear BMD WideGamut Gen5", "lin_bmd_widegamut_gen5" } +#define kOfxColourspaceLinBmdWidegamutGen5Label "Linear BMD WideGamut Gen5" #define kOfxColourspaceLinBmdWidegamutGen5Encoding "scene-linear" -#define kOfxColourspaceLinBmdWidegamutGen5IsSceneLinear true #define kOfxColourspaceLinBmdWidegamutGen5IsData false #define kOfxColourspaceLinBmdWidegamutGen5IsCore false @@ -431,11 +364,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear DaVinci Wide Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0 #define kOfxColourspaceLinDavinciWidegamut "lin_davinci_widegamut" -#define kOfxColourspaceLinDavinciWidegamutDisplayName "Linear DaVinci WideGamut" -#define kOfxColourspaceLinDavinciWidegamutAliasLinDavinciWidegamut "lin_davinci_widegamut" -#define kOfxColourspaceLinDavinciWidegamutList { "Linear DaVinci WideGamut", "lin_davinci_widegamut" } +#define kOfxColourspaceLinDavinciWidegamutLabel "Linear DaVinci WideGamut" #define kOfxColourspaceLinDavinciWidegamutEncoding "scene-linear" -#define kOfxColourspaceLinDavinciWidegamutIsSceneLinear true #define kOfxColourspaceLinDavinciWidegamutIsData false #define kOfxColourspaceLinDavinciWidegamutIsCore false @@ -447,13 +377,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // -------------- // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog2_CGamut.a1.1.0 #define kOfxColourspaceCanonlog2CinemagamutD55 "canonlog2_cinemagamut_d55" -#define kOfxColourspaceCanonlog2CinemagamutD55DisplayName "CanonLog2 CinemaGamut D55" -#define kOfxColourspaceCanonlog2CinemagamutD55AliasCanonlog2CinemagamutD55 "canonlog2_cinemagamut_d55" -#define kOfxColourspaceCanonlog2CinemagamutD55AliasInputCanonCanonLog2CinemaGamutDaylight "Input - Canon - Canon-Log2 - Cinema Gamut Daylight" -#define kOfxColourspaceCanonlog2CinemagamutD55AliasCanonlog2Cgamutday "canonlog2_cgamutday" -#define kOfxColourspaceCanonlog2CinemagamutD55List { "CanonLog2 CinemaGamut D55", "canonlog2_cinemagamut_d55", "Input - Canon - Canon-Log2 - Cinema Gamut Daylight", "canonlog2_cgamutday" } +#define kOfxColourspaceCanonlog2CinemagamutD55Label "CanonLog2 CinemaGamut D55" #define kOfxColourspaceCanonlog2CinemagamutD55Encoding "log" -#define kOfxColourspaceCanonlog2CinemagamutD55IsSceneLinear false #define kOfxColourspaceCanonlog2CinemagamutD55IsData false #define kOfxColourspaceCanonlog2CinemagamutD55IsCore false @@ -465,13 +390,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // -------------- // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog3_CGamut.a1.1.0 #define kOfxColourspaceCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" -#define kOfxColourspaceCanonlog3CinemagamutD55DisplayName "CanonLog3 CinemaGamut D55" -#define kOfxColourspaceCanonlog3CinemagamutD55AliasCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55" -#define kOfxColourspaceCanonlog3CinemagamutD55AliasInputCanonCanonLog3CinemaGamutDaylight "Input - Canon - Canon-Log3 - Cinema Gamut Daylight" -#define kOfxColourspaceCanonlog3CinemagamutD55AliasCanonlog3Cgamutday "canonlog3_cgamutday" -#define kOfxColourspaceCanonlog3CinemagamutD55List { "CanonLog3 CinemaGamut D55", "canonlog3_cinemagamut_d55", "Input - Canon - Canon-Log3 - Cinema Gamut Daylight", "canonlog3_cgamutday" } +#define kOfxColourspaceCanonlog3CinemagamutD55Label "CanonLog3 CinemaGamut D55" #define kOfxColourspaceCanonlog3CinemagamutD55Encoding "log" -#define kOfxColourspaceCanonlog3CinemagamutD55IsSceneLinear false #define kOfxColourspaceCanonlog3CinemagamutD55IsData false #define kOfxColourspaceCanonlog3CinemagamutD55IsCore false @@ -479,13 +399,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0 #define kOfxColourspaceLinCinemagamutD55 "lin_cinemagamut_d55" -#define kOfxColourspaceLinCinemagamutD55DisplayName "Linear CinemaGamut D55" -#define kOfxColourspaceLinCinemagamutD55AliasLinCinemagamutD55 "lin_cinemagamut_d55" -#define kOfxColourspaceLinCinemagamutD55AliasInputCanonLinearCanonCinemaGamutDaylight "Input - Canon - Linear - Canon Cinema Gamut Daylight" -#define kOfxColourspaceLinCinemagamutD55AliasLinCanoncgamutday "lin_canoncgamutday" -#define kOfxColourspaceLinCinemagamutD55List { "Linear CinemaGamut D55", "lin_cinemagamut_d55", "Input - Canon - Linear - Canon Cinema Gamut Daylight", "lin_canoncgamutday" } +#define kOfxColourspaceLinCinemagamutD55Label "Linear CinemaGamut D55" #define kOfxColourspaceLinCinemagamutD55Encoding "scene-linear" -#define kOfxColourspaceLinCinemagamutD55IsSceneLinear true #define kOfxColourspaceLinCinemagamutD55IsData false #define kOfxColourspaceLinCinemagamutD55IsCore false @@ -493,12 +408,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear Panasonic V-Gamut to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0 #define kOfxColourspaceLinVgamut "lin_vgamut" -#define kOfxColourspaceLinVgamutDisplayName "Linear V-Gamut" -#define kOfxColourspaceLinVgamutAliasLinVgamut "lin_vgamut" -#define kOfxColourspaceLinVgamutAliasInputPanasonicLinearVGamut "Input - Panasonic - Linear - V-Gamut" -#define kOfxColourspaceLinVgamutList { "Linear V-Gamut", "lin_vgamut", "Input - Panasonic - Linear - V-Gamut" } +#define kOfxColourspaceLinVgamutLabel "Linear V-Gamut" #define kOfxColourspaceLinVgamutEncoding "scene-linear" -#define kOfxColourspaceLinVgamutIsSceneLinear true #define kOfxColourspaceLinVgamutIsData false #define kOfxColourspaceLinVgamutIsCore false @@ -511,12 +422,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_VLog_VGamut.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Panasonic.VLog_VGamut.a1.v1 #define kOfxColourspaceVlogVgamut "vlog_vgamut" -#define kOfxColourspaceVlogVgamutDisplayName "V-Log V-Gamut" -#define kOfxColourspaceVlogVgamutAliasVlogVgamut "vlog_vgamut" -#define kOfxColourspaceVlogVgamutAliasInputPanasonicVLogVGamut "Input - Panasonic - V-Log - V-Gamut" -#define kOfxColourspaceVlogVgamutList { "V-Log V-Gamut", "vlog_vgamut", "Input - Panasonic - V-Log - V-Gamut" } +#define kOfxColourspaceVlogVgamutLabel "V-Log V-Gamut" #define kOfxColourspaceVlogVgamutEncoding "log" -#define kOfxColourspaceVlogVgamutIsSceneLinear false #define kOfxColourspaceVlogVgamutIsData false #define kOfxColourspaceVlogVgamutIsCore false @@ -524,13 +431,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear REDWideGamutRGB to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0 #define kOfxColourspaceLinRedwidegamutrgb "lin_redwidegamutrgb" -#define kOfxColourspaceLinRedwidegamutrgbDisplayName "Linear REDWideGamutRGB" -#define kOfxColourspaceLinRedwidegamutrgbAliasLinRedwidegamutrgb "lin_redwidegamutrgb" -#define kOfxColourspaceLinRedwidegamutrgbAliasInputREDLinearREDWideGamutRGB "Input - RED - Linear - REDWideGamutRGB" -#define kOfxColourspaceLinRedwidegamutrgbAliasLinRwg "lin_rwg" -#define kOfxColourspaceLinRedwidegamutrgbList { "Linear REDWideGamutRGB", "lin_redwidegamutrgb", "Input - RED - Linear - REDWideGamutRGB", "lin_rwg" } +#define kOfxColourspaceLinRedwidegamutrgbLabel "Linear REDWideGamutRGB" #define kOfxColourspaceLinRedwidegamutrgbEncoding "scene-linear" -#define kOfxColourspaceLinRedwidegamutrgbIsSceneLinear true #define kOfxColourspaceLinRedwidegamutrgbIsData false #define kOfxColourspaceLinRedwidegamutrgbIsCore false @@ -543,13 +445,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_Log3G10_RWG.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.Log3G10_RWG_to_ACES.a1.1.0 #define kOfxColourspaceLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" -#define kOfxColourspaceLog3g10RedwidegamutrgbDisplayName "Log3G10 REDWideGamutRGB" -#define kOfxColourspaceLog3g10RedwidegamutrgbAliasLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb" -#define kOfxColourspaceLog3g10RedwidegamutrgbAliasInputREDREDLog3G10REDWideGamutRGB "Input - RED - REDLog3G10 - REDWideGamutRGB" -#define kOfxColourspaceLog3g10RedwidegamutrgbAliasRl3g10Rwg "rl3g10_rwg" -#define kOfxColourspaceLog3g10RedwidegamutrgbList { "Log3G10 REDWideGamutRGB", "log3g10_redwidegamutrgb", "Input - RED - REDLog3G10 - REDWideGamutRGB", "rl3g10_rwg" } +#define kOfxColourspaceLog3g10RedwidegamutrgbLabel "Log3G10 REDWideGamutRGB" #define kOfxColourspaceLog3g10RedwidegamutrgbEncoding "log" -#define kOfxColourspaceLog3g10RedwidegamutrgbIsSceneLinear false #define kOfxColourspaceLog3g10RedwidegamutrgbIsData false #define kOfxColourspaceLog3g10RedwidegamutrgbIsCore false @@ -557,12 +454,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0 #define kOfxColourspaceLinSgamut3 "lin_sgamut3" -#define kOfxColourspaceLinSgamut3DisplayName "Linear S-Gamut3" -#define kOfxColourspaceLinSgamut3AliasLinSgamut3 "lin_sgamut3" -#define kOfxColourspaceLinSgamut3AliasInputSonyLinearSGamut3 "Input - Sony - Linear - S-Gamut3" -#define kOfxColourspaceLinSgamut3List { "Linear S-Gamut3", "lin_sgamut3", "Input - Sony - Linear - S-Gamut3" } +#define kOfxColourspaceLinSgamut3Label "Linear S-Gamut3" #define kOfxColourspaceLinSgamut3Encoding "scene-linear" -#define kOfxColourspaceLinSgamut3IsSceneLinear true #define kOfxColourspaceLinSgamut3IsData false #define kOfxColourspaceLinSgamut3IsCore false @@ -570,12 +463,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0 #define kOfxColourspaceLinSgamut3cine "lin_sgamut3cine" -#define kOfxColourspaceLinSgamut3cineDisplayName "Linear S-Gamut3.Cine" -#define kOfxColourspaceLinSgamut3cineAliasLinSgamut3cine "lin_sgamut3cine" -#define kOfxColourspaceLinSgamut3cineAliasInputSonyLinearSGamut3Cine "Input - Sony - Linear - S-Gamut3.Cine" -#define kOfxColourspaceLinSgamut3cineList { "Linear S-Gamut3.Cine", "lin_sgamut3cine", "Input - Sony - Linear - S-Gamut3.Cine" } +#define kOfxColourspaceLinSgamut3cineLabel "Linear S-Gamut3.Cine" #define kOfxColourspaceLinSgamut3cineEncoding "scene-linear" -#define kOfxColourspaceLinSgamut3cineIsSceneLinear true #define kOfxColourspaceLinSgamut3cineIsData false #define kOfxColourspaceLinSgamut3cineIsCore false @@ -583,12 +472,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear Venice S-Gamut3 to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0 #define kOfxColourspaceLinVeniceSgamut3 "lin_venice_sgamut3" -#define kOfxColourspaceLinVeniceSgamut3DisplayName "Linear Venice S-Gamut3" -#define kOfxColourspaceLinVeniceSgamut3AliasLinVeniceSgamut3 "lin_venice_sgamut3" -#define kOfxColourspaceLinVeniceSgamut3AliasInputSonyLinearVeniceSGamut3 "Input - Sony - Linear - Venice S-Gamut3" -#define kOfxColourspaceLinVeniceSgamut3List { "Linear Venice S-Gamut3", "lin_venice_sgamut3", "Input - Sony - Linear - Venice S-Gamut3" } +#define kOfxColourspaceLinVeniceSgamut3Label "Linear Venice S-Gamut3" #define kOfxColourspaceLinVeniceSgamut3Encoding "scene-linear" -#define kOfxColourspaceLinVeniceSgamut3IsSceneLinear true #define kOfxColourspaceLinVeniceSgamut3IsData false #define kOfxColourspaceLinVeniceSgamut3IsCore false @@ -596,12 +481,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert Linear Venice S-Gamut3.Cine to ACES2065-1 // CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0 #define kOfxColourspaceLinVeniceSgamut3cine "lin_venice_sgamut3cine" -#define kOfxColourspaceLinVeniceSgamut3cineDisplayName "Linear Venice S-Gamut3.Cine" -#define kOfxColourspaceLinVeniceSgamut3cineAliasLinVeniceSgamut3cine "lin_venice_sgamut3cine" -#define kOfxColourspaceLinVeniceSgamut3cineAliasInputSonyLinearVeniceSGamut3Cine "Input - Sony - Linear - Venice S-Gamut3.Cine" -#define kOfxColourspaceLinVeniceSgamut3cineList { "Linear Venice S-Gamut3.Cine", "lin_venice_sgamut3cine", "Input - Sony - Linear - Venice S-Gamut3.Cine" } +#define kOfxColourspaceLinVeniceSgamut3cineLabel "Linear Venice S-Gamut3.Cine" #define kOfxColourspaceLinVeniceSgamut3cineEncoding "scene-linear" -#define kOfxColourspaceLinVeniceSgamut3cineIsSceneLinear true #define kOfxColourspaceLinVeniceSgamut3cineIsData false #define kOfxColourspaceLinVeniceSgamut3cineIsCore false @@ -614,12 +495,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3_to_ACES.a1.1.0 #define kOfxColourspaceSlog3Sgamut3 "slog3_sgamut3" -#define kOfxColourspaceSlog3Sgamut3DisplayName "S-Log3 S-Gamut3" -#define kOfxColourspaceSlog3Sgamut3AliasSlog3Sgamut3 "slog3_sgamut3" -#define kOfxColourspaceSlog3Sgamut3AliasInputSonySLog3SGamut3 "Input - Sony - S-Log3 - S-Gamut3" -#define kOfxColourspaceSlog3Sgamut3List { "S-Log3 S-Gamut3", "slog3_sgamut3", "Input - Sony - S-Log3 - S-Gamut3" } +#define kOfxColourspaceSlog3Sgamut3Label "S-Log3 S-Gamut3" #define kOfxColourspaceSlog3Sgamut3Encoding "log" -#define kOfxColourspaceSlog3Sgamut3IsSceneLinear false #define kOfxColourspaceSlog3Sgamut3IsData false #define kOfxColourspaceSlog3Sgamut3IsCore false @@ -632,13 +509,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3Cine.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3Cine_to_ACES.a1.1.0 #define kOfxColourspaceSlog3Sgamut3cine "slog3_sgamut3cine" -#define kOfxColourspaceSlog3Sgamut3cineDisplayName "S-Log3 S-Gamut3.Cine" -#define kOfxColourspaceSlog3Sgamut3cineAliasSlog3Sgamut3cine "slog3_sgamut3cine" -#define kOfxColourspaceSlog3Sgamut3cineAliasInputSonySLog3SGamut3Cine "Input - Sony - S-Log3 - S-Gamut3.Cine" -#define kOfxColourspaceSlog3Sgamut3cineAliasSlog3Sgamutcine "slog3_sgamutcine" -#define kOfxColourspaceSlog3Sgamut3cineList { "S-Log3 S-Gamut3.Cine", "slog3_sgamut3cine", "Input - Sony - S-Log3 - S-Gamut3.Cine", "slog3_sgamutcine" } +#define kOfxColourspaceSlog3Sgamut3cineLabel "S-Log3 S-Gamut3.Cine" #define kOfxColourspaceSlog3Sgamut3cineEncoding "log" -#define kOfxColourspaceSlog3Sgamut3cineIsSceneLinear false #define kOfxColourspaceSlog3Sgamut3cineIsData false #define kOfxColourspaceSlog3Sgamut3cineIsCore false @@ -651,12 +523,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3_to_ACES.a1.1.0 #define kOfxColourspaceSlog3VeniceSgamut3 "slog3_venice_sgamut3" -#define kOfxColourspaceSlog3VeniceSgamut3DisplayName "S-Log3 Venice S-Gamut3" -#define kOfxColourspaceSlog3VeniceSgamut3AliasSlog3VeniceSgamut3 "slog3_venice_sgamut3" -#define kOfxColourspaceSlog3VeniceSgamut3AliasInputSonySLog3VeniceSGamut3 "Input - Sony - S-Log3 - Venice S-Gamut3" -#define kOfxColourspaceSlog3VeniceSgamut3List { "S-Log3 Venice S-Gamut3", "slog3_venice_sgamut3", "Input - Sony - S-Log3 - Venice S-Gamut3" } +#define kOfxColourspaceSlog3VeniceSgamut3Label "S-Log3 Venice S-Gamut3" #define kOfxColourspaceSlog3VeniceSgamut3Encoding "log" -#define kOfxColourspaceSlog3VeniceSgamut3IsSceneLinear false #define kOfxColourspaceSlog3VeniceSgamut3IsData false #define kOfxColourspaceSlog3VeniceSgamut3IsCore false @@ -669,13 +537,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3Cine.a1.1.0 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3Cine_to_ACES.a1.1.0 #define kOfxColourspaceSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" -#define kOfxColourspaceSlog3VeniceSgamut3cineDisplayName "S-Log3 Venice S-Gamut3.Cine" -#define kOfxColourspaceSlog3VeniceSgamut3cineAliasSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine" -#define kOfxColourspaceSlog3VeniceSgamut3cineAliasInputSonySLog3VeniceSGamut3Cine "Input - Sony - S-Log3 - Venice S-Gamut3.Cine" -#define kOfxColourspaceSlog3VeniceSgamut3cineAliasSlog3VeniceSgamutcine "slog3_venice_sgamutcine" -#define kOfxColourspaceSlog3VeniceSgamut3cineList { "S-Log3 Venice S-Gamut3.Cine", "slog3_venice_sgamut3cine", "Input - Sony - S-Log3 - Venice S-Gamut3.Cine", "slog3_venice_sgamutcine" } +#define kOfxColourspaceSlog3VeniceSgamut3cineLabel "S-Log3 Venice S-Gamut3.Cine" #define kOfxColourspaceSlog3VeniceSgamut3cineEncoding "log" -#define kOfxColourspaceSlog3VeniceSgamut3cineIsSceneLinear false #define kOfxColourspaceSlog3VeniceSgamut3cineIsData false #define kOfxColourspaceSlog3VeniceSgamut3cineIsCore false @@ -683,13 +546,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0 #define kOfxColourspaceCameraRec709 "camera_rec709" -#define kOfxColourspaceCameraRec709DisplayName "Camera Rec.709" -#define kOfxColourspaceCameraRec709AliasCameraRec709 "camera_rec709" -#define kOfxColourspaceCameraRec709AliasUtilityRec709Camera "Utility - Rec.709 - Camera" -#define kOfxColourspaceCameraRec709AliasRec709Camera "rec709_camera" -#define kOfxColourspaceCameraRec709List { "Camera Rec.709", "camera_rec709", "Utility - Rec.709 - Camera", "rec709_camera" } +#define kOfxColourspaceCameraRec709Label "Camera Rec.709" #define kOfxColourspaceCameraRec709Encoding "sdr-video" -#define kOfxColourspaceCameraRec709IsSceneLinear false #define kOfxColourspaceCameraRec709IsData false #define kOfxColourspaceCameraRec709IsCore false @@ -697,14 +555,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to linear P3 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 #define kOfxColourspaceLinP3d65 "lin_p3d65" -#define kOfxColourspaceLinP3d65DisplayName "Linear P3-D65" -#define kOfxColourspaceLinP3d65AliasLinP3d65 "lin_p3d65" -#define kOfxColourspaceLinP3d65AliasUtilityLinearP3D65 "Utility - Linear - P3-D65" -#define kOfxColourspaceLinP3d65AliasLinDisplayp3 "lin_displayp3" -#define kOfxColourspaceLinP3d65AliasLinearDisplayP3 "Linear Display P3" -#define kOfxColourspaceLinP3d65List { "Linear P3-D65", "lin_p3d65", "Utility - Linear - P3-D65", "lin_displayp3", "Linear Display P3" } +#define kOfxColourspaceLinP3d65Label "Linear P3-D65" #define kOfxColourspaceLinP3d65Encoding "scene-linear" -#define kOfxColourspaceLinP3d65IsSceneLinear true #define kOfxColourspaceLinP3d65IsData false #define kOfxColourspaceLinP3d65IsCore true @@ -712,12 +564,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 #define kOfxColourspaceLinRec2020 "lin_rec2020" -#define kOfxColourspaceLinRec2020DisplayName "Linear Rec.2020" -#define kOfxColourspaceLinRec2020AliasLinRec2020 "lin_rec2020" -#define kOfxColourspaceLinRec2020AliasUtilityLinearRec2020 "Utility - Linear - Rec.2020" -#define kOfxColourspaceLinRec2020List { "Linear Rec.2020", "lin_rec2020", "Utility - Linear - Rec.2020" } +#define kOfxColourspaceLinRec2020Label "Linear Rec.2020" #define kOfxColourspaceLinRec2020Encoding "scene-linear" -#define kOfxColourspaceLinRec2020IsSceneLinear true #define kOfxColourspaceLinRec2020IsData false #define kOfxColourspaceLinRec2020IsCore true @@ -725,15 +573,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to linear Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 #define kOfxColourspaceLinRec709Srgb "lin_rec709_srgb" -#define kOfxColourspaceLinRec709SrgbDisplayName "Linear Rec.709 (sRGB)" -#define kOfxColourspaceLinRec709SrgbAliasLinRec709Srgb "lin_rec709_srgb" -#define kOfxColourspaceLinRec709SrgbAliasUtilityLinearRec709 "Utility - Linear - Rec.709" -#define kOfxColourspaceLinRec709SrgbAliasLinRec709 "lin_rec709" -#define kOfxColourspaceLinRec709SrgbAliasLinSrgb "lin_srgb" -#define kOfxColourspaceLinRec709SrgbAliasUtilityLinearSRGB "Utility - Linear - sRGB" -#define kOfxColourspaceLinRec709SrgbList { "Linear Rec.709 (sRGB)", "lin_rec709_srgb", "Utility - Linear - Rec.709", "lin_rec709", "lin_srgb", "Utility - Linear - sRGB" } +#define kOfxColourspaceLinRec709SrgbLabel "Linear Rec.709 (sRGB)" #define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" -#define kOfxColourspaceLinRec709SrgbIsSceneLinear true #define kOfxColourspaceLinRec709SrgbIsData false #define kOfxColourspaceLinRec709SrgbIsCore true @@ -741,13 +582,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 #define kOfxColourspaceG18Rec709Tx "g18_rec709_tx" -#define kOfxColourspaceG18Rec709TxDisplayName "Gamma 1.8 Rec.709 - Texture" -#define kOfxColourspaceG18Rec709TxAliasG18Rec709Tx "g18_rec709_tx" -#define kOfxColourspaceG18Rec709TxAliasUtilityGamma18Rec709Texture "Utility - Gamma 1.8 - Rec.709 - Texture" -#define kOfxColourspaceG18Rec709TxAliasG18Rec709 "g18_rec709" -#define kOfxColourspaceG18Rec709TxList { "Gamma 1.8 Rec.709 - Texture", "g18_rec709_tx", "Utility - Gamma 1.8 - Rec.709 - Texture", "g18_rec709" } +#define kOfxColourspaceG18Rec709TxLabel "Gamma 1.8 Rec.709 - Texture" #define kOfxColourspaceG18Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG18Rec709TxIsSceneLinear false #define kOfxColourspaceG18Rec709TxIsData false #define kOfxColourspaceG18Rec709TxIsCore true @@ -755,12 +591,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 #define kOfxColourspaceG22Ap1Tx "g22_ap1_tx" -#define kOfxColourspaceG22Ap1TxDisplayName "Gamma 2.2 AP1 - Texture" -#define kOfxColourspaceG22Ap1TxAliasG22Ap1Tx "g22_ap1_tx" -#define kOfxColourspaceG22Ap1TxAliasG22Ap1 "g22_ap1" -#define kOfxColourspaceG22Ap1TxList { "Gamma 2.2 AP1 - Texture", "g22_ap1_tx", "g22_ap1" } +#define kOfxColourspaceG22Ap1TxLabel "Gamma 2.2 AP1 - Texture" #define kOfxColourspaceG22Ap1TxEncoding "sdr-video" -#define kOfxColourspaceG22Ap1TxIsSceneLinear false #define kOfxColourspaceG22Ap1TxIsData false #define kOfxColourspaceG22Ap1TxIsCore true @@ -768,13 +600,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 #define kOfxColourspaceG22Rec709Tx "g22_rec709_tx" -#define kOfxColourspaceG22Rec709TxDisplayName "Gamma 2.2 Rec.709 - Texture" -#define kOfxColourspaceG22Rec709TxAliasG22Rec709Tx "g22_rec709_tx" -#define kOfxColourspaceG22Rec709TxAliasUtilityGamma22Rec709Texture "Utility - Gamma 2.2 - Rec.709 - Texture" -#define kOfxColourspaceG22Rec709TxAliasG22Rec709 "g22_rec709" -#define kOfxColourspaceG22Rec709TxList { "Gamma 2.2 Rec.709 - Texture", "g22_rec709_tx", "Utility - Gamma 2.2 - Rec.709 - Texture", "g22_rec709" } +#define kOfxColourspaceG22Rec709TxLabel "Gamma 2.2 Rec.709 - Texture" #define kOfxColourspaceG22Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG22Rec709TxIsSceneLinear false #define kOfxColourspaceG22Rec709TxIsData false #define kOfxColourspaceG22Rec709TxIsCore true @@ -782,14 +609,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 #define kOfxColourspaceG24Rec709Tx "g24_rec709_tx" -#define kOfxColourspaceG24Rec709TxDisplayName "Gamma 2.4 Rec.709 - Texture" -#define kOfxColourspaceG24Rec709TxAliasG24Rec709Tx "g24_rec709_tx" -#define kOfxColourspaceG24Rec709TxAliasG24Rec709 "g24_rec709" -#define kOfxColourspaceG24Rec709TxAliasRec709Display "rec709_display" -#define kOfxColourspaceG24Rec709TxAliasUtilityRec709Display "Utility - Rec.709 - Display" -#define kOfxColourspaceG24Rec709TxList { "Gamma 2.4 Rec.709 - Texture", "g24_rec709_tx", "g24_rec709", "rec709_display", "Utility - Rec.709 - Display" } +#define kOfxColourspaceG24Rec709TxLabel "Gamma 2.4 Rec.709 - Texture" #define kOfxColourspaceG24Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG24Rec709TxIsSceneLinear false #define kOfxColourspaceG24Rec709TxIsData false #define kOfxColourspaceG24Rec709TxIsCore true @@ -797,12 +618,8 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 #define kOfxColourspaceSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" -#define kOfxColourspaceSrgbEncodedAp1TxDisplayName "sRGB Encoded AP1 - Texture" -#define kOfxColourspaceSrgbEncodedAp1TxAliasSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" -#define kOfxColourspaceSrgbEncodedAp1TxAliasSrgbAp1 "srgb_ap1" -#define kOfxColourspaceSrgbEncodedAp1TxList { "sRGB Encoded AP1 - Texture", "srgb_encoded_ap1_tx", "srgb_ap1" } +#define kOfxColourspaceSrgbEncodedAp1TxLabel "sRGB Encoded AP1 - Texture" #define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" -#define kOfxColourspaceSrgbEncodedAp1TxIsSceneLinear false #define kOfxColourspaceSrgbEncodedAp1TxIsData false #define kOfxColourspaceSrgbEncodedAp1TxIsCore true @@ -810,39 +627,25 @@ This file was auto-generated by scripts/genColour from studio-config-v2.1.0_aces // Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_P3-D65-Texture:1.0 #define kOfxColourspaceSrgbEncodedP3d65Tx "srgb_encoded_p3d65_tx" -#define kOfxColourspaceSrgbEncodedP3d65TxDisplayName "sRGB Encoded P3-D65 - Texture" -#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbEncodedP3d65Tx "srgb_encoded_p3d65_tx" -#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbP3d65 "srgb_p3d65" -#define kOfxColourspaceSrgbEncodedP3d65TxAliasSrgbDisplayp3 "srgb_displayp3" -#define kOfxColourspaceSrgbEncodedP3d65TxList { "sRGB Encoded P3-D65 - Texture", "srgb_encoded_p3d65_tx", "srgb_p3d65", "srgb_displayp3" } +#define kOfxColourspaceSrgbEncodedP3d65TxLabel "sRGB Encoded P3-D65 - Texture" #define kOfxColourspaceSrgbEncodedP3d65TxEncoding "sdr-video" -#define kOfxColourspaceSrgbEncodedP3d65TxIsSceneLinear false #define kOfxColourspaceSrgbEncodedP3d65TxIsData false -#define kOfxColourspaceSrgbEncodedP3d65TxIsCore true +#define kOfxColourspaceSrgbEncodedP3d65TxIsCore false // srgb_tx // Convert ACES2065-1 to sRGB // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 #define kOfxColourspaceSrgbTx "srgb_tx" -#define kOfxColourspaceSrgbTxDisplayName "sRGB - Texture" -#define kOfxColourspaceSrgbTxAliasSrgbTx "srgb_tx" -#define kOfxColourspaceSrgbTxAliasUtilitySRGBTexture "Utility - sRGB - Texture" -#define kOfxColourspaceSrgbTxAliasSrgbTexture "srgb_texture" -#define kOfxColourspaceSrgbTxAliasInputGenericSRGBTexture "Input - Generic - sRGB - Texture" -#define kOfxColourspaceSrgbTxList { "sRGB - Texture", "srgb_tx", "Utility - sRGB - Texture", "srgb_texture", "Input - Generic - sRGB - Texture" } +#define kOfxColourspaceSrgbTxLabel "sRGB - Texture" #define kOfxColourspaceSrgbTxEncoding "sdr-video" -#define kOfxColourspaceSrgbTxIsSceneLinear false #define kOfxColourspaceSrgbTxIsData false #define kOfxColourspaceSrgbTxIsCore true // Raw // The utility "Raw" colorspace. #define kOfxColourspaceRaw "Raw" -#define kOfxColourspaceRawDisplayName "Raw" -#define kOfxColourspaceRawAliasUtilityRaw "Utility - Raw" -#define kOfxColourspaceRawList { "Raw", "Utility - Raw" } +#define kOfxColourspaceRawLabel "Raw" #define kOfxColourspaceRawEncoding "" -#define kOfxColourspaceRawIsSceneLinear false #define kOfxColourspaceRawIsData true #define kOfxColourspaceRawIsCore true diff --git a/include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio b/include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio new file mode 100644 index 00000000..39780a1e --- /dev/null +++ b/include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio @@ -0,0 +1,1552 @@ +ocio_profile_version: 2.3 + +environment: + {} +search_path: "" +strictparsing: true +luma: [0.2126, 0.7152, 0.0722] +name: openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3 +description: | + OpenFX 1.5 Native Mode Config + Based on: Academy Color Encoding System - Studio Config [COLORSPACES v2.1.0] [ACES v1.3] [OCIO v2.3] + ------------------------------------------------------------------------------------------ + + This "OpenColorIO" config is geared toward studios requiring a config that includes a wide variety of camera colorspaces, displays and looks. + +roles: + aces_interchange: ACES2065-1 + cie_xyz_d65_interchange: CIE-XYZ-D65 + color_picking: sRGB - Texture + color_timing: ACEScct + compositing_log: ACEScct + data: Raw + hdr_video: Rec.2100-HLG - Display + matte_paint: ACEScct + scene_linear: ACEScg + sdr_video: Rec.1886 Rec.709 - Display + texture_paint: sRGB - Texture + +file_rules: + - ! {name: Default, colorspace: ACES2065-1} + +shared_views: + - ! {name: ACES 1.0 - SDR Video, view_transform: ACES 1.0 - SDR Video, display_colorspace: } + - ! {name: ACES 1.0 - SDR Video (D60 sim on D65), view_transform: ACES 1.0 - SDR Video (D60 sim on D65), display_colorspace: } + - ! {name: ACES 1.1 - SDR Video (P3 lim), view_transform: ACES 1.1 - SDR Video (P3 lim), display_colorspace: } + - ! {name: ACES 1.1 - SDR Video (Rec.709 lim), view_transform: ACES 1.1 - SDR Video (Rec.709 lim), display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", view_transform: "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)", view_transform: "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)", display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)", view_transform: "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)", display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (1000 nits & P3 lim)", view_transform: "ACES 1.1 - HDR Video (1000 nits & P3 lim)", display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (2000 nits & P3 lim)", view_transform: "ACES 1.1 - HDR Video (2000 nits & P3 lim)", display_colorspace: } + - ! {name: "ACES 1.1 - HDR Video (4000 nits & P3 lim)", view_transform: "ACES 1.1 - HDR Video (4000 nits & P3 lim)", display_colorspace: } + - ! {name: ACES 1.0 - SDR Cinema, view_transform: ACES 1.0 - SDR Cinema, display_colorspace: } + - ! {name: ACES 1.1 - SDR Cinema (Rec.709 lim), view_transform: ACES 1.1 - SDR Cinema (Rec.709 lim), display_colorspace: } + - ! {name: ACES 1.0 - SDR Cinema (D60 sim on DCI), view_transform: ACES 1.0 - SDR Cinema (D60 sim on DCI), display_colorspace: } + - ! {name: ACES 1.1 - SDR Cinema (D60 sim on D65), view_transform: ACES 1.1 - SDR Cinema (D60 sim on D65), display_colorspace: } + - ! {name: ACES 1.1 - SDR Cinema (D65 sim on DCI), view_transform: ACES 1.1 - SDR Cinema (D65 sim on DCI), display_colorspace: } + - ! {name: "ACES 1.1 - HDR Cinema (108 nits & P3 lim)", view_transform: "ACES 1.1 - HDR Cinema (108 nits & P3 lim)", display_colorspace: } + - ! {name: Un-tone-mapped, view_transform: Un-tone-mapped, display_colorspace: } + +displays: + sRGB - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Video, ACES 1.0 - SDR Video (D60 sim on D65), Un-tone-mapped] + Display P3 - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Video, ACES 1.0 - SDR Video (D60 sim on D65), Un-tone-mapped] + Rec.1886 Rec.709 - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Video, ACES 1.0 - SDR Video (D60 sim on D65), Un-tone-mapped] + Rec.1886 Rec.2020 - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Video, ACES 1.1 - SDR Video (P3 lim), ACES 1.1 - SDR Video (Rec.709 lim), Un-tone-mapped] + Rec.2100-HLG - Display: + - ! {name: Raw, colorspace: Raw} + - ! ["ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", Un-tone-mapped] + Rec.2100-PQ - Display: + - ! {name: Raw, colorspace: Raw} + - ! ["ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)", Un-tone-mapped] + ST2084-P3-D65 - Display: + - ! {name: Raw, colorspace: Raw} + - ! ["ACES 1.1 - HDR Video (1000 nits & P3 lim)", "ACES 1.1 - HDR Video (2000 nits & P3 lim)", "ACES 1.1 - HDR Video (4000 nits & P3 lim)", "ACES 1.1 - HDR Cinema (108 nits & P3 lim)", Un-tone-mapped] + P3-D60 - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Cinema, Un-tone-mapped] + P3-D65 - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Cinema, ACES 1.1 - SDR Cinema (Rec.709 lim), ACES 1.1 - SDR Cinema (D60 sim on D65), Un-tone-mapped] + P3-DCI - Display: + - ! {name: Raw, colorspace: Raw} + - ! [ACES 1.0 - SDR Cinema (D60 sim on DCI), ACES 1.1 - SDR Cinema (D65 sim on DCI), Un-tone-mapped] + +active_displays: [sRGB - Display, Display P3 - Display, Rec.1886 Rec.709 - Display, Rec.1886 Rec.2020 - Display, Rec.2100-HLG - Display, Rec.2100-PQ - Display, ST2084-P3-D65 - Display, P3-D60 - Display, P3-D65 - Display, P3-DCI - Display] +active_views: [ACES 1.0 - SDR Video, ACES 1.0 - SDR Video (D60 sim on D65), ACES 1.1 - SDR Video (P3 lim), ACES 1.1 - SDR Video (Rec.709 lim), "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (1000 nits & P3 lim)", "ACES 1.1 - HDR Video (2000 nits & P3 lim)", "ACES 1.1 - HDR Video (4000 nits & P3 lim)", ACES 1.0 - SDR Cinema, ACES 1.1 - SDR Cinema (Rec.709 lim), ACES 1.0 - SDR Cinema (D60 sim on DCI), ACES 1.1 - SDR Cinema (D60 sim on D65), ACES 1.1 - SDR Cinema (D65 sim on DCI), "ACES 1.1 - HDR Cinema (108 nits & P3 lim)", Un-tone-mapped, Raw] +inactive_colorspaces: [CIE-XYZ-D65, sRGB - Display, Display P3 - Display, Rec.1886 Rec.709 - Display, Rec.1886 Rec.2020 - Display, Rec.2100-HLG - Display, Rec.2100-PQ - Display, ST2084-P3-D65 - Display, P3-D60 - Display, P3-D65 - Display, P3-DCI - Display] + +looks: + - ! + name: ACES 1.3 Reference Gamut Compression + process_space: ACES2065-1 + description: | + LMT (applied in ACES2065-1) to compress scene-referred values from common cameras into the AP1 gamut + + ACEStransformID: urn:ampas:aces:transformId:v1.5:LMT.Academy.ReferenceGamutCompress.a1.v1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvLMT.Academy.ReferenceGamutCompress.a1.v1.0 + transform: ! {style: ACES-LMT - ACES 1.3 Reference Gamut Compression} + + +default_view_transform: Un-tone-mapped + +view_transforms: + - ! + name: ACES 1.0 - SDR Video + description: | + Component of ACES Output Transforms for SDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_100nits_dim.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec2020_100nits_dim.a1.0.3 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO_1.0} + + - ! + name: ACES 1.0 - SDR Video (D60 sim on D65) + description: | + Component of ACES Output Transforms for SDR D65 video simulating D60 white + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_D60sim_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_D60sim_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO-D60sim-D65_1.0} + + - ! + name: ACES 1.1 - SDR Video (P3 lim) + description: | + Component of ACES Output Transforms for SDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_P3D65limited_100nits_dim.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO-P3lim_1.1} + + - ! + name: ACES 1.1 - SDR Video (Rec.709 lim) + description: | + Component of ACES Output Transforms for SDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_Rec709limited_100nits_dim.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO-REC709lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)" + description: | + Component of ACES Output Transforms for 1000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-1000nit-15nit-REC2020lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)" + description: | + Component of ACES Output Transforms for 2000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-2000nit-15nit-REC2020lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)" + description: | + Component of ACES Output Transforms for 4000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-4000nit-15nit-REC2020lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (1000 nits & P3 lim)" + description: | + Component of ACES Output Transforms for 1000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-1000nit-15nit-P3lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (2000 nits & P3 lim)" + description: | + Component of ACES Output Transforms for 2000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-2000nit-15nit-P3lim_1.1} + + - ! + name: "ACES 1.1 - HDR Video (4000 nits & P3 lim)" + description: | + Component of ACES Output Transforms for 4000 nit HDR D65 video + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-4000nit-15nit-P3lim_1.1} + + - ! + name: ACES 1.0 - SDR Cinema + description: | + Component of ACES Output Transforms for SDR cinema + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D60_48nits.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D60_48nits.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-CINEMA_1.0} + + - ! + name: ACES 1.1 - SDR Cinema (Rec.709 lim) + description: | + Component of ACES Output Transforms for SDR cinema + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-CINEMA-REC709lim_1.1} + + - ! + name: ACES 1.0 - SDR Cinema (D60 sim on DCI) + description: | + Component of ACES Output Transforms for SDR DCI cinema simulating D60 white + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_48nits.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_48nits.a1.0.3 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-CINEMA-D60sim-DCI_1.0} + + - ! + name: ACES 1.1 - SDR Cinema (D60 sim on D65) + description: | + Component of ACES Output Transforms for SDR D65 cinema simulating D60 white + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-CINEMA-D60sim-D65_1.1} + + - ! + name: ACES 1.1 - SDR Cinema (D65 sim on DCI) + description: | + Component of ACES Output Transforms for SDR DCI cinema simulating D65 white + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_D65sim_48nits.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_D65sim_48nits.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-CINEMA-D65sim-DCI_1.1} + + - ! + name: "ACES 1.1 - HDR Cinema (108 nits & P3 lim)" + description: | + Component of ACES Output Transforms for 108 nit HDR D65 cinema + + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 + from_scene_reference: ! {style: ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-CINEMA-108nit-7.2nit-P3lim_1.1} + + - ! + name: Un-tone-mapped + from_scene_reference: ! {style: UTILITY - ACES-AP0_to_CIE-XYZ-D65_BFD} + +display_colorspaces: + - ! + name: CIE-XYZ-D65 + aliases: [cie_xyz_d65] + family: "" + equalitygroup: "" + bitdepth: 32f + description: The "CIE XYZ (D65)" display connection colorspace. + isdata: false + allocation: uniform + + - ! + name: sRGB - Display + aliases: [srgb_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF) + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_sRGB} + + - ! + name: Display P3 - Display + aliases: [displayp3_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Apple Display P3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_D60sim_dim.a1.0.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_D60sim_dim.a1.0.0 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_DisplayP3} + + - ! + name: Rec.1886 Rec.709 - Display + aliases: [rec1886_rec709_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video) + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_REC.1886-REC.709} + + - ! + name: Rec.1886 Rec.2020 - Display + aliases: [rec1886_rec2020_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video) + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec2020_100nits_dim.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_P3D65limited_100nits_dim.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_Rec709limited_100nits_dim.a1.1.0 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_REC.1886-REC.2020} + + - ! + name: Rec.2100-HLG - Display + aliases: [rec2100_hlg_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0 + isdata: false + categories: [file-io] + encoding: hdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_REC.2100-HLG-1000nit} + + - ! + name: Rec.2100-PQ - Display + aliases: [rec2100_pq_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Rec.2100-PQ + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0 + isdata: false + categories: [file-io] + encoding: hdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_REC.2100-PQ} + + - ! + name: ST2084-P3-D65 - Display + aliases: [st2084_p3d65_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 + isdata: false + categories: [file-io] + encoding: hdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_ST2084-P3-D65} + + - ! + name: P3-D60 - Display + aliases: [p3d60_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D60_48nits.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D60_48nits.a1.0.3 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_G2.6-P3-D60-BFD} + + - ! + name: P3-D65 - Display + aliases: [p3d65_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_G2.6-P3-D65} + + - ! + name: P3-DCI - Display + aliases: [p3_dci_display] + family: Display + equalitygroup: "" + bitdepth: 32f + description: | + Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_48nits.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_48nits.a1.0.3 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_D65sim_48nits.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_D65sim_48nits.a1.1.0 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_display_reference: ! {style: DISPLAY - CIE-XYZ-D65_to_G2.6-P3-DCI-BFD} + +colorspaces: + - ! + name: ACES2065-1 + aliases: [aces2065_1, ACES - ACES2065-1, lin_ap0] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: The "Academy Color Encoding System" reference colorspace. + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + + - ! + name: ACEScc + aliases: [ACES - ACEScc, acescc_ap1] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACEScc to ACES2065-1 + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! {style: ACEScc_to_ACES2065-1} + + - ! + name: ACEScct + aliases: [ACES - ACEScct, acescct_ap1] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACEScct to ACES2065-1 + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3 + isdata: false + categories: [file-io, working-space] + encoding: log + allocation: uniform + to_scene_reference: ! {style: ACEScct_to_ACES2065-1} + + - ! + name: ACEScg + aliases: [ACES - ACEScg, lin_ap1] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACEScg to ACES2065-1 + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3 + isdata: false + categories: [file-io, working-space, texture] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! {style: ACEScg_to_ACES2065-1} + + - ! + name: ADX10 + aliases: [Input - ADX - ADX10] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: | + Convert ADX10 to ACES2065-1 + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! {style: ADX10_to_ACES2065-1} + + - ! + name: ADX16 + aliases: [Input - ADX - ADX16] + family: ACES + equalitygroup: "" + bitdepth: 32f + description: | + Convert ADX16 to ACES2065-1 + + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! {style: ADX16_to_ACES2065-1} + + - ! + name: Linear ARRI Wide Gamut 3 + aliases: [lin_arri_wide_gamut_3, Input - ARRI - Linear - ALEXA Wide Gamut, lin_alexawide] + family: Input/ARRI + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear ARRI Wide Gamut 3 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear ARRI Wide Gamut 3 to ACES2065-1 + children: + - ! {matrix: [0.680205505106279, 0.236136601606481, 0.0836578932872398, 0, 0.0854149797421404, 1.01747087860704, -0.102885858349182, 0, 0.00205652166929683, -0.0625625003847921, 1.06050597871549, 0, 0, 0, 0, 1]} + + - ! + name: ARRI LogC3 (EI800) + aliases: [arri_logc3_ei800, Input - ARRI - V3 LogC (EI800) - Wide Gamut, logc3ei800_alexawide] + family: Input/ARRI + equalitygroup: "" + bitdepth: 32f + description: | + Convert ARRI LogC3 (EI800) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_EI800_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.Alexa-v3-logC-EI800.a1.v2 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC_EI800_AWG.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC_EI800_AWG_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: ARRI LogC3 (EI800) to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.247189638318671, log_side_offset: 0.385536998692443, lin_side_slope: 5.55555555555556, lin_side_offset: 0.0522722750251688, lin_side_break: 0.0105909904954696, direction: inverse} + - ! {matrix: [0.680205505106279, 0.236136601606481, 0.0836578932872398, 0, 0.0854149797421404, 1.01747087860704, -0.102885858349182, 0, 0.00205652166929683, -0.0625625003847921, 1.06050597871549, 0, 0, 0, 0, 1]} + + - ! + name: Linear ARRI Wide Gamut 4 + aliases: [lin_arri_wide_gamut_4, lin_awg4] + family: Input/ARRI + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear ARRI Wide Gamut 4 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear ARRI Wide Gamut 4 to ACES2065-1 + children: + - ! {matrix: [0.750957362824734, 0.144422786709757, 0.104619850465509, 0, 0.000821837079380207, 1.007397584885, -0.00821942196438358, 0, -0.000499952143533471, -0.000854177231436971, 1.00135412937497, 0, 0, 0, 0, 1]} + + - ! + name: ARRI LogC4 + aliases: [arri_logc4] + family: Input/ARRI + equalitygroup: "" + bitdepth: 32f + description: | + Convert ARRI LogC4 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.ARRI-LogC4.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC4_to_ACES.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC4.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: ARRI LogC4 to ACES2065-1 + children: + - ! {log_side_slope: 0.0647954196341293, log_side_offset: -0.295908392682586, lin_side_slope: 2231.82630906769, lin_side_offset: 64, lin_side_break: -0.0180569961199113, direction: inverse} + - ! {matrix: [0.750957362824734, 0.144422786709757, 0.104619850465509, 0, 0.000821837079380207, 1.007397584885, -0.00821942196438358, 0, -0.000499952143533471, -0.000854177231436971, 1.00135412937497, 0, 0, 0, 0, 1]} + + - ! + name: BMDFilm WideGamut Gen5 + aliases: [bmdfilm_widegamut_gen5] + family: Input/BlackmagicDesign + equalitygroup: "" + bitdepth: 32f + description: | + Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_WideGamut_Gen5_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.BlackmagicDesign.BMDFilm_WideGamut_Gen5.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_BMDFilm_WideGamut_Gen5.a1.v1 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.BMDFilm_WideGamut_Gen5_to_ACES.a1.v1 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 + children: + - ! {base: 2.71828182845905, log_side_slope: 0.0869287606549122, log_side_offset: 0.530013339229194, lin_side_offset: 0.00549407243225781, lin_side_break: 0.005, direction: inverse} + - ! {matrix: [0.647091325580708, 0.242595385134207, 0.110313289285085, 0, 0.0651915997328519, 1.02504756760476, -0.0902391673376125, 0, -0.0275570729194699, -0.0805887097177784, 1.10814578263725, 0, 0, 0, 0, 1]} + + - ! + name: DaVinci Intermediate WideGamut + aliases: [davinci_intermediate_widegamut] + family: Input/BlackmagicDesign + equalitygroup: "" + bitdepth: 32f + description: | + Convert DaVinci Intermediate Wide Gamut to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.DaVinci_Intermediate_WideGamut_to_ACES.a1.v1 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: DaVinci Intermediate Wide Gamut to ACES2065-1 + children: + - ! {log_side_slope: 0.07329248, log_side_offset: 0.51304736, lin_side_offset: 0.0075, lin_side_break: 0.00262409, linear_slope: 10.44426855, direction: inverse} + - ! {matrix: [0.748270290272981, 0.167694659554328, 0.0840350501726906, 0, 0.0208421234689102, 1.11190474268894, -0.132746866157851, 0, -0.0915122574225729, -0.127746712807307, 1.21925897022988, 0, 0, 0, 0, 1]} + + - ! + name: Linear BMD WideGamut Gen5 + aliases: [lin_bmd_widegamut_gen5] + family: Input/BlackmagicDesign + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 + children: + - ! {matrix: [0.647091325580708, 0.242595385134207, 0.110313289285085, 0, 0.0651915997328519, 1.02504756760476, -0.0902391673376125, 0, -0.0275570729194699, -0.0805887097177784, 1.10814578263725, 0, 0, 0, 0, 1]} + + - ! + name: Linear DaVinci WideGamut + aliases: [lin_davinci_widegamut] + family: Input/BlackmagicDesign + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear DaVinci Wide Gamut to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear DaVinci Wide Gamut to ACES2065-1 + children: + - ! {matrix: [0.748270290272981, 0.167694659554328, 0.0840350501726906, 0, 0.0208421234689102, 1.11190474268894, -0.132746866157851, 0, -0.0915122574225729, -0.127746712807307, 1.21925897022988, 0, 0, 0, 0, 1]} + + - ! + name: CanonLog2 CinemaGamut D55 + aliases: [canonlog2_cinemagamut_d55, Input - Canon - Canon-Log2 - Cinema Gamut Daylight, canonlog2_cgamutday] + family: Input/Canon + equalitygroup: "" + bitdepth: 32f + description: | + Convert Canon Log 2 Cinema Gamut (Daylight) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog2_CinemaGamut-D55_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog2_CGamut_to_ACES.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog2_CGamut.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! {style: CANON_CLOG2-CGAMUT_to_ACES2065-1} + + - ! + name: CanonLog3 CinemaGamut D55 + aliases: [canonlog3_cinemagamut_d55, Input - Canon - Canon-Log3 - Cinema Gamut Daylight, canonlog3_cgamutday] + family: Input/Canon + equalitygroup: "" + bitdepth: 32f + description: | + Convert Canon Log 3 Cinema Gamut (Daylight) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog3_CinemaGamut-D55_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog3_CGamut_to_ACES.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog3_CGamut.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! {style: CANON_CLOG3-CGAMUT_to_ACES2065-1} + + - ! + name: Linear CinemaGamut D55 + aliases: [lin_cinemagamut_d55, Input - Canon - Linear - Canon Cinema Gamut Daylight, lin_canoncgamutday] + family: Input/Canon + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear Canon Cinema Gamut (Daylight) to ACES2065-1 + children: + - ! {matrix: [0.763064454775734, 0.14902116113706, 0.0879143840872056, 0, 0.00365745670512393, 1.10696038037622, -0.110617837081339, 0, -0.0094077940457189, -0.218383304989987, 1.22779109903571, 0, 0, 0, 0, 1]} + + - ! + name: Linear V-Gamut + aliases: [lin_vgamut, Input - Panasonic - Linear - V-Gamut] + family: Input/Panasonic + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear Panasonic V-Gamut to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear Panasonic V-Gamut to ACES2065-1 + children: + - ! {matrix: [0.72461670413153, 0.166915288193706, 0.108468007674764, 0, 0.021390245413146, 0.984908155703054, -0.00629840111620089, 0, -0.00923556287076561, -0.00105690563900513, 1.01029246850977, 0, 0, 0, 0, 1]} + + - ! + name: V-Log V-Gamut + aliases: [vlog_vgamut, Input - Panasonic - V-Log - V-Gamut] + family: Input/Panasonic + equalitygroup: "" + bitdepth: 32f + description: | + Convert Panasonic V-Log - V-Gamut to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog_VGamut_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.VLog_VGamut_to_ACES.a1.1.0 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_VLog_VGamut.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Panasonic.VLog_VGamut.a1.v1 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Panasonic V-Log - V-Gamut to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.241514, log_side_offset: 0.598206, lin_side_offset: 0.00873, lin_side_break: 0.01, direction: inverse} + - ! {matrix: [0.72461670413153, 0.166915288193706, 0.108468007674764, 0, 0.021390245413146, 0.984908155703054, -0.00629840111620089, 0, -0.00923556287076561, -0.00105690563900513, 1.01029246850977, 0, 0, 0, 0, 1]} + + - ! + name: Linear REDWideGamutRGB + aliases: [lin_redwidegamutrgb, Input - RED - Linear - REDWideGamutRGB, lin_rwg] + family: Input/RED + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear REDWideGamutRGB to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear REDWideGamutRGB to ACES2065-1 + children: + - ! {matrix: [0.785058804068092, 0.0838587565440846, 0.131082439387823, 0, 0.0231738348454756, 1.08789754919233, -0.111071384037806, 0, -0.0737604353682082, -0.314590072290208, 1.38835050765842, 0, 0, 0, 0, 1]} + + - ! + name: Log3G10 REDWideGamutRGB + aliases: [log3g10_redwidegamutrgb, Input - RED - REDLog3G10 - REDWideGamutRGB, rl3g10_rwg] + family: Input/RED + equalitygroup: "" + bitdepth: 32f + description: | + Convert RED Log3G10 REDWideGamutRGB to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10_REDWideGamutRGB_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.RED.Log3G10_REDWideGamutRGB.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_Log3G10_RWG.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.Log3G10_RWG_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: RED Log3G10 REDWideGamutRGB to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.224282, lin_side_slope: 155.975327, lin_side_offset: 2.55975327, lin_side_break: -0.01, direction: inverse} + - ! {matrix: [0.785058804068092, 0.0838587565440846, 0.131082439387823, 0, 0.0231738348454756, 1.08789754919233, -0.111071384037806, 0, -0.0737604353682082, -0.314590072290208, 1.38835050765842, 0, 0, 0, 0, 1]} + + - ! + name: Linear S-Gamut3 + aliases: [lin_sgamut3, Input - Sony - Linear - S-Gamut3] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear S-Gamut3 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear S-Gamut3 to ACES2065-1 + children: + - ! {matrix: [0.75298259539984, 0.143370216235557, 0.103647188364603, 0, 0.0217076974414429, 1.01531883550528, -0.0370265329467195, 0, -0.00941605274963355, 0.00337041785882367, 1.00604563489081, 0, 0, 0, 0, 1]} + + - ! + name: Linear S-Gamut3.Cine + aliases: [lin_sgamut3cine, Input - Sony - Linear - S-Gamut3.Cine] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear S-Gamut3.Cine to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear S-Gamut3.Cine to ACES2065-1 + children: + - ! {matrix: [0.638788667185978, 0.272351433711262, 0.0888598991027595, 0, -0.00391590602528224, 1.0880732308974, -0.0841573248721177, 0, -0.0299072021239151, -0.0264325799101947, 1.05633978203411, 0, 0, 0, 0, 1]} + + - ! + name: Linear Venice S-Gamut3 + aliases: [lin_venice_sgamut3, Input - Sony - Linear - Venice S-Gamut3] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear Venice S-Gamut3 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear Venice S-Gamut3 to ACES2065-1 + children: + - ! {matrix: [0.793329741146434, 0.0890786256206771, 0.117591633232888, 0, 0.0155810585252582, 1.03271230692988, -0.0482933654551394, 0, -0.0188647477991488, 0.0127694120973433, 1.0060953357018, 0, 0, 0, 0, 1]} + + - ! + name: Linear Venice S-Gamut3.Cine + aliases: [lin_venice_sgamut3cine, Input - Sony - Linear - Venice S-Gamut3.Cine] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Linear Venice S-Gamut3.Cine to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0 + isdata: false + categories: [file-io] + encoding: scene-linear + allocation: uniform + to_scene_reference: ! + name: Linear Venice S-Gamut3.Cine to ACES2065-1 + children: + - ! {matrix: [0.674257092126512, 0.220571735923397, 0.10517117195009, 0, -0.00931360607857167, 1.10595886142466, -0.0966452553460855, 0, -0.0382090673002312, -0.017938376600236, 1.05614744390047, 0, 0, 0, 0, 1]} + + - ! + name: S-Log3 S-Gamut3 + aliases: [slog3_sgamut3, Input - Sony - S-Log3 - S-Gamut3] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Sony S-Log3 S-Gamut3 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Sony S-Log3 S-Gamut3 to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.255620723362659, log_side_offset: 0.410557184750733, lin_side_slope: 5.26315789473684, lin_side_offset: 0.0526315789473684, lin_side_break: 0.01125, linear_slope: 6.62194371177582, direction: inverse} + - ! {matrix: [0.75298259539984, 0.143370216235557, 0.103647188364603, 0, 0.0217076974414429, 1.01531883550528, -0.0370265329467195, 0, -0.00941605274963355, 0.00337041785882367, 1.00604563489081, 0, 0, 0, 0, 1]} + + - ! + name: S-Log3 S-Gamut3.Cine + aliases: [slog3_sgamut3cine, Input - Sony - S-Log3 - S-Gamut3.Cine, slog3_sgamutcine] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3Cine_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3Cine.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3Cine.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3Cine_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Sony S-Log3 S-Gamut3.Cine to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.255620723362659, log_side_offset: 0.410557184750733, lin_side_slope: 5.26315789473684, lin_side_offset: 0.0526315789473684, lin_side_break: 0.01125, linear_slope: 6.62194371177582, direction: inverse} + - ! {matrix: [0.638788667185978, 0.272351433711262, 0.0888598991027595, 0, -0.00391590602528224, 1.0880732308974, -0.0841573248721177, 0, -0.0299072021239151, -0.0264325799101947, 1.05633978203411, 0, 0, 0, 0, 1]} + + - ! + name: S-Log3 Venice S-Gamut3 + aliases: [slog3_venice_sgamut3, Input - Sony - S-Log3 - Venice S-Gamut3] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Sony S-Log3 Venice S-Gamut3 to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.255620723362659, log_side_offset: 0.410557184750733, lin_side_slope: 5.26315789473684, lin_side_offset: 0.0526315789473684, lin_side_break: 0.01125, linear_slope: 6.62194371177582, direction: inverse} + - ! {matrix: [0.793329741146434, 0.089078625620677, 0.117591633232888, 0, 0.0155810585252582, 1.03271230692988, -0.0482933654551394, 0, -0.0188647477991488, 0.0127694120973433, 1.00609533570181, 0, 0, 0, 0, 1]} + + - ! + name: S-Log3 Venice S-Gamut3.Cine + aliases: [slog3_venice_sgamut3cine, Input - Sony - S-Log3 - Venice S-Gamut3.Cine, slog3_venice_sgamutcine] + family: Input/Sony + equalitygroup: "" + bitdepth: 32f + description: | + Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3Cine_to_ACES2065-1:1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3Cine.a1.v1 + + AMF Components + -------------- + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3Cine.a1.1.0 + ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3Cine_to_ACES.a1.1.0 + isdata: false + categories: [file-io] + encoding: log + allocation: uniform + to_scene_reference: ! + name: Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 + children: + - ! {base: 10, log_side_slope: 0.255620723362659, log_side_offset: 0.410557184750733, lin_side_slope: 5.26315789473684, lin_side_offset: 0.0526315789473684, lin_side_break: 0.01125, linear_slope: 6.62194371177582, direction: inverse} + - ! {matrix: [0.674257092126512, 0.220571735923397, 0.10517117195009, 0, -0.00931360607857167, 1.10595886142466, -0.0966452553460855, 0, -0.0382090673002312, -0.017938376600236, 1.05614744390047, 0, 0, 0, 0, 1]} + + - ! + name: Camera Rec.709 + aliases: [camera_rec709, Utility - Rec.709 - Camera, rec709_camera] + family: Utility/ITU + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0 + isdata: false + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Camera Rec.709 + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + - ! {gamma: 2.22222222222222, offset: 0.099, direction: inverse} + + - ! + name: Linear P3-D65 + aliases: [lin_p3d65, Utility - Linear - P3-D65, lin_displayp3, Linear Display P3] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to linear P3 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 + isdata: false + categories: [file-io, working-space, texture] + encoding: scene-linear + allocation: uniform + from_scene_reference: ! + name: AP0 to Linear P3-D65 + children: + - ! {matrix: [2.02490528596679, -0.689069761034766, -0.335835524932019, 0, -0.183597032256178, 1.28950620775902, -0.105909175502841, 0, 0.00905856112234766, -0.0592796840575522, 1.0502211229352, 0, 0, 0, 0, 1]} + + - ! + name: Linear Rec.2020 + aliases: [lin_rec2020, Utility - Linear - Rec.2020] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 + isdata: false + categories: [file-io, texture] + encoding: scene-linear + allocation: uniform + from_scene_reference: ! + name: AP0 to Linear Rec.2020 + children: + - ! {matrix: [1.49040952054172, -0.26617091926613, -0.224238601275593, 0, -0.0801674998722558, 1.18216712109757, -0.10199962122531, 0, 0.00322763119162216, -0.0347764757450576, 1.03154884455344, 0, 0, 0, 0, 1]} + + - ! + name: Linear Rec.709 (sRGB) + aliases: [lin_rec709_srgb, Utility - Linear - Rec.709, lin_rec709, lin_srgb, Utility - Linear - sRGB] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to linear Rec.709 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 + isdata: false + categories: [file-io, working-space, texture] + encoding: scene-linear + allocation: uniform + from_scene_reference: ! + name: AP0 to Linear Rec.709 (sRGB) + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + + - ! + name: Gamma 1.8 Rec.709 - Texture + aliases: [g18_rec709_tx, Utility - Gamma 1.8 - Rec.709 - Texture, g18_rec709] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Gamma 1.8 Rec.709 - Texture + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + - ! {value: 1.8, style: pass_thru, direction: inverse} + + - ! + name: Gamma 2.2 AP1 - Texture + aliases: [g22_ap1_tx, g22_ap1] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Gamma 2.2 AP1 - Texture + children: + - ! {matrix: [1.45143931614567, -0.23651074689374, -0.214928569251925, 0, -0.0765537733960206, 1.17622969983357, -0.0996759264375522, 0, 0.00831614842569772, -0.00603244979102102, 0.997716301365323, 0, 0, 0, 0, 1]} + - ! {value: 2.2, style: pass_thru, direction: inverse} + + - ! + name: Gamma 2.2 Rec.709 - Texture + aliases: [g22_rec709_tx, Utility - Gamma 2.2 - Rec.709 - Texture, g22_rec709] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Gamma 2.2 Rec.709 - Texture + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + - ! {value: 2.2, style: pass_thru, direction: inverse} + + - ! + name: Gamma 2.4 Rec.709 - Texture + aliases: [g24_rec709_tx, g24_rec709, rec709_display, Utility - Rec.709 - Display] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Gamma 2.4 Rec.709 - Texture + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + - ! {value: 2.4, style: pass_thru, direction: inverse} + + - ! + name: sRGB Encoded AP1 - Texture + aliases: [srgb_encoded_ap1_tx, srgb_ap1] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to sRGB Encoded AP1 - Texture + children: + - ! {matrix: [1.45143931614567, -0.23651074689374, -0.214928569251925, 0, -0.0765537733960206, 1.17622969983357, -0.0996759264375522, 0, 0.00831614842569772, -0.00603244979102102, 0.997716301365323, 0, 0, 0, 0, 1]} + - ! {gamma: 2.4, offset: 0.055, direction: inverse} + + - ! + name: sRGB Encoded P3-D65 - Texture + aliases: [srgb_encoded_p3d65_tx, srgb_p3d65, srgb_displayp3] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_P3-D65-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to sRGB Encoded P3-D65 - Texture + children: + - ! {matrix: [2.02490528596679, -0.689069761034766, -0.335835524932019, 0, -0.183597032256178, 1.28950620775902, -0.105909175502841, 0, 0.00905856112234766, -0.0592796840575522, 1.0502211229352, 0, 0, 0, 0, 1]} + - ! {gamma: 2.4, offset: 0.055, direction: inverse} + + - ! + name: sRGB - Texture + aliases: [srgb_tx, Utility - sRGB - Texture, srgb_texture, Input - Generic - sRGB - Texture] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: | + Convert ACES2065-1 to sRGB + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 + isdata: false + categories: [file-io, texture] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to sRGB Rec.709 + children: + - ! {matrix: [2.52168618674388, -1.13413098823972, -0.387555198504164, 0, -0.276479914229922, 1.37271908766826, -0.096239173438334, 0, -0.0153780649660342, -0.152975335867399, 1.16835340083343, 0, 0, 0, 0, 1]} + - ! {gamma: 2.4, offset: 0.055, direction: inverse} + + - ! + name: Raw + aliases: [Utility - Raw] + family: Utility + equalitygroup: "" + bitdepth: 32f + description: The utility "Raw" colorspace. + isdata: true + categories: [file-io, texture] + allocation: uniform + +named_transforms: + - ! + name: ARRI LogC3 - Curve (EI800) + aliases: [arri_logc3_crv_ei800, Input - ARRI - Curve - V3 LogC (EI800), crv_logc3ei800] + description: | + Convert ARRI LogC3 Curve (EI800) to Relative Scene Linear + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_Curve_EI800_to_Linear:1.0 + family: Input/ARRI + categories: [file-io] + encoding: log + transform: ! + name: ARRI LogC3 Curve (EI800) to Relative Scene Linear + children: + - ! {base: 10, log_side_slope: 0.247189638318671, log_side_offset: 0.385536998692443, lin_side_slope: 5.55555555555556, lin_side_offset: 0.0522722750251688, lin_side_break: 0.0105909904954696, direction: inverse} + + - ! + name: ARRI LogC4 - Curve + aliases: [arri_logc4_crv] + description: | + Convert ARRI LogC4 Curve to Relative Scene Linear + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_Curve_to_Linear:1.0 + family: Input/ARRI + categories: [file-io] + encoding: log + transform: ! + name: ARRI LogC4 Curve to Relative Scene Linear + children: + - ! {log_side_slope: 0.0647954196341293, log_side_offset: -0.295908392682586, lin_side_slope: 2231.82630906769, lin_side_offset: 64, lin_side_break: -0.0180569961199113, direction: inverse} + + - ! + name: BMDFilm Gen5 Log - Curve + aliases: [bmdfilm_gen5_log_crv] + description: | + Convert Blackmagic Film (Gen 5) Log to Blackmagic Film (Gen 5) Linear + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_Gen5_Log-Curve_to_Linear:1.0 + family: Input/BlackmagicDesign + categories: [file-io] + encoding: log + transform: ! + name: Blackmagic Film (Gen 5) Log to Linear Curve + children: + - ! {base: 2.71828182845905, log_side_slope: 0.0869287606549122, log_side_offset: 0.530013339229194, lin_side_offset: 0.00549407243225781, lin_side_break: 0.005, direction: inverse} + + - ! + name: DaVinci Intermediate Log - Curve + aliases: [davinci_intermediate_log_crv] + description: | + Convert DaVinci Intermediate Log to DaVinci Intermediate Linear + + CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_Log-Curve_to_Linear:1.0 + family: Input/BlackmagicDesign + categories: [file-io] + encoding: log + transform: ! + name: DaVinci Intermediate Log to Linear Curve + children: + - ! {log_side_slope: 0.07329248, log_side_offset: 0.51304736, lin_side_offset: 0.0075, lin_side_break: 0.00262409, linear_slope: 10.44426855, direction: inverse} + + - ! + name: C-Log2 - Curve + aliases: [clog2_crv, Input - Canon - Curve - Canon-Log2, crv_canonlog2] + description: | + Convert CLog2 Log (arbitrary primaries) to CLog2 Linear (arbitrary primaries) + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CLog2-Curve_to_Linear:1.0 + family: Input/Canon + categories: [file-io] + encoding: log + transform: ! {style: CURVE - CANON_CLOG2_to_LINEAR} + + - ! + name: C-Log3 - Curve + aliases: [clog3_crv, Input - Canon - Curve - Canon-Log3, crv_canonlog3] + description: | + Convert CLog3 Log (arbitrary primaries) to CLog3 Linear (arbitrary primaries) + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CLog3-Curve_to_Linear:1.0 + family: Input/Canon + categories: [file-io] + encoding: log + transform: ! {style: CURVE - CANON_CLOG3_to_LINEAR} + + - ! + name: V-Log - Curve + aliases: [vlog_crv, Input - Panasonic - Curve - V-Log, crv_vlog] + description: | + Convert Panasonic V-Log Log (arbitrary primaries) to Panasonic V-Log Linear (arbitrary primaries) + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog-Curve_to_Linear:1.0 + family: Input/Panasonic + categories: [file-io] + encoding: log + transform: ! + name: Panasonic V-Log Log to Linear Curve + children: + - ! {base: 10, log_side_slope: 0.241514, log_side_offset: 0.598206, lin_side_offset: 0.00873, lin_side_break: 0.01, direction: inverse} + + - ! + name: Log3G10 - Curve + aliases: [log3g10_crv, Input - RED - Curve - REDLog3G10, crv_rl3g10] + description: | + Convert RED Log3G10 Log (arbitrary primaries) to RED Log3G10 Linear (arbitrary primaries) + + CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10-Curve_to_Linear:1.0 + family: Input/RED + categories: [file-io] + encoding: log + transform: ! + name: RED Log3G10 Log to Linear Curve + children: + - ! {base: 10, log_side_slope: 0.224282, lin_side_slope: 155.975327, lin_side_offset: 2.55975327, lin_side_break: -0.01, direction: inverse} + + - ! + name: S-Log3 - Curve + aliases: [slog3_crv, Input - Sony - Curve - S-Log3, crv_slog3] + description: | + Convert S-Log3 Log (arbitrary primaries) to S-Log3 Linear (arbitrary primaries) + + CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3-Curve_to_Linear:1.0 + family: Input/Sony + categories: [file-io] + encoding: log + transform: ! + name: S-Log3 Log to Linear Curve + children: + - ! {base: 10, log_side_slope: 0.255620723362659, log_side_offset: 0.410557184750733, lin_side_slope: 5.26315789473684, lin_side_offset: 0.0526315789473684, lin_side_break: 0.01125, linear_slope: 6.62194371177582, direction: inverse} + + - ! + name: Rec.1886 - Curve + aliases: [rec1886_crv, Utility - Curve - Rec.1886, crv_rec1886] + description: | + Convert generic linear RGB to Rec.1886 encoded RGB + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:Linear_to_Rec1886-Curve:1.0 + family: Utility + categories: [file-io] + encoding: sdr-video + inverse_transform: ! + name: Linear to Rec.1886 + children: + - ! {value: 2.4, style: pass_thru, direction: inverse} + + - ! + name: Rec.709 - Curve + aliases: [rec709_crv, Utility - Curve - Rec.709, crv_rec709] + description: | + Convert generic linear RGB to generic gamma-corrected RGB + + CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:Linear_to_Rec709-Curve:1.0 + family: Utility/ITU + categories: [file-io] + encoding: sdr-video + inverse_transform: ! + name: Linear to Rec.709 + children: + - ! {gamma: 2.22222222222222, offset: 0.099, direction: inverse} + + - ! + name: sRGB - Curve + aliases: [srgb_crv, Utility - Curve - sRGB, crv_srgb] + description: | + Convert generic linear RGB to sRGB encoded RGB + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:Linear_to_sRGB-Curve:1.0 + family: Utility + categories: [file-io] + encoding: sdr-video + inverse_transform: ! + name: Linear to sRGB + children: + - ! {gamma: 2.4, offset: 0.055, direction: inverse} + + - ! + name: ST-2084 - Curve + aliases: [st_2084_crv] + description: | + Convert generic linear RGB to generic ST.2084 (PQ) encoded RGB mapping 1.0 to 100nits + + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:Linear_to_ST2084-Curve:1.0 + family: Utility + categories: [file-io] + encoding: hdr-video + inverse_transform: ! {style: CURVE - LINEAR_to_ST-2084} + diff --git a/scripts/genColour b/scripts/genColour index 0a63cc13..943a14f6 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -5,7 +5,7 @@ # Extract information from an OCIO config to C header. # Example invocation: -# scripts/genColour > include/ofxColourspaceList.h +# OCIO=include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1 scripts/genColour > include/ofxColourspaceList.h import PyOpenColorIO as OCIO from string import Template @@ -34,6 +34,20 @@ footer = ''' #endif ''' +role_docs = { + 'aces_interchange': 'Guaranteed to be ACES2065-1.', + 'cie_xyz_d65_interchange': 'CIE XYZ colorimetry with the neutral axis at D65.', + 'color_picking': 'The colourspace to use for colour pickers, typically a display colourspace.', + 'color_timing': 'A colourspace suitable for colour grading, typically a log colourspace.', + 'compositing_log': 'Any colourspace with a log transfer function.', + 'data': 'Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace.', + 'hdr_video': 'Any display-referred HDR video such as Rec. 2020 HLG or PQ.', + 'matte_paint': 'A colourspace suitable for matte painting.', + 'scene_linear': 'Any scene-referred linear colourspace.', + 'sdr_video': 'Any display-referred SDR video such as Rec. 709.', + 'texture_paint': 'A colourspace suitable for texture painting, typically sRGB.' + } + chars_to_delete = str.maketrans('', '', ' -.()') def camel_name(name): return ' '.join([word[0].upper() + word[1:] for word in name.replace(' ', '_').split('_')]).translate(chars_to_delete) @@ -53,12 +67,9 @@ def print_name(name): def print_role(role): role_name = role[0] - colourspace_name = colourspace_short_name(studio_config.getColorSpace(role[1])) - print(f'\n// {role_name}') + colourspace_name = colourspace_short_name(ofx_config.getColorSpace(role[1])) + print(f'\n/** @brief {role_name}\n{role_docs[role_name]}\n*/') print(f'{define_base}Role{camel_name(role_name)} "{role_name}"') - print(f'{define_base}Role{camel_name(role_name)}Colourspace "{colourspace_name}"') - role_map = '{ "' + role_name + '", "' + colourspace_name + '" }' - print(f'{define_base}Role{camel_name(role_name)}Mapping {role_map}') def print_string_property(name, propname, value): print(f'{define_base}{camel_name(name)}{propname} "{value}"') @@ -70,47 +81,46 @@ def print_list(name, list): name_list = '{ "' + '", "'.join(list) + '" }' print(f'{define_base}{camel_name(name)}List {name_list}') -cg_config = OCIO.Config.CreateFromBuiltinConfig('cg-config-v2.1.0_aces-v1.3_ocio-v2.3') -studio_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3_ocio-v2.3') +# This should be the OpenFX OCIO config created by genOCIOConfig +ofx_config = OCIO.GetCurrentConfig() -# Workaround for OCIO issue #123, missing encoding on srgb_tx -srgb_tx = studio_config.getColorSpace('srgb_tx') -srgb_tx.setEncoding('sdr-video') +# OFX-specific set of core colourspaces +core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', + 'ACES2065-1', 'ACEScc', 'ACEScct', + 'ACEScg', 'lin_p3d65', 'lin_rec2020', + 'lin_rec709_srgb', 'g18_rec709_tx', 'g22_ap1_tx', + 'g22_rec709_tx', 'g24_rec709_tx', 'srgb_encoded_ap1_tx', + 'srg_encoded_p3d65_tx', 'srgb_tx', 'Raw', + 'rec1886_rec2020_display', 'rec2100_hlg_display', 'rec2100_pq_display'] def print_colourspace(spc, is_core): name = colourspace_short_name(spc) display_name = spc.getName() print(f'\n// {name}\n//', '\n// '.join(spc.getDescription().split('\n')).replace('\n// \n', '\n')) print_name(name) - print_string_property(name, 'DisplayName', display_name) - name_list = [display_name] - for alias in spc.getAliases(): - name_list.append(alias) - print_string_property(name, f'Alias{camel_name(alias)}', alias) - print_list(name, name_list) + print_string_property(name, 'Label', display_name) print_string_property(name, 'Encoding', spc.getEncoding()) - print_bool_property(name, 'SceneLinear', studio_config.isColorSpaceLinear(name, OCIO.REFERENCE_SPACE_SCENE)) print_bool_property(name, 'Data', spc.isData()) print_bool_property(name, 'Core', is_core) -print(Template(header).substitute(config_name=studio_config.getName())) +print(Template(header).substitute(config_name=ofx_config.getName())) + +print('''/** @brief Roles - generic names for types of colourspace +Use a role when the specific colourspace is not important. +*/''') -print('// Roles') -for role in studio_config.getRoles(): +for role in ofx_config.getRoles(): print_role(role) print('\n// Display Colourspaces') -core_displays = cg_config.getDisplays() -for display in studio_config.getDisplays(): - is_core = display in core_displays - print_colourspace(studio_config.getColorSpace(display), is_core) +for display in ofx_config.getDisplays(): + name = ofx_config.getColorSpace(display) + is_core = colourspace_short_name(name) in core_spaces + print_colourspace(name, is_core) print('\n// Scene Colourspaces') -for spc in studio_config.getColorSpaces(): - if None == cg_config.getColorSpace(spc.getName()): - is_core = False - else: - is_core = True +for spc in ofx_config.getColorSpaces(): + is_core = colourspace_short_name(spc) in core_spaces print_colourspace(spc, is_core) print(footer) diff --git a/scripts/genOCIOConfig b/scripts/genOCIOConfig new file mode 100755 index 00000000..93fc4e24 --- /dev/null +++ b/scripts/genOCIOConfig @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 + +# Copyright OpenFX and contributors to the OpenFX project. +# SPDX-License-Identifier: BSD-3-Clause + +# Create an OCIO config equivalant to OpenFX Native colour management +# Example invocation: +# scripts/genOCIOConfig > include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio + +import PyOpenColorIO as OCIO + +ofx_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3_ocio-v2.3') + +# Workaround for OCIO issue #123, missing encoding on srgb_tx +srgb_tx = ofx_config.getColorSpace('srgb_tx') +srgb_tx.setEncoding('sdr-video') + +# Add OFX-specific roles for use in Native mode only. +# The choice of colourspaces for these roles is arbitrary. +ofx_config.setRole('sdr_video', 'rec1886_rec709_display') +ofx_config.setRole('hdr_video', 'rec2100_hlg_display') + +ofx_config.setName(f'openfx-{ofx_config.getName()}') +ofx_config.setDescription(f'OpenFX 1.5 Native Mode Config\nBased on: {ofx_config.getDescription()}') + +ofx_config.validate() # will throw if there's an error +print(ofx_config.serialize()) From 0c8339cad642818c126bebafc65b1183ee83abbd Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 10 May 2024 10:36:10 +0100 Subject: [PATCH 15/34] Reorganised core/non-core colourspaces In ofxColourspaceList.h, colourspaces are now grouped into core and non-core, rather than display and scene. The previous genColour hacked around the fact that display colourspaces were marked inactive in the ACES config. Apparently these colourspaces will become active upstream in future, so preempt that by making them active in our config. This simplifies the code in genColour. Also corrected the filename name of our OCIO config and the invocation examples for genOCIOConfig and genColour. Signed-off-by: John-Paul Smith --- include/ofxColourspaceList.h | 280 +++++++++--------- ...io-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio} | 1 - scripts/genColour | 42 ++- scripts/genOCIOConfig | 5 +- 4 files changed, 168 insertions(+), 160 deletions(-) rename include/{openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio => openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio} (99%) diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 6f8cccc1..aea37eec 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -72,7 +72,7 @@ A colourspace suitable for texture painting, typically sRGB. */ #define kOfxColourspaceRoleTexturePaint "texture_paint" -// Display Colourspaces +// Core Colourspaces // srgb_display // Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF) @@ -158,6 +158,149 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRec2100PqDisplayIsData false #define kOfxColourspaceRec2100PqDisplayIsCore true +// ACES2065-1 +// The "Academy Color Encoding System" reference colorspace. +#define kOfxColourspaceACES20651 "ACES2065-1" +#define kOfxColourspaceACES20651Label "ACES2065-1" +#define kOfxColourspaceACES20651Encoding "scene-linear" +#define kOfxColourspaceACES20651IsData false +#define kOfxColourspaceACES20651IsCore true + +// ACEScc +// Convert ACEScc to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3 +#define kOfxColourspaceACEScc "ACEScc" +#define kOfxColourspaceACESccLabel "ACEScc" +#define kOfxColourspaceACESccEncoding "log" +#define kOfxColourspaceACESccIsData false +#define kOfxColourspaceACESccIsCore true + +// ACEScct +// Convert ACEScct to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3 +#define kOfxColourspaceACEScct "ACEScct" +#define kOfxColourspaceACEScctLabel "ACEScct" +#define kOfxColourspaceACEScctEncoding "log" +#define kOfxColourspaceACEScctIsData false +#define kOfxColourspaceACEScctIsCore true + +// ACEScg +// Convert ACEScg to ACES2065-1 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3 +#define kOfxColourspaceACEScg "ACEScg" +#define kOfxColourspaceACEScgLabel "ACEScg" +#define kOfxColourspaceACEScgEncoding "scene-linear" +#define kOfxColourspaceACEScgIsData false +#define kOfxColourspaceACEScgIsCore true + +// lin_p3d65 +// Convert ACES2065-1 to linear P3 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 +#define kOfxColourspaceLinP3d65 "lin_p3d65" +#define kOfxColourspaceLinP3d65Label "Linear P3-D65" +#define kOfxColourspaceLinP3d65Encoding "scene-linear" +#define kOfxColourspaceLinP3d65IsData false +#define kOfxColourspaceLinP3d65IsCore true + +// lin_rec2020 +// Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 +#define kOfxColourspaceLinRec2020 "lin_rec2020" +#define kOfxColourspaceLinRec2020Label "Linear Rec.2020" +#define kOfxColourspaceLinRec2020Encoding "scene-linear" +#define kOfxColourspaceLinRec2020IsData false +#define kOfxColourspaceLinRec2020IsCore true + +// lin_rec709_srgb +// Convert ACES2065-1 to linear Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 +#define kOfxColourspaceLinRec709Srgb "lin_rec709_srgb" +#define kOfxColourspaceLinRec709SrgbLabel "Linear Rec.709 (sRGB)" +#define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" +#define kOfxColourspaceLinRec709SrgbIsData false +#define kOfxColourspaceLinRec709SrgbIsCore true + +// g18_rec709_tx +// Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 +#define kOfxColourspaceG18Rec709Tx "g18_rec709_tx" +#define kOfxColourspaceG18Rec709TxLabel "Gamma 1.8 Rec.709 - Texture" +#define kOfxColourspaceG18Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG18Rec709TxIsData false +#define kOfxColourspaceG18Rec709TxIsCore true + +// g22_ap1_tx +// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 +#define kOfxColourspaceG22Ap1Tx "g22_ap1_tx" +#define kOfxColourspaceG22Ap1TxLabel "Gamma 2.2 AP1 - Texture" +#define kOfxColourspaceG22Ap1TxEncoding "sdr-video" +#define kOfxColourspaceG22Ap1TxIsData false +#define kOfxColourspaceG22Ap1TxIsCore true + +// g22_rec709_tx +// Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 +#define kOfxColourspaceG22Rec709Tx "g22_rec709_tx" +#define kOfxColourspaceG22Rec709TxLabel "Gamma 2.2 Rec.709 - Texture" +#define kOfxColourspaceG22Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG22Rec709TxIsData false +#define kOfxColourspaceG22Rec709TxIsCore true + +// g24_rec709_tx +// Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 +#define kOfxColourspaceG24Rec709Tx "g24_rec709_tx" +#define kOfxColourspaceG24Rec709TxLabel "Gamma 2.4 Rec.709 - Texture" +#define kOfxColourspaceG24Rec709TxEncoding "sdr-video" +#define kOfxColourspaceG24Rec709TxIsData false +#define kOfxColourspaceG24Rec709TxIsCore true + +// srgb_encoded_ap1_tx +// Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 +#define kOfxColourspaceSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" +#define kOfxColourspaceSrgbEncodedAp1TxLabel "sRGB Encoded AP1 - Texture" +#define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" +#define kOfxColourspaceSrgbEncodedAp1TxIsData false +#define kOfxColourspaceSrgbEncodedAp1TxIsCore true + +// srgb_tx +// Convert ACES2065-1 to sRGB +// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 +#define kOfxColourspaceSrgbTx "srgb_tx" +#define kOfxColourspaceSrgbTxLabel "sRGB - Texture" +#define kOfxColourspaceSrgbTxEncoding "sdr-video" +#define kOfxColourspaceSrgbTxIsData false +#define kOfxColourspaceSrgbTxIsCore true + +// Raw +// The utility "Raw" colorspace. +#define kOfxColourspaceRaw "Raw" +#define kOfxColourspaceRawLabel "Raw" +#define kOfxColourspaceRawEncoding "" +#define kOfxColourspaceRawIsData true +#define kOfxColourspaceRawIsCore true + +// Non-core Colourspaces + +// CIE-XYZ-D65 +// The "CIE XYZ (D65)" display connection colorspace. +#define kOfxColourspaceCIEXYZD65 "CIE-XYZ-D65" +#define kOfxColourspaceCIEXYZD65Label "CIE-XYZ-D65" +#define kOfxColourspaceCIEXYZD65Encoding "" +#define kOfxColourspaceCIEXYZD65IsData false +#define kOfxColourspaceCIEXYZD65IsCore false + // st2084_p3d65_display // Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries // AMF Components @@ -217,52 +360,6 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceP3DciDisplayIsData false #define kOfxColourspaceP3DciDisplayIsCore false -// Scene Colourspaces - -// ACES2065-1 -// The "Academy Color Encoding System" reference colorspace. -#define kOfxColourspaceACES20651 "ACES2065-1" -#define kOfxColourspaceACES20651Label "ACES2065-1" -#define kOfxColourspaceACES20651Encoding "scene-linear" -#define kOfxColourspaceACES20651IsData false -#define kOfxColourspaceACES20651IsCore true - -// ACEScc -// Convert ACEScc to ACES2065-1 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3 -// AMF Components -// -------------- -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3 -#define kOfxColourspaceACEScc "ACEScc" -#define kOfxColourspaceACESccLabel "ACEScc" -#define kOfxColourspaceACESccEncoding "log" -#define kOfxColourspaceACESccIsData false -#define kOfxColourspaceACESccIsCore true - -// ACEScct -// Convert ACEScct to ACES2065-1 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3 -// AMF Components -// -------------- -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3 -#define kOfxColourspaceACEScct "ACEScct" -#define kOfxColourspaceACEScctLabel "ACEScct" -#define kOfxColourspaceACEScctEncoding "log" -#define kOfxColourspaceACEScctIsData false -#define kOfxColourspaceACEScctIsCore true - -// ACEScg -// Convert ACEScg to ACES2065-1 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3 -// AMF Components -// -------------- -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3 -#define kOfxColourspaceACEScg "ACEScg" -#define kOfxColourspaceACEScgLabel "ACEScg" -#define kOfxColourspaceACEScgEncoding "scene-linear" -#define kOfxColourspaceACEScgIsData false -#define kOfxColourspaceACEScgIsCore true - // ADX10 // Convert ADX10 to ACES2065-1 // ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3 @@ -551,78 +648,6 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceCameraRec709IsData false #define kOfxColourspaceCameraRec709IsCore false -// lin_p3d65 -// Convert ACES2065-1 to linear P3 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0 -#define kOfxColourspaceLinP3d65 "lin_p3d65" -#define kOfxColourspaceLinP3d65Label "Linear P3-D65" -#define kOfxColourspaceLinP3d65Encoding "scene-linear" -#define kOfxColourspaceLinP3d65IsData false -#define kOfxColourspaceLinP3d65IsCore true - -// lin_rec2020 -// Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0 -#define kOfxColourspaceLinRec2020 "lin_rec2020" -#define kOfxColourspaceLinRec2020Label "Linear Rec.2020" -#define kOfxColourspaceLinRec2020Encoding "scene-linear" -#define kOfxColourspaceLinRec2020IsData false -#define kOfxColourspaceLinRec2020IsCore true - -// lin_rec709_srgb -// Convert ACES2065-1 to linear Rec.709 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0 -#define kOfxColourspaceLinRec709Srgb "lin_rec709_srgb" -#define kOfxColourspaceLinRec709SrgbLabel "Linear Rec.709 (sRGB)" -#define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" -#define kOfxColourspaceLinRec709SrgbIsData false -#define kOfxColourspaceLinRec709SrgbIsCore true - -// g18_rec709_tx -// Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0 -#define kOfxColourspaceG18Rec709Tx "g18_rec709_tx" -#define kOfxColourspaceG18Rec709TxLabel "Gamma 1.8 Rec.709 - Texture" -#define kOfxColourspaceG18Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG18Rec709TxIsData false -#define kOfxColourspaceG18Rec709TxIsCore true - -// g22_ap1_tx -// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0 -#define kOfxColourspaceG22Ap1Tx "g22_ap1_tx" -#define kOfxColourspaceG22Ap1TxLabel "Gamma 2.2 AP1 - Texture" -#define kOfxColourspaceG22Ap1TxEncoding "sdr-video" -#define kOfxColourspaceG22Ap1TxIsData false -#define kOfxColourspaceG22Ap1TxIsCore true - -// g22_rec709_tx -// Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0 -#define kOfxColourspaceG22Rec709Tx "g22_rec709_tx" -#define kOfxColourspaceG22Rec709TxLabel "Gamma 2.2 Rec.709 - Texture" -#define kOfxColourspaceG22Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG22Rec709TxIsData false -#define kOfxColourspaceG22Rec709TxIsCore true - -// g24_rec709_tx -// Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0 -#define kOfxColourspaceG24Rec709Tx "g24_rec709_tx" -#define kOfxColourspaceG24Rec709TxLabel "Gamma 2.4 Rec.709 - Texture" -#define kOfxColourspaceG24Rec709TxEncoding "sdr-video" -#define kOfxColourspaceG24Rec709TxIsData false -#define kOfxColourspaceG24Rec709TxIsCore true - -// srgb_encoded_ap1_tx -// Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0 -#define kOfxColourspaceSrgbEncodedAp1Tx "srgb_encoded_ap1_tx" -#define kOfxColourspaceSrgbEncodedAp1TxLabel "sRGB Encoded AP1 - Texture" -#define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" -#define kOfxColourspaceSrgbEncodedAp1TxIsData false -#define kOfxColourspaceSrgbEncodedAp1TxIsCore true - // srgb_encoded_p3d65_tx // Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point // CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_P3-D65-Texture:1.0 @@ -632,23 +657,6 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSrgbEncodedP3d65TxIsData false #define kOfxColourspaceSrgbEncodedP3d65TxIsCore false -// srgb_tx -// Convert ACES2065-1 to sRGB -// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0 -#define kOfxColourspaceSrgbTx "srgb_tx" -#define kOfxColourspaceSrgbTxLabel "sRGB - Texture" -#define kOfxColourspaceSrgbTxEncoding "sdr-video" -#define kOfxColourspaceSrgbTxIsData false -#define kOfxColourspaceSrgbTxIsCore true - -// Raw -// The utility "Raw" colorspace. -#define kOfxColourspaceRaw "Raw" -#define kOfxColourspaceRawLabel "Raw" -#define kOfxColourspaceRawEncoding "" -#define kOfxColourspaceRawIsData true -#define kOfxColourspaceRawIsCore true - #ifdef __cplusplus } #endif diff --git a/include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio b/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio similarity index 99% rename from include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio rename to include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio index 39780a1e..24a18e1b 100644 --- a/include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio +++ b/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio @@ -82,7 +82,6 @@ displays: active_displays: [sRGB - Display, Display P3 - Display, Rec.1886 Rec.709 - Display, Rec.1886 Rec.2020 - Display, Rec.2100-HLG - Display, Rec.2100-PQ - Display, ST2084-P3-D65 - Display, P3-D60 - Display, P3-D65 - Display, P3-DCI - Display] active_views: [ACES 1.0 - SDR Video, ACES 1.0 - SDR Video (D60 sim on D65), ACES 1.1 - SDR Video (P3 lim), ACES 1.1 - SDR Video (Rec.709 lim), "ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (2000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (4000 nits & Rec.2020 lim)", "ACES 1.1 - HDR Video (1000 nits & P3 lim)", "ACES 1.1 - HDR Video (2000 nits & P3 lim)", "ACES 1.1 - HDR Video (4000 nits & P3 lim)", ACES 1.0 - SDR Cinema, ACES 1.1 - SDR Cinema (Rec.709 lim), ACES 1.0 - SDR Cinema (D60 sim on DCI), ACES 1.1 - SDR Cinema (D60 sim on D65), ACES 1.1 - SDR Cinema (D65 sim on DCI), "ACES 1.1 - HDR Cinema (108 nits & P3 lim)", Un-tone-mapped, Raw] -inactive_colorspaces: [CIE-XYZ-D65, sRGB - Display, Display P3 - Display, Rec.1886 Rec.709 - Display, Rec.1886 Rec.2020 - Display, Rec.2100-HLG - Display, Rec.2100-PQ - Display, ST2084-P3-D65 - Display, P3-D60 - Display, P3-D65 - Display, P3-DCI - Display] looks: - ! diff --git a/scripts/genColour b/scripts/genColour index 943a14f6..cd86272d 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -5,8 +5,9 @@ # Extract information from an OCIO config to C header. # Example invocation: -# OCIO=include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1 scripts/genColour > include/ofxColourspaceList.h +# OCIO=include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio scripts/genColour > include/ofxColourspaceList.h +import sys import PyOpenColorIO as OCIO from string import Template @@ -81,18 +82,6 @@ def print_list(name, list): name_list = '{ "' + '", "'.join(list) + '" }' print(f'{define_base}{camel_name(name)}List {name_list}') -# This should be the OpenFX OCIO config created by genOCIOConfig -ofx_config = OCIO.GetCurrentConfig() - -# OFX-specific set of core colourspaces -core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', - 'ACES2065-1', 'ACEScc', 'ACEScct', - 'ACEScg', 'lin_p3d65', 'lin_rec2020', - 'lin_rec709_srgb', 'g18_rec709_tx', 'g22_ap1_tx', - 'g22_rec709_tx', 'g24_rec709_tx', 'srgb_encoded_ap1_tx', - 'srg_encoded_p3d65_tx', 'srgb_tx', 'Raw', - 'rec1886_rec2020_display', 'rec2100_hlg_display', 'rec2100_pq_display'] - def print_colourspace(spc, is_core): name = colourspace_short_name(spc) display_name = spc.getName() @@ -102,6 +91,18 @@ def print_colourspace(spc, is_core): print_string_property(name, 'Encoding', spc.getEncoding()) print_bool_property(name, 'Data', spc.isData()) print_bool_property(name, 'Core', is_core) + +# OFX-specific set of core colourspaces +core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', + 'ACES2065-1', 'ACEScc', 'ACEScct', + 'ACEScg', 'lin_p3d65', 'lin_rec2020', + 'lin_rec709_srgb', 'g18_rec709_tx', 'g22_ap1_tx', + 'g22_rec709_tx', 'g24_rec709_tx', 'srgb_encoded_ap1_tx', + 'srg_encoded_p3d65_tx', 'srgb_tx', 'Raw', + 'rec1886_rec2020_display', 'rec2100_hlg_display', 'rec2100_pq_display'] + +# This should be the OpenFX OCIO config created by genOCIOConfig +ofx_config = OCIO.GetCurrentConfig() print(Template(header).substitute(config_name=ofx_config.getName())) @@ -112,15 +113,12 @@ Use a role when the specific colourspace is not important. for role in ofx_config.getRoles(): print_role(role) -print('\n// Display Colourspaces') -for display in ofx_config.getDisplays(): - name = ofx_config.getColorSpace(display) - is_core = colourspace_short_name(name) in core_spaces - print_colourspace(name, is_core) +print('\n// Core Colourspaces') +for core_spc in [spc for spc in ofx_config.getColorSpaces() if colourspace_short_name(spc) in core_spaces]: + print_colourspace(core_spc, True) -print('\n// Scene Colourspaces') -for spc in ofx_config.getColorSpaces(): - is_core = colourspace_short_name(spc) in core_spaces - print_colourspace(spc, is_core) +print('\n// Non-core Colourspaces') +for other_spc in [spc for spc in ofx_config.getColorSpaces() if colourspace_short_name(spc) not in core_spaces]: + print_colourspace(other_spc, False) print(footer) diff --git a/scripts/genOCIOConfig b/scripts/genOCIOConfig index 93fc4e24..04660899 100755 --- a/scripts/genOCIOConfig +++ b/scripts/genOCIOConfig @@ -5,7 +5,7 @@ # Create an OCIO config equivalant to OpenFX Native colour management # Example invocation: -# scripts/genOCIOConfig > include/openfx-studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio +# scripts/genOCIOConfig > include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio import PyOpenColorIO as OCIO @@ -20,6 +20,9 @@ srgb_tx.setEncoding('sdr-video') ofx_config.setRole('sdr_video', 'rec1886_rec709_display') ofx_config.setRole('hdr_video', 'rec2100_hlg_display') +# Make all colourspaces active, future OCIO configs will also do this +ofx_config.setInactiveColorSpaces('') + ofx_config.setName(f'openfx-{ofx_config.getName()}') ofx_config.setDescription(f'OpenFX 1.5 Native Mode Config\nBased on: {ofx_config.getDescription()}') From 8e06771f9fc3e757ccef1a3ed456b54766937cff Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 4 Jun 2024 13:40:34 +0100 Subject: [PATCH 16/34] Colourspace cross-referencing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OfxImageClipPropColourspace and OfxImageClipPropPreferredColourspaces now accept special strings of the form “OfxColourspace_. This allows for cross-referencing between different clips to ensure consistency across multiple inputs and from input to output. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index 0c1cda61..24b7c40f 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -28,9 +28,10 @@ Plug-ins should set this property if they can use host-provided colourspace information. OCIO is used as the reference for the colour management API, but is not required to implement the Native style. -The colourspace strings used in the Native style are from: -https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases/download/v1.0.0/studio-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio -and stored for OFX purposes in ofxColourspaceList.h. +The colourspace strings used in the Native style are from +openfx-studio-config-v2.1.0_acces-v1.3_ocio-v2.3.ocio +and stored for OFX purposes in ofxColourspaceList.h. Additionally, there is +a scheme for cross-referencing between clips. The assumption is that OCIO > Native so the highest style supported by both host and plug-in will be chosen. @@ -70,11 +71,19 @@ mode. Hosts should set this property to the colourspace of the input clip. Typically it will be set to the working colourspace of the host but could be any valid colourspace. + Plug-ins may set this property on an output clip. Plug-ins which output motion vectors or similar images which should not be colour managed can use the data colourspace which is present in the built-in OCIO configs. + Both host and plug-in should use the value of kOfxImageClipPropPreferredColourspace where reasonable. + +Cross-referencing between clips is possible by setting this property to +"OfxColourspace_". For example a plug-in may set this property on its +output clip to "OfxColourspace_Source", telling the host that the colourspace +of the output matches the input. + If a clip sets OfxImageClipPropIsMask or it only supports OfxImageComponentAlpha, colour management is disabled and this property must be unset. @@ -121,6 +130,13 @@ assert that preference and the host to honour it if possible. However, if a plug-in is capable of adapting to any input colourspace, it should not set this preference. +Cross-referencing between clips is possible by setting this property to +"OfxColourspace_". For example a plug-in may set this property on a +second input clip to "OfxColourspace_Source" to tell the host it would like +both input clips to be in the same colourspace. A host might set the same +thing on the plug-in's output clip to request that the plug-in outputs the +same colourspace as the input. + If a plug-in has inputs which contain motion vectors, depth values or other non-colour channels, it should set the preferred colourspace to kOfxColourspaceRaw. Similarly, if a host requests outputs in a typical scene From ce4acf19701028c0ebd1c78b98fac885ba7e90c2 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 4 Jun 2024 14:07:49 +0100 Subject: [PATCH 17/34] Full, Basic and Core colour management styles To simplify development for plug-ins which have simple colour management requirements, this commit introduces Basic (roles only) and Core (roles + core colourspaces) colour management styles. Native has been renamed to Full and now the term native is used to refer to all three of these styles. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index 24b7c40f..f39dc635 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -19,29 +19,37 @@ Contains the API for colourspace data exchange. - Default - kOfxImageEffectPropColourManagementStyleNone - Valid Values - This must be one of - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementNative - colourspaces from the OCIO built-in ACES Studio config are available (see ofxColourspaceList.h) + - ::kOfxImageEffectPropColourManagementBasic - only roles from see ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementCore - only roles and core colourspaces from ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementFull - any role or colourspace from ofxColourspaceList.h may be used - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) Hosts should set this property if they will provide colourspace information to plug-ins. Plug-ins should set this property if they can use host-provided colourspace -information. OCIO is used as the reference for the colour management API, but -is not required to implement the Native style. +information. +Collectively, the full, core and basic styles are referred to as native +colour management. OCIO is used as the reference for the colour management +API, but is not required to implement the native styles. -The colourspace strings used in the Native style are from +The colourspace strings used in the native styles are from openfx-studio-config-v2.1.0_acces-v1.3_ocio-v2.3.ocio and stored for OFX purposes in ofxColourspaceList.h. Additionally, there is a scheme for cross-referencing between clips. -The assumption is that OCIO > Native so the highest style supported by -both host and plug-in will be chosen. +The assumption is that OCIO > Full > Core > Basic, so the highest style +supported by both host and plug-in will be chosen. */ #define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" /* String used to indicate that no colour management is available. */ #define kOfxImageEffectPropColourManagementNone "OfxImageEffectPropColourManagementNone" -/* String used to indicate that Native colour management is available. */ -#define kOfxImageEffectPropColourManagementNative "OfxImageEffectPropColourManagementNative" +/* String used to indicate that basic colour management is available. */ +#define kOfxImageEffectPropColourManagementBasic "OfxImageEffectPropColourManagementBasic" +/* String used to indicate that core colour management is available. */ +#define kOfxImageEffectPropColourManagementCore "OfxImageEffectPropColourManagementCore" +/* String used to indicate that Full colour management is available. */ +#define kOfxImageEffectPropColourManagementFull "OfxImageEffectPropColourManagementFull" /* String used to indicate that OCIO colour management is available. */ #define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" @@ -55,10 +63,10 @@ A host must set this property on any effect instances where it has negotiated OCIO colour management (kOfxImageEffectPropColourManagementOCIO). Use of URIs for built-in configs, such as ocio://default is permitted. -When native colour management is in use, a host must set this property to point -to the OCIO config used to define strings for the version of OFX it was built -against. This will allow a plug-in which uses OCIO to work directly with native -mode. +When native colour management is in use, a host must set this +property to point to the OCIO config used to define strings for the version of +OFX it was built against. This will allow a plug-in which uses OCIO to work +directly with native styles. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" @@ -95,8 +103,10 @@ must be unset. - Type - string X N - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is permitted under the style in use. - For Native, this any scene colourspace or role from ofxColourspaceList.h. - For OCIO, this could be any string acceptable to Config::getColorSpace(). + For Basic, this any role from ofxColourspaceList.h. + For Core, any role, or any colourspace from ofxColourspaceList.h where IsCore is true. + For Full, any colourspace or role from ofxColourspaceList.h. + For OCIO, any string acceptable to Config::getColorSpace(). Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences to request images in a colourspace which is convenient for them. The @@ -149,9 +159,9 @@ the request and set kOfxImageClipPropColourspace to kOfxColourspaceRaw. - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - colourspace from the Display Colorspaces section of ofxColourspaceList.h + - Valid Values - any ofxColourspaceList.h -Used with the Native colour management style, this property is relevant +Used with native colour management styles, this property is relevant for plug-ins which have their own viewport in a custom window. Plug-ins should not expect this to be available during a render event. Hosts should set this property to a display colourspace which matches that From a7680982f03f2d24d632eea12af62dc5cb69f13d Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 4 Jun 2024 15:22:03 +0100 Subject: [PATCH 18/34] Corrections from code review Signed-off-by: John-Paul Smith --- include/ofxColour.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index f39dc635..ecbc2b34 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -19,7 +19,7 @@ Contains the API for colourspace data exchange. - Default - kOfxImageEffectPropColourManagementStyleNone - Valid Values - This must be one of - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementBasic - only roles from see ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementBasic - only roles from ofxColourspaceList.h may be used - ::kOfxImageEffectPropColourManagementCore - only roles and core colourspaces from ofxColourspaceList.h may be used - ::kOfxImageEffectPropColourManagementFull - any role or colourspace from ofxColourspaceList.h may be used - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) @@ -103,7 +103,7 @@ must be unset. - Type - string X N - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is permitted under the style in use. - For Basic, this any role from ofxColourspaceList.h. + For Basic, any role from ofxColourspaceList.h. For Core, any role, or any colourspace from ofxColourspaceList.h where IsCore is true. For Full, any colourspace or role from ofxColourspaceList.h. For OCIO, any string acceptable to Config::getColorSpace(). @@ -159,7 +159,7 @@ the request and set kOfxImageClipPropColourspace to kOfxColourspaceRaw. - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - any ofxColourspaceList.h + - Valid Values - any colourspace from ofxColourspaceList.h Used with native colour management styles, this property is relevant for plug-ins which have their own viewport in a custom window. Plug-ins should From 01a3ca84ff8a2e91fd7efc04585bd8deaf1b1b2a Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 2 Jul 2024 00:40:58 +0100 Subject: [PATCH 19/34] Added basic colourspaces instead of roles Basic colour management mode no longer refers to roles and instead uses a small set of OFX-specific colourspace names which should cover most scenarios. These are defined in OCIO using roles for compatibility purposes, but in OFX, the expectation is that these might correspond to any colourspace that has the same encoding. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 20 +- include/ofxColourspaceList.h | 249 ++++++++++++++---- ...dio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio | 7 +- scripts/genColour | 50 ++-- scripts/genOCIOConfig | 12 +- 5 files changed, 258 insertions(+), 80 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index ecbc2b34..f773c392 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -19,9 +19,9 @@ Contains the API for colourspace data exchange. - Default - kOfxImageEffectPropColourManagementStyleNone - Valid Values - This must be one of - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementBasic - only roles from ofxColourspaceList.h may be used - - ::kOfxImageEffectPropColourManagementCore - only roles and core colourspaces from ofxColourspaceList.h may be used - - ::kOfxImageEffectPropColourManagementFull - any role or colourspace from ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementBasic - only basic colourspaces from ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementCore - only core colourspaces from ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementFull - any colourspace from ofxColourspaceList.h may be used - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) Hosts should set this property if they will provide colourspace information @@ -103,20 +103,20 @@ must be unset. - Type - string X N - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is permitted under the style in use. - For Basic, any role from ofxColourspaceList.h. - For Core, any role, or any colourspace from ofxColourspaceList.h where IsCore is true. - For Full, any colourspace or role from ofxColourspaceList.h. + For Basic, any colourspace from ofxColourspaceList.h where IsBasic is true. + For Core, any colourspace from ofxColourspaceList.h where IsCore is true. + For Full, any colourspace from ofxColourspaceList.h. For OCIO, any string acceptable to Config::getColorSpace(). Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences to request images in a colourspace which is convenient for them. The property is an ordered set of colourspace identifiers, which may be any of the names or aliases supported by the colour management style in use. If plug-ins -prefer more esoteric colourspaces, they are encouraged to also include generic -roles as a fallback. For example a colour grading plug-in which supports a -specific camera and expects a log colourspace might list: +prefer more esoteric colourspaces, they are encouraged to also include basic +colourspacesas a fallback. For example a colour grading plug-in which supports +a specific camera and expects a log colourspace might list: -"arri_logc4", "arri_logc3_ei800", "ACEScct", "color_timing" +"arri_logc4", "arri_logc3_ei800", "ACEScct", "ofx_log" The host is free to choose any colourspace from this list, but should favour the first mutually agreeable colourspace, and set kOfxImageClipPropColourspace diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index aea37eec..5830ed5b 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -13,64 +13,63 @@ Contains the list of supported colourspaces. This file was auto-generated by scripts/genColour from openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3. */ -/** @brief Roles - generic names for types of colourspace -Use a role when the specific colourspace is not important. -*/ - -/** @brief aces_interchange -Guaranteed to be ACES2065-1. -*/ -#define kOfxColourspaceRoleAcesInterchange "aces_interchange" -/** @brief cie_xyz_d65_interchange -CIE XYZ colorimetry with the neutral axis at D65. -*/ -#define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange" +// Basic Colourspaces -/** @brief color_picking -The colourspace to use for colour pickers, typically a display colourspace. +/** @brief ofx_hdr +Any display-referred HDR video such as Rec. 2020 HLG or PQ. */ -#define kOfxColourspaceRoleColorPicking "color_picking" - -/** @brief color_timing -A colourspace suitable for colour grading, typically a log colourspace. +#define kOfxColourspaceOfxHdr "ofx_hdr" +#define kOfxColourspaceOfxHdrLabel "ofx_hdr" +#define kOfxColourspaceOfxHdrEncoding "hdr-video" +#define kOfxColourspaceOfxHdrIsData false +#define kOfxColourspaceOfxHdrIsBasic true +#define kOfxColourspaceOfxHdrIsCore true +#define kOfxColourspaceOfxHdrIsDisplay true + +/** @brief ofx_linear +Any scene-referred linear colourspace. */ -#define kOfxColourspaceRoleColorTiming "color_timing" - -/** @brief compositing_log +#define kOfxColourspaceOfxLinear "ofx_linear" +#define kOfxColourspaceOfxLinearLabel "ofx_linear" +#define kOfxColourspaceOfxLinearEncoding "scene-linear" +#define kOfxColourspaceOfxLinearIsData false +#define kOfxColourspaceOfxLinearIsBasic true +#define kOfxColourspaceOfxLinearIsCore true +#define kOfxColourspaceOfxLinearIsDisplay false + +/** @brief ofx_log Any colourspace with a log transfer function. */ -#define kOfxColourspaceRoleCompositingLog "compositing_log" - -/** @brief data -Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace. -*/ -#define kOfxColourspaceRoleData "data" - -/** @brief hdr_video -Any display-referred HDR video such as Rec. 2020 HLG or PQ. -*/ -#define kOfxColourspaceRoleHdrVideo "hdr_video" - -/** @brief matte_paint -A colourspace suitable for matte painting. +#define kOfxColourspaceOfxLog "ofx_log" +#define kOfxColourspaceOfxLogLabel "ofx_log" +#define kOfxColourspaceOfxLogEncoding "log" +#define kOfxColourspaceOfxLogIsData false +#define kOfxColourspaceOfxLogIsBasic true +#define kOfxColourspaceOfxLogIsCore true +#define kOfxColourspaceOfxLogIsDisplay false + +/** @brief ofx_raw +Image values should not be treated as colour, e.g. motion vectors or masks. */ -#define kOfxColourspaceRoleMattePaint "matte_paint" - -/** @brief scene_linear -Any scene-referred linear colourspace. -*/ -#define kOfxColourspaceRoleSceneLinear "scene_linear" - -/** @brief sdr_video +#define kOfxColourspaceOfxRaw "ofx_raw" +#define kOfxColourspaceOfxRawLabel "ofx_raw" +#define kOfxColourspaceOfxRawEncoding "" +#define kOfxColourspaceOfxRawIsData true +#define kOfxColourspaceOfxRawIsBasic true +#define kOfxColourspaceOfxRawIsCore true +#define kOfxColourspaceOfxRawIsDisplay false + +/** @brief ofx_sdr Any display-referred SDR video such as Rec. 709. */ -#define kOfxColourspaceRoleSdrVideo "sdr_video" - -/** @brief texture_paint -A colourspace suitable for texture painting, typically sRGB. -*/ -#define kOfxColourspaceRoleTexturePaint "texture_paint" +#define kOfxColourspaceOfxSdr "ofx_sdr" +#define kOfxColourspaceOfxSdrLabel "ofx_sdr" +#define kOfxColourspaceOfxSdrEncoding "sdr-video" +#define kOfxColourspaceOfxSdrIsData false +#define kOfxColourspaceOfxSdrIsBasic true +#define kOfxColourspaceOfxSdrIsCore true +#define kOfxColourspaceOfxSdrIsDisplay true // Core Colourspaces @@ -86,7 +85,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSrgbDisplayLabel "sRGB - Display" #define kOfxColourspaceSrgbDisplayEncoding "sdr-video" #define kOfxColourspaceSrgbDisplayIsData false +#define kOfxColourspaceSrgbDisplayIsBasic false #define kOfxColourspaceSrgbDisplayIsCore true +#define kOfxColourspaceSrgbDisplayIsDisplay true // displayp3_display // Convert CIE XYZ (D65 white) to Apple Display P3 @@ -100,7 +101,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceDisplayp3DisplayLabel "Display P3 - Display" #define kOfxColourspaceDisplayp3DisplayEncoding "sdr-video" #define kOfxColourspaceDisplayp3DisplayIsData false +#define kOfxColourspaceDisplayp3DisplayIsBasic false #define kOfxColourspaceDisplayp3DisplayIsCore true +#define kOfxColourspaceDisplayp3DisplayIsDisplay true // rec1886_rec709_display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video) @@ -114,7 +117,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRec1886Rec709DisplayLabel "Rec.1886 Rec.709 - Display" #define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video" #define kOfxColourspaceRec1886Rec709DisplayIsData false +#define kOfxColourspaceRec1886Rec709DisplayIsBasic false #define kOfxColourspaceRec1886Rec709DisplayIsCore true +#define kOfxColourspaceRec1886Rec709DisplayIsDisplay true // rec1886_rec2020_display // Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video) @@ -128,7 +133,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRec1886Rec2020DisplayLabel "Rec.1886 Rec.2020 - Display" #define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video" #define kOfxColourspaceRec1886Rec2020DisplayIsData false +#define kOfxColourspaceRec1886Rec2020DisplayIsBasic false #define kOfxColourspaceRec1886Rec2020DisplayIsCore true +#define kOfxColourspaceRec1886Rec2020DisplayIsDisplay true // rec2100_hlg_display // Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit @@ -140,7 +147,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRec2100HlgDisplayLabel "Rec.2100-HLG - Display" #define kOfxColourspaceRec2100HlgDisplayEncoding "hdr-video" #define kOfxColourspaceRec2100HlgDisplayIsData false +#define kOfxColourspaceRec2100HlgDisplayIsBasic false #define kOfxColourspaceRec2100HlgDisplayIsCore true +#define kOfxColourspaceRec2100HlgDisplayIsDisplay true // rec2100_pq_display // Convert CIE XYZ (D65 white) to Rec.2100-PQ @@ -156,7 +165,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRec2100PqDisplayLabel "Rec.2100-PQ - Display" #define kOfxColourspaceRec2100PqDisplayEncoding "hdr-video" #define kOfxColourspaceRec2100PqDisplayIsData false +#define kOfxColourspaceRec2100PqDisplayIsBasic false #define kOfxColourspaceRec2100PqDisplayIsCore true +#define kOfxColourspaceRec2100PqDisplayIsDisplay true // ACES2065-1 // The "Academy Color Encoding System" reference colorspace. @@ -164,7 +175,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceACES20651Label "ACES2065-1" #define kOfxColourspaceACES20651Encoding "scene-linear" #define kOfxColourspaceACES20651IsData false +#define kOfxColourspaceACES20651IsBasic false #define kOfxColourspaceACES20651IsCore true +#define kOfxColourspaceACES20651IsDisplay false // ACEScc // Convert ACEScc to ACES2065-1 @@ -176,7 +189,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceACESccLabel "ACEScc" #define kOfxColourspaceACESccEncoding "log" #define kOfxColourspaceACESccIsData false +#define kOfxColourspaceACESccIsBasic false #define kOfxColourspaceACESccIsCore true +#define kOfxColourspaceACESccIsDisplay false // ACEScct // Convert ACEScct to ACES2065-1 @@ -188,7 +203,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceACEScctLabel "ACEScct" #define kOfxColourspaceACEScctEncoding "log" #define kOfxColourspaceACEScctIsData false +#define kOfxColourspaceACEScctIsBasic false #define kOfxColourspaceACEScctIsCore true +#define kOfxColourspaceACEScctIsDisplay false // ACEScg // Convert ACEScg to ACES2065-1 @@ -200,7 +217,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceACEScgLabel "ACEScg" #define kOfxColourspaceACEScgEncoding "scene-linear" #define kOfxColourspaceACEScgIsData false +#define kOfxColourspaceACEScgIsBasic false #define kOfxColourspaceACEScgIsCore true +#define kOfxColourspaceACEScgIsDisplay false // lin_p3d65 // Convert ACES2065-1 to linear P3 primaries, D65 white point @@ -209,7 +228,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinP3d65Label "Linear P3-D65" #define kOfxColourspaceLinP3d65Encoding "scene-linear" #define kOfxColourspaceLinP3d65IsData false +#define kOfxColourspaceLinP3d65IsBasic false #define kOfxColourspaceLinP3d65IsCore true +#define kOfxColourspaceLinP3d65IsDisplay false // lin_rec2020 // Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point @@ -218,7 +239,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinRec2020Label "Linear Rec.2020" #define kOfxColourspaceLinRec2020Encoding "scene-linear" #define kOfxColourspaceLinRec2020IsData false +#define kOfxColourspaceLinRec2020IsBasic false #define kOfxColourspaceLinRec2020IsCore true +#define kOfxColourspaceLinRec2020IsDisplay false // lin_rec709_srgb // Convert ACES2065-1 to linear Rec.709 primaries, D65 white point @@ -227,7 +250,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinRec709SrgbLabel "Linear Rec.709 (sRGB)" #define kOfxColourspaceLinRec709SrgbEncoding "scene-linear" #define kOfxColourspaceLinRec709SrgbIsData false +#define kOfxColourspaceLinRec709SrgbIsBasic false #define kOfxColourspaceLinRec709SrgbIsCore true +#define kOfxColourspaceLinRec709SrgbIsDisplay false // g18_rec709_tx // Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point @@ -236,7 +261,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceG18Rec709TxLabel "Gamma 1.8 Rec.709 - Texture" #define kOfxColourspaceG18Rec709TxEncoding "sdr-video" #define kOfxColourspaceG18Rec709TxIsData false +#define kOfxColourspaceG18Rec709TxIsBasic false #define kOfxColourspaceG18Rec709TxIsCore true +#define kOfxColourspaceG18Rec709TxIsDisplay false // g22_ap1_tx // Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point @@ -245,7 +272,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceG22Ap1TxLabel "Gamma 2.2 AP1 - Texture" #define kOfxColourspaceG22Ap1TxEncoding "sdr-video" #define kOfxColourspaceG22Ap1TxIsData false +#define kOfxColourspaceG22Ap1TxIsBasic false #define kOfxColourspaceG22Ap1TxIsCore true +#define kOfxColourspaceG22Ap1TxIsDisplay false // g22_rec709_tx // Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point @@ -254,7 +283,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceG22Rec709TxLabel "Gamma 2.2 Rec.709 - Texture" #define kOfxColourspaceG22Rec709TxEncoding "sdr-video" #define kOfxColourspaceG22Rec709TxIsData false +#define kOfxColourspaceG22Rec709TxIsBasic false #define kOfxColourspaceG22Rec709TxIsCore true +#define kOfxColourspaceG22Rec709TxIsDisplay false // g24_rec709_tx // Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point @@ -263,7 +294,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceG24Rec709TxLabel "Gamma 2.4 Rec.709 - Texture" #define kOfxColourspaceG24Rec709TxEncoding "sdr-video" #define kOfxColourspaceG24Rec709TxIsData false +#define kOfxColourspaceG24Rec709TxIsBasic false #define kOfxColourspaceG24Rec709TxIsCore true +#define kOfxColourspaceG24Rec709TxIsDisplay false // srgb_encoded_ap1_tx // Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point @@ -272,7 +305,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSrgbEncodedAp1TxLabel "sRGB Encoded AP1 - Texture" #define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video" #define kOfxColourspaceSrgbEncodedAp1TxIsData false +#define kOfxColourspaceSrgbEncodedAp1TxIsBasic false #define kOfxColourspaceSrgbEncodedAp1TxIsCore true +#define kOfxColourspaceSrgbEncodedAp1TxIsDisplay false // srgb_tx // Convert ACES2065-1 to sRGB @@ -281,7 +316,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSrgbTxLabel "sRGB - Texture" #define kOfxColourspaceSrgbTxEncoding "sdr-video" #define kOfxColourspaceSrgbTxIsData false +#define kOfxColourspaceSrgbTxIsBasic false #define kOfxColourspaceSrgbTxIsCore true +#define kOfxColourspaceSrgbTxIsDisplay false // Raw // The utility "Raw" colorspace. @@ -289,7 +326,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceRawLabel "Raw" #define kOfxColourspaceRawEncoding "" #define kOfxColourspaceRawIsData true +#define kOfxColourspaceRawIsBasic false #define kOfxColourspaceRawIsCore true +#define kOfxColourspaceRawIsDisplay false // Non-core Colourspaces @@ -299,7 +338,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceCIEXYZD65Label "CIE-XYZ-D65" #define kOfxColourspaceCIEXYZD65Encoding "" #define kOfxColourspaceCIEXYZD65IsData false +#define kOfxColourspaceCIEXYZD65IsBasic false #define kOfxColourspaceCIEXYZD65IsCore false +#define kOfxColourspaceCIEXYZD65IsDisplay true // st2084_p3d65_display // Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries @@ -317,7 +358,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSt2084P3d65DisplayLabel "ST2084-P3-D65 - Display" #define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video" #define kOfxColourspaceSt2084P3d65DisplayIsData false +#define kOfxColourspaceSt2084P3d65DisplayIsBasic false #define kOfxColourspaceSt2084P3d65DisplayIsCore false +#define kOfxColourspaceSt2084P3d65DisplayIsDisplay true // p3d60_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) @@ -329,7 +372,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceP3d60DisplayLabel "P3-D60 - Display" #define kOfxColourspaceP3d60DisplayEncoding "sdr-video" #define kOfxColourspaceP3d60DisplayIsData false +#define kOfxColourspaceP3d60DisplayIsBasic false #define kOfxColourspaceP3d60DisplayIsCore false +#define kOfxColourspaceP3d60DisplayIsDisplay true // p3d65_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 @@ -344,7 +389,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceP3d65DisplayLabel "P3-D65 - Display" #define kOfxColourspaceP3d65DisplayEncoding "sdr-video" #define kOfxColourspaceP3d65DisplayIsData false +#define kOfxColourspaceP3d65DisplayIsBasic false #define kOfxColourspaceP3d65DisplayIsCore false +#define kOfxColourspaceP3d65DisplayIsDisplay true // p3_dci_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) @@ -358,7 +405,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceP3DciDisplayLabel "P3-DCI - Display" #define kOfxColourspaceP3DciDisplayEncoding "sdr-video" #define kOfxColourspaceP3DciDisplayIsData false +#define kOfxColourspaceP3DciDisplayIsBasic false #define kOfxColourspaceP3DciDisplayIsCore false +#define kOfxColourspaceP3DciDisplayIsDisplay true // ADX10 // Convert ADX10 to ACES2065-1 @@ -367,7 +416,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceADX10Label "ADX10" #define kOfxColourspaceADX10Encoding "log" #define kOfxColourspaceADX10IsData false +#define kOfxColourspaceADX10IsBasic false #define kOfxColourspaceADX10IsCore false +#define kOfxColourspaceADX10IsDisplay false // ADX16 // Convert ADX16 to ACES2065-1 @@ -376,7 +427,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceADX16Label "ADX16" #define kOfxColourspaceADX16Encoding "log" #define kOfxColourspaceADX16IsData false +#define kOfxColourspaceADX16IsBasic false #define kOfxColourspaceADX16IsCore false +#define kOfxColourspaceADX16IsDisplay false // lin_arri_wide_gamut_3 // Convert Linear ARRI Wide Gamut 3 to ACES2065-1 @@ -385,7 +438,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinArriWideGamut3Label "Linear ARRI Wide Gamut 3" #define kOfxColourspaceLinArriWideGamut3Encoding "scene-linear" #define kOfxColourspaceLinArriWideGamut3IsData false +#define kOfxColourspaceLinArriWideGamut3IsBasic false #define kOfxColourspaceLinArriWideGamut3IsCore false +#define kOfxColourspaceLinArriWideGamut3IsDisplay false // arri_logc3_ei800 // Convert ARRI LogC3 (EI800) to ACES2065-1 @@ -399,7 +454,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceArriLogc3Ei800Label "ARRI LogC3 (EI800)" #define kOfxColourspaceArriLogc3Ei800Encoding "log" #define kOfxColourspaceArriLogc3Ei800IsData false +#define kOfxColourspaceArriLogc3Ei800IsBasic false #define kOfxColourspaceArriLogc3Ei800IsCore false +#define kOfxColourspaceArriLogc3Ei800IsDisplay false // lin_arri_wide_gamut_4 // Convert Linear ARRI Wide Gamut 4 to ACES2065-1 @@ -408,7 +465,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinArriWideGamut4Label "Linear ARRI Wide Gamut 4" #define kOfxColourspaceLinArriWideGamut4Encoding "scene-linear" #define kOfxColourspaceLinArriWideGamut4IsData false +#define kOfxColourspaceLinArriWideGamut4IsBasic false #define kOfxColourspaceLinArriWideGamut4IsCore false +#define kOfxColourspaceLinArriWideGamut4IsDisplay false // arri_logc4 // Convert ARRI LogC4 to ACES2065-1 @@ -422,7 +481,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceArriLogc4Label "ARRI LogC4" #define kOfxColourspaceArriLogc4Encoding "log" #define kOfxColourspaceArriLogc4IsData false +#define kOfxColourspaceArriLogc4IsBasic false #define kOfxColourspaceArriLogc4IsCore false +#define kOfxColourspaceArriLogc4IsDisplay false // bmdfilm_widegamut_gen5 // Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1 @@ -436,7 +497,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceBmdfilmWidegamutGen5Label "BMDFilm WideGamut Gen5" #define kOfxColourspaceBmdfilmWidegamutGen5Encoding "log" #define kOfxColourspaceBmdfilmWidegamutGen5IsData false +#define kOfxColourspaceBmdfilmWidegamutGen5IsBasic false #define kOfxColourspaceBmdfilmWidegamutGen5IsCore false +#define kOfxColourspaceBmdfilmWidegamutGen5IsDisplay false // davinci_intermediate_widegamut // Convert DaVinci Intermediate Wide Gamut to ACES2065-1 @@ -446,7 +509,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceDavinciIntermediateWidegamutLabel "DaVinci Intermediate WideGamut" #define kOfxColourspaceDavinciIntermediateWidegamutEncoding "log" #define kOfxColourspaceDavinciIntermediateWidegamutIsData false +#define kOfxColourspaceDavinciIntermediateWidegamutIsBasic false #define kOfxColourspaceDavinciIntermediateWidegamutIsCore false +#define kOfxColourspaceDavinciIntermediateWidegamutIsDisplay false // lin_bmd_widegamut_gen5 // Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1 @@ -455,7 +520,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinBmdWidegamutGen5Label "Linear BMD WideGamut Gen5" #define kOfxColourspaceLinBmdWidegamutGen5Encoding "scene-linear" #define kOfxColourspaceLinBmdWidegamutGen5IsData false +#define kOfxColourspaceLinBmdWidegamutGen5IsBasic false #define kOfxColourspaceLinBmdWidegamutGen5IsCore false +#define kOfxColourspaceLinBmdWidegamutGen5IsDisplay false // lin_davinci_widegamut // Convert Linear DaVinci Wide Gamut to ACES2065-1 @@ -464,7 +531,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinDavinciWidegamutLabel "Linear DaVinci WideGamut" #define kOfxColourspaceLinDavinciWidegamutEncoding "scene-linear" #define kOfxColourspaceLinDavinciWidegamutIsData false +#define kOfxColourspaceLinDavinciWidegamutIsBasic false #define kOfxColourspaceLinDavinciWidegamutIsCore false +#define kOfxColourspaceLinDavinciWidegamutIsDisplay false // canonlog2_cinemagamut_d55 // Convert Canon Log 2 Cinema Gamut (Daylight) to ACES2065-1 @@ -477,7 +546,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceCanonlog2CinemagamutD55Label "CanonLog2 CinemaGamut D55" #define kOfxColourspaceCanonlog2CinemagamutD55Encoding "log" #define kOfxColourspaceCanonlog2CinemagamutD55IsData false +#define kOfxColourspaceCanonlog2CinemagamutD55IsBasic false #define kOfxColourspaceCanonlog2CinemagamutD55IsCore false +#define kOfxColourspaceCanonlog2CinemagamutD55IsDisplay false // canonlog3_cinemagamut_d55 // Convert Canon Log 3 Cinema Gamut (Daylight) to ACES2065-1 @@ -490,7 +561,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceCanonlog3CinemagamutD55Label "CanonLog3 CinemaGamut D55" #define kOfxColourspaceCanonlog3CinemagamutD55Encoding "log" #define kOfxColourspaceCanonlog3CinemagamutD55IsData false +#define kOfxColourspaceCanonlog3CinemagamutD55IsBasic false #define kOfxColourspaceCanonlog3CinemagamutD55IsCore false +#define kOfxColourspaceCanonlog3CinemagamutD55IsDisplay false // lin_cinemagamut_d55 // Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1 @@ -499,7 +572,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinCinemagamutD55Label "Linear CinemaGamut D55" #define kOfxColourspaceLinCinemagamutD55Encoding "scene-linear" #define kOfxColourspaceLinCinemagamutD55IsData false +#define kOfxColourspaceLinCinemagamutD55IsBasic false #define kOfxColourspaceLinCinemagamutD55IsCore false +#define kOfxColourspaceLinCinemagamutD55IsDisplay false // lin_vgamut // Convert Linear Panasonic V-Gamut to ACES2065-1 @@ -508,7 +583,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinVgamutLabel "Linear V-Gamut" #define kOfxColourspaceLinVgamutEncoding "scene-linear" #define kOfxColourspaceLinVgamutIsData false +#define kOfxColourspaceLinVgamutIsBasic false #define kOfxColourspaceLinVgamutIsCore false +#define kOfxColourspaceLinVgamutIsDisplay false // vlog_vgamut // Convert Panasonic V-Log - V-Gamut to ACES2065-1 @@ -522,7 +599,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceVlogVgamutLabel "V-Log V-Gamut" #define kOfxColourspaceVlogVgamutEncoding "log" #define kOfxColourspaceVlogVgamutIsData false +#define kOfxColourspaceVlogVgamutIsBasic false #define kOfxColourspaceVlogVgamutIsCore false +#define kOfxColourspaceVlogVgamutIsDisplay false // lin_redwidegamutrgb // Convert Linear REDWideGamutRGB to ACES2065-1 @@ -531,7 +610,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinRedwidegamutrgbLabel "Linear REDWideGamutRGB" #define kOfxColourspaceLinRedwidegamutrgbEncoding "scene-linear" #define kOfxColourspaceLinRedwidegamutrgbIsData false +#define kOfxColourspaceLinRedwidegamutrgbIsBasic false #define kOfxColourspaceLinRedwidegamutrgbIsCore false +#define kOfxColourspaceLinRedwidegamutrgbIsDisplay false // log3g10_redwidegamutrgb // Convert RED Log3G10 REDWideGamutRGB to ACES2065-1 @@ -545,7 +626,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLog3g10RedwidegamutrgbLabel "Log3G10 REDWideGamutRGB" #define kOfxColourspaceLog3g10RedwidegamutrgbEncoding "log" #define kOfxColourspaceLog3g10RedwidegamutrgbIsData false +#define kOfxColourspaceLog3g10RedwidegamutrgbIsBasic false #define kOfxColourspaceLog3g10RedwidegamutrgbIsCore false +#define kOfxColourspaceLog3g10RedwidegamutrgbIsDisplay false // lin_sgamut3 // Convert Linear S-Gamut3 to ACES2065-1 @@ -554,7 +637,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinSgamut3Label "Linear S-Gamut3" #define kOfxColourspaceLinSgamut3Encoding "scene-linear" #define kOfxColourspaceLinSgamut3IsData false +#define kOfxColourspaceLinSgamut3IsBasic false #define kOfxColourspaceLinSgamut3IsCore false +#define kOfxColourspaceLinSgamut3IsDisplay false // lin_sgamut3cine // Convert Linear S-Gamut3.Cine to ACES2065-1 @@ -563,7 +648,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinSgamut3cineLabel "Linear S-Gamut3.Cine" #define kOfxColourspaceLinSgamut3cineEncoding "scene-linear" #define kOfxColourspaceLinSgamut3cineIsData false +#define kOfxColourspaceLinSgamut3cineIsBasic false #define kOfxColourspaceLinSgamut3cineIsCore false +#define kOfxColourspaceLinSgamut3cineIsDisplay false // lin_venice_sgamut3 // Convert Linear Venice S-Gamut3 to ACES2065-1 @@ -572,7 +659,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinVeniceSgamut3Label "Linear Venice S-Gamut3" #define kOfxColourspaceLinVeniceSgamut3Encoding "scene-linear" #define kOfxColourspaceLinVeniceSgamut3IsData false +#define kOfxColourspaceLinVeniceSgamut3IsBasic false #define kOfxColourspaceLinVeniceSgamut3IsCore false +#define kOfxColourspaceLinVeniceSgamut3IsDisplay false // lin_venice_sgamut3cine // Convert Linear Venice S-Gamut3.Cine to ACES2065-1 @@ -581,7 +670,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceLinVeniceSgamut3cineLabel "Linear Venice S-Gamut3.Cine" #define kOfxColourspaceLinVeniceSgamut3cineEncoding "scene-linear" #define kOfxColourspaceLinVeniceSgamut3cineIsData false +#define kOfxColourspaceLinVeniceSgamut3cineIsBasic false #define kOfxColourspaceLinVeniceSgamut3cineIsCore false +#define kOfxColourspaceLinVeniceSgamut3cineIsDisplay false // slog3_sgamut3 // Convert Sony S-Log3 S-Gamut3 to ACES2065-1 @@ -595,7 +686,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSlog3Sgamut3Label "S-Log3 S-Gamut3" #define kOfxColourspaceSlog3Sgamut3Encoding "log" #define kOfxColourspaceSlog3Sgamut3IsData false +#define kOfxColourspaceSlog3Sgamut3IsBasic false #define kOfxColourspaceSlog3Sgamut3IsCore false +#define kOfxColourspaceSlog3Sgamut3IsDisplay false // slog3_sgamut3cine // Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1 @@ -609,7 +702,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSlog3Sgamut3cineLabel "S-Log3 S-Gamut3.Cine" #define kOfxColourspaceSlog3Sgamut3cineEncoding "log" #define kOfxColourspaceSlog3Sgamut3cineIsData false +#define kOfxColourspaceSlog3Sgamut3cineIsBasic false #define kOfxColourspaceSlog3Sgamut3cineIsCore false +#define kOfxColourspaceSlog3Sgamut3cineIsDisplay false // slog3_venice_sgamut3 // Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1 @@ -623,7 +718,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSlog3VeniceSgamut3Label "S-Log3 Venice S-Gamut3" #define kOfxColourspaceSlog3VeniceSgamut3Encoding "log" #define kOfxColourspaceSlog3VeniceSgamut3IsData false +#define kOfxColourspaceSlog3VeniceSgamut3IsBasic false #define kOfxColourspaceSlog3VeniceSgamut3IsCore false +#define kOfxColourspaceSlog3VeniceSgamut3IsDisplay false // slog3_venice_sgamut3cine // Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1 @@ -637,7 +734,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSlog3VeniceSgamut3cineLabel "S-Log3 Venice S-Gamut3.Cine" #define kOfxColourspaceSlog3VeniceSgamut3cineEncoding "log" #define kOfxColourspaceSlog3VeniceSgamut3cineIsData false +#define kOfxColourspaceSlog3VeniceSgamut3cineIsBasic false #define kOfxColourspaceSlog3VeniceSgamut3cineIsCore false +#define kOfxColourspaceSlog3VeniceSgamut3cineIsDisplay false // camera_rec709 // Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point @@ -646,7 +745,9 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceCameraRec709Label "Camera Rec.709" #define kOfxColourspaceCameraRec709Encoding "sdr-video" #define kOfxColourspaceCameraRec709IsData false +#define kOfxColourspaceCameraRec709IsBasic false #define kOfxColourspaceCameraRec709IsCore false +#define kOfxColourspaceCameraRec709IsDisplay false // srgb_encoded_p3d65_tx // Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point @@ -655,7 +756,57 @@ A colourspace suitable for texture painting, typically sRGB. #define kOfxColourspaceSrgbEncodedP3d65TxLabel "sRGB Encoded P3-D65 - Texture" #define kOfxColourspaceSrgbEncodedP3d65TxEncoding "sdr-video" #define kOfxColourspaceSrgbEncodedP3d65TxIsData false +#define kOfxColourspaceSrgbEncodedP3d65TxIsBasic false #define kOfxColourspaceSrgbEncodedP3d65TxIsCore false +#define kOfxColourspaceSrgbEncodedP3d65TxIsDisplay false + +/** @brief Roles - standard names used for compatibility with common OCIO configs. +*/ + +/** @brief aces_interchange +Guaranteed to be ACES2065-1. +*/ +#define kOfxColourspaceRoleAcesInterchange "aces_interchange" + +/** @brief cie_xyz_d65_interchange +CIE XYZ colorimetry with the neutral axis at D65. +*/ +#define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange" + +/** @brief color_picking +The colourspace to use for colour pickers, typically a display colourspace. +*/ +#define kOfxColourspaceRoleColorPicking "color_picking" + +/** @brief color_timing +A colourspace suitable for colour grading, typically a log colourspace. +*/ +#define kOfxColourspaceRoleColorTiming "color_timing" + +/** @brief compositing_log +Any colourspace with a log transfer function. +*/ +#define kOfxColourspaceRoleCompositingLog "compositing_log" + +/** @brief data +Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace. +*/ +#define kOfxColourspaceRoleData "data" + +/** @brief matte_paint +A colourspace suitable for matte painting. +*/ +#define kOfxColourspaceRoleMattePaint "matte_paint" + +/** @brief scene_linear +Any scene-referred linear colourspace. +*/ +#define kOfxColourspaceRoleSceneLinear "scene_linear" + +/** @brief texture_paint +A colourspace suitable for texture painting, typically sRGB. +*/ +#define kOfxColourspaceRoleTexturePaint "texture_paint" #ifdef __cplusplus } diff --git a/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio b/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio index 24a18e1b..0771baea 100644 --- a/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio +++ b/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio @@ -20,10 +20,13 @@ roles: color_timing: ACEScct compositing_log: ACEScct data: Raw - hdr_video: Rec.2100-HLG - Display matte_paint: ACEScct + ofx_hdr: Rec.2100-HLG - Display + ofx_linear: ACEScg + ofx_log: ACEScct + ofx_raw: Raw + ofx_sdr: Rec.1886 Rec.709 - Display scene_linear: ACEScg - sdr_video: Rec.1886 Rec.709 - Display texture_paint: sRGB - Texture file_rules: diff --git a/scripts/genColour b/scripts/genColour index cd86272d..4eb28c6a 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -36,16 +36,19 @@ footer = ''' ''' role_docs = { + 'ofx_sdr': 'Any display-referred SDR video such as Rec. 709.', + 'ofx_hdr': 'Any display-referred HDR video such as Rec. 2020 HLG or PQ.', + 'ofx_log': 'Any colourspace with a log transfer function.', + 'ofx_linear': 'Any scene-referred linear colourspace.', + 'ofx_raw': 'Image values should not be treated as colour, e.g. motion vectors or masks.', 'aces_interchange': 'Guaranteed to be ACES2065-1.', 'cie_xyz_d65_interchange': 'CIE XYZ colorimetry with the neutral axis at D65.', 'color_picking': 'The colourspace to use for colour pickers, typically a display colourspace.', 'color_timing': 'A colourspace suitable for colour grading, typically a log colourspace.', 'compositing_log': 'Any colourspace with a log transfer function.', 'data': 'Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace.', - 'hdr_video': 'Any display-referred HDR video such as Rec. 2020 HLG or PQ.', 'matte_paint': 'A colourspace suitable for matte painting.', 'scene_linear': 'Any scene-referred linear colourspace.', - 'sdr_video': 'Any display-referred SDR video such as Rec. 709.', 'texture_paint': 'A colourspace suitable for texture painting, typically sRGB.' } @@ -66,12 +69,27 @@ def colourspace_short_name(spc): def print_name(name): print(f'{define_base}{camel_name(name)} "{name}"') +def print_metadata(name, label, reference_space, encoding, is_data, is_basic, is_core): + print_string_property(name, 'Label', label) + print_string_property(name, 'Encoding', encoding) + print_bool_property(name, 'Data', is_data) + print_bool_property(name, 'Basic', is_basic) + print_bool_property(name, 'Core', is_core) + print_bool_property(name, 'Display', reference_space == OCIO.ReferenceSpaceType.REFERENCE_SPACE_DISPLAY) + +# Basic colourspaces are actually OCIO roles with additional metadata +def print_basic_colourspace(role): + role_name = role[0] + spc = ofx_config.getColorSpace(role[1]) + print(f'\n/** @brief {role_name}\n{role_docs[role_name]}\n*/') + print_name(role_name) + print_metadata(role_name, role_name, spc.getReferenceSpaceType(), spc.getEncoding(), spc.isData(), True, True) + def print_role(role): role_name = role[0] - colourspace_name = colourspace_short_name(ofx_config.getColorSpace(role[1])) print(f'\n/** @brief {role_name}\n{role_docs[role_name]}\n*/') print(f'{define_base}Role{camel_name(role_name)} "{role_name}"') - + def print_string_property(name, propname, value): print(f'{define_base}{camel_name(name)}{propname} "{value}"') @@ -84,14 +102,14 @@ def print_list(name, list): def print_colourspace(spc, is_core): name = colourspace_short_name(spc) - display_name = spc.getName() + label = spc.getName() print(f'\n// {name}\n//', '\n// '.join(spc.getDescription().split('\n')).replace('\n// \n', '\n')) print_name(name) - print_string_property(name, 'Label', display_name) - print_string_property(name, 'Encoding', spc.getEncoding()) - print_bool_property(name, 'Data', spc.isData()) - print_bool_property(name, 'Core', is_core) + print_metadata(name, label, spc.getReferenceSpaceType(), spc.getEncoding(), spc.isData(), False, is_core) +# OFX-specific set of basic roles +basic_roles = ['ofx_raw', 'ofx_linear', 'ofx_sdr', 'ofx_log', 'ofx_hdr'] + # OFX-specific set of core colourspaces core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', 'ACES2065-1', 'ACEScc', 'ACEScct', @@ -106,12 +124,9 @@ ofx_config = OCIO.GetCurrentConfig() print(Template(header).substitute(config_name=ofx_config.getName())) -print('''/** @brief Roles - generic names for types of colourspace -Use a role when the specific colourspace is not important. -*/''') - -for role in ofx_config.getRoles(): - print_role(role) +print('\n// Basic Colourspaces') +for basic_role in [role for role in ofx_config.getRoles() if role[0] in basic_roles]: + print_basic_colourspace(basic_role) print('\n// Core Colourspaces') for core_spc in [spc for spc in ofx_config.getColorSpaces() if colourspace_short_name(spc) in core_spaces]: @@ -121,4 +136,9 @@ print('\n// Non-core Colourspaces') for other_spc in [spc for spc in ofx_config.getColorSpaces() if colourspace_short_name(spc) not in core_spaces]: print_colourspace(other_spc, False) +print('''\n/** @brief Roles - standard names used for compatibility with common OCIO configs. +*/''') +for role in [role for role in ofx_config.getRoles() if role[0] not in basic_roles]: + print_role(role) + print(footer) diff --git a/scripts/genOCIOConfig b/scripts/genOCIOConfig index 04660899..012f32a4 100755 --- a/scripts/genOCIOConfig +++ b/scripts/genOCIOConfig @@ -15,10 +15,14 @@ ofx_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3 srgb_tx = ofx_config.getColorSpace('srgb_tx') srgb_tx.setEncoding('sdr-video') -# Add OFX-specific roles for use in Native mode only. -# The choice of colourspaces for these roles is arbitrary. -ofx_config.setRole('sdr_video', 'rec1886_rec709_display') -ofx_config.setRole('hdr_video', 'rec2100_hlg_display') +# Add OFX-specific roles for use as "basic colourspaces". +# Suitable colourspaces are defined for OCIO compatibility, but a plug-in/host operating +# in basic mode might not be using these exact colourspaces. +ofx_config.setRole('ofx_sdr', 'rec1886_rec709_display') +ofx_config.setRole('ofx_hdr', 'rec2100_hlg_display') +ofx_config.setRole('ofx_log', 'ACEScct') +ofx_config.setRole('ofx_linear', 'ACEScg') +ofx_config.setRole('ofx_raw', 'raw') # Make all colourspaces active, future OCIO configs will also do this ofx_config.setInactiveColorSpaces('') From 88f35d05cace7fc1e7d3e22cc17ef0f7b82ff6cb Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Tue, 2 Jul 2024 01:20:12 +0100 Subject: [PATCH 20/34] Output colourspace negotiation action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A new action, OfxImageEffectActionGetOutputColourspace, allows the host to specify its preferred colourspaces for the plug-in’s output clip, and for the plug-in to specify the colourspace it selected. OfxImageEffectActionGetClipPreferences now mentions that the plug-in can specify input clip colourspace preferences in this action. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 25 +++++++++++++++++++++++++ include/ofxImageEffect.h | 6 ++++++ 2 files changed, 31 insertions(+) diff --git a/include/ofxColour.h b/include/ofxColour.h index f773c392..5b8b10cc 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -195,6 +195,31 @@ If not defined, the default rules for choosing a view will be followed. */ #define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView" +/** @brief + + This action allows a host to ask an effect, given a list of preferred + colourspaces, what colourspace will be used for its output clip. This should + be called after first gathering the plug-ins preferred input colourspaces + via OfxImageEffectActionGetClipPreferences. The host must set + kOfxImageClipPropColourspace on the output clip to the chosen colourspace, + or the default value of OfxColourspace_Source. + + @param handle handle to the instance, cast to an \ref OfxImageEffectHandle + @param inArgs has the property + - \ref kOfxImageClipPropPreferredColourspaces the list of preferred colourspaces + + @param outArgs has the property + - \ref kOfxImageClipPropColourspace the colourspace selected by the plug-in + + @returns + - \ref kOfxStatOK, the action was trapped and the colourspace was set in the outArgs property set + - \ref kOfxStatReplyDefault, the action was not trapped and the host should use the default value of OfxColourspace_Source + - \ref kOfxStatErrMemory, in which case the action may be called again after a memory purge + - \ref kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message + - \ref kOfxStatErrFatal + */ +#define kOfxImageEffectActionGetOutputColourspace "OfxImageEffectActionGetOutputColourspace" + #ifdef __cplusplus } #endif diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index fdd4e180..fecee135 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -307,6 +307,12 @@ These are the list of actions passed to an image effect plugin's main function. must be set to one of the pixel depths both the host and plugin supports + - a set of char \* X 1 properties, one for each of the input clips + currently attached, labelled with + ``OfxImageClipPropPreferredColourspaces_`` post pended with the clip's + name. This must be set according to the requirements of the colour + management style in use. + - a set of double X 1 properties, one for each of the input clips currently attached and the output clip, labelled with ``OfxImageClipPropPAR_`` post pended with the clip's name. This is From af85e80d918481db2dd743728f7cdf0796751e55 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Wed, 10 Jul 2024 11:09:40 +0100 Subject: [PATCH 21/34] Improvements to the docs and OCIO config To aid with versioning, the OFX OCIO config has been renamed, now including the OpenFX version number instead of the version number of the upstream OCIO config. Basic colourspaces have been removed from the reference OCIO config, allowing hosts and plug-ins to freely choose any colourspace with the correct attributes. Two colourspaces were missing from the core style and have been added. Various doc improvements to fix typos and make the intended usage clearer. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 41 +++++++--- include/ofxColourspaceList.h | 81 ++++++++++--------- ...enfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio} | 7 +- scripts/genColour | 21 +++-- scripts/genOCIOConfig | 13 +-- 5 files changed, 88 insertions(+), 75 deletions(-) rename include/{openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio => openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio} (99%) diff --git a/include/ofxColour.h b/include/ofxColour.h index 5b8b10cc..594757f6 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -33,9 +33,13 @@ colour management. OCIO is used as the reference for the colour management API, but is not required to implement the native styles. The colourspace strings used in the native styles are from -openfx-studio-config-v2.1.0_acces-v1.3_ocio-v2.3.ocio -and stored for OFX purposes in ofxColourspaceList.h. Additionally, there is -a scheme for cross-referencing between clips. +openfx-native-1.5.ocio, which is based on the OCIO ACES Studio built-in +config, studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes +in ofxColourspaceList.h. Additionally, there is a scheme for cross-referencing +between clips, and a set of "basic colourspaces", which are designed to be +generic names for a family of colourspaces. When a basic colourspace is used, +this means the host is free to choose any colourspace with the same encoding +and reference space (scene vs display). The assumption is that OCIO > Full > Core > Basic, so the highest style supported by both host and plug-in will be chosen. @@ -63,10 +67,19 @@ A host must set this property on any effect instances where it has negotiated OCIO colour management (kOfxImageEffectPropColourManagementOCIO). Use of URIs for built-in configs, such as ocio://default is permitted. -When native colour management is in use, a host must set this -property to point to the OCIO config used to define strings for the version of -OFX it was built against. This will allow a plug-in which uses OCIO to work -directly with native styles. +When the core or full styles are in use, a host must set this property to +point to an OCIO config which defines all the colourspaces required for that +style, which will allow a plug-in that uses OCIO to work directly with native +styles. The included config, openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio, is +suitable, but hosts might provide a different config which is compatible. If +hosts choose to use their own config, its definitions for native colourspaces +must exactly match those found in openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio. + +As basic colourspaces are not defined in the OpenFX native config, hosts may +set this property as they wish when using the basic style. If hosts do provide +a config, an OCIO-based plug-in may attempt to use it to look up mappings for +basic colourspaces, but leaving those undefined must not be considered an +error. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" @@ -81,8 +94,8 @@ it will be set to the working colourspace of the host but could be any valid colourspace. Plug-ins may set this property on an output clip. Plug-ins which output motion -vectors or similar images which should not be colour managed can use the data -colourspace which is present in the built-in OCIO configs. +vectors or similar images which should not be colour managed should use +kOfxColourspaceRaw, Both host and plug-in should use the value of kOfxImageClipPropPreferredColourspace where reasonable. @@ -90,7 +103,9 @@ kOfxImageClipPropPreferredColourspace where reasonable. Cross-referencing between clips is possible by setting this property to "OfxColourspace_". For example a plug-in may set this property on its output clip to "OfxColourspace_Source", telling the host that the colourspace -of the output matches the input. +of the output matches the input. In the basic style, plug-ins are recommended +to use cross-referencing for their output clip unless kOfxColourspaceRaw is +required. If a clip sets OfxImageClipPropIsMask or it only supports OfxImageComponentAlpha, colour management is disabled and this property @@ -122,8 +137,8 @@ The host is free to choose any colourspace from this list, but should favour the first mutually agreeable colourspace, and set kOfxImageClipPropColourspace to tell the plug-in which colourspace has been selected. A host does not need to convert into the first choice just because it can, as this might be -inefficient, and should scene-to-display or display-to-scene conversions where -possible. +inefficient, and should avoid scene-to-display or display-to-scene conversions +where possible. In the event that the host cannot supply images in a requested colourspace, it may supply images in any valid colourspace. Plug-ins must check @@ -147,7 +162,7 @@ both input clips to be in the same colourspace. A host might set the same thing on the plug-in's output clip to request that the plug-in outputs the same colourspace as the input. -If a plug-in has inputs which contain motion vectors, depth values or other +If a plug-in has inputs which expect motion vectors, depth values or other non-colour channels, it should set the preferred colourspace to kOfxColourspaceRaw. Similarly, if a host requests outputs in a typical scene colourspace, but the plug-in is producing motion vectors, it should ignore diff --git a/include/ofxColourspaceList.h b/include/ofxColourspaceList.h index 5830ed5b..014fee8e 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofxColourspaceList.h @@ -10,11 +10,12 @@ extern "C" { /** @file ofxColourspaceList.h Contains the list of supported colourspaces. -This file was auto-generated by scripts/genColour from openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3. +This file was auto-generated by scripts/genColour from openfx-native-v1.5_aces-v1.3_ocio-v2.3. */ // Basic Colourspaces +// These colourspaces are generic names for any colourspace with the correct attributes. /** @brief ofx_hdr Any display-referred HDR video such as Rec. 2020 HLG or PQ. @@ -39,7 +40,7 @@ Any scene-referred linear colourspace. #define kOfxColourspaceOfxLinearIsDisplay false /** @brief ofx_log -Any colourspace with a log transfer function. +Any scene-referred colourspace with a log transfer function. */ #define kOfxColourspaceOfxLog "ofx_log" #define kOfxColourspaceOfxLogLabel "ofx_log" @@ -169,6 +170,43 @@ Any display-referred SDR video such as Rec. 709. #define kOfxColourspaceRec2100PqDisplayIsCore true #define kOfxColourspaceRec2100PqDisplayIsDisplay true +// st2084_p3d65_display +// Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 +#define kOfxColourspaceSt2084P3d65Display "st2084_p3d65_display" +#define kOfxColourspaceSt2084P3d65DisplayLabel "ST2084-P3-D65 - Display" +#define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video" +#define kOfxColourspaceSt2084P3d65DisplayIsData false +#define kOfxColourspaceSt2084P3d65DisplayIsBasic false +#define kOfxColourspaceSt2084P3d65DisplayIsCore true +#define kOfxColourspaceSt2084P3d65DisplayIsDisplay true + +// p3d65_display +// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 +// AMF Components +// -------------- +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 +// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 +#define kOfxColourspaceP3d65Display "p3d65_display" +#define kOfxColourspaceP3d65DisplayLabel "P3-D65 - Display" +#define kOfxColourspaceP3d65DisplayEncoding "sdr-video" +#define kOfxColourspaceP3d65DisplayIsData false +#define kOfxColourspaceP3d65DisplayIsBasic false +#define kOfxColourspaceP3d65DisplayIsCore true +#define kOfxColourspaceP3d65DisplayIsDisplay true + // ACES2065-1 // The "Academy Color Encoding System" reference colorspace. #define kOfxColourspaceACES20651 "ACES2065-1" @@ -342,26 +380,6 @@ Any display-referred SDR video such as Rec. 709. #define kOfxColourspaceCIEXYZD65IsCore false #define kOfxColourspaceCIEXYZD65IsDisplay true -// st2084_p3d65_display -// Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries -// AMF Components -// -------------- -// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0 -#define kOfxColourspaceSt2084P3d65Display "st2084_p3d65_display" -#define kOfxColourspaceSt2084P3d65DisplayLabel "ST2084-P3-D65 - Display" -#define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video" -#define kOfxColourspaceSt2084P3d65DisplayIsData false -#define kOfxColourspaceSt2084P3d65DisplayIsBasic false -#define kOfxColourspaceSt2084P3d65DisplayIsCore false -#define kOfxColourspaceSt2084P3d65DisplayIsDisplay true - // p3d60_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation) // AMF Components @@ -376,23 +394,6 @@ Any display-referred SDR video such as Rec. 709. #define kOfxColourspaceP3d60DisplayIsCore false #define kOfxColourspaceP3d60DisplayIsDisplay true -// p3d65_display -// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65 -// AMF Components -// -------------- -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0 -// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0 -#define kOfxColourspaceP3d65Display "p3d65_display" -#define kOfxColourspaceP3d65DisplayLabel "P3-D65 - Display" -#define kOfxColourspaceP3d65DisplayEncoding "sdr-video" -#define kOfxColourspaceP3d65DisplayIsData false -#define kOfxColourspaceP3d65DisplayIsBasic false -#define kOfxColourspaceP3d65DisplayIsCore false -#define kOfxColourspaceP3d65DisplayIsDisplay true - // p3_dci_display // Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation) // AMF Components @@ -784,7 +785,7 @@ A colourspace suitable for colour grading, typically a log colourspace. #define kOfxColourspaceRoleColorTiming "color_timing" /** @brief compositing_log -Any colourspace with a log transfer function. +Any scene-referred colourspace with a log transfer function. */ #define kOfxColourspaceRoleCompositingLog "compositing_log" diff --git a/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio b/include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio similarity index 99% rename from include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio rename to include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio index 0771baea..dece8ee7 100644 --- a/include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio +++ b/include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio @@ -5,7 +5,7 @@ environment: search_path: "" strictparsing: true luma: [0.2126, 0.7152, 0.0722] -name: openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3 +name: openfx-native-v1.5_aces-v1.3_ocio-v2.3 description: | OpenFX 1.5 Native Mode Config Based on: Academy Color Encoding System - Studio Config [COLORSPACES v2.1.0] [ACES v1.3] [OCIO v2.3] @@ -21,11 +21,6 @@ roles: compositing_log: ACEScct data: Raw matte_paint: ACEScct - ofx_hdr: Rec.2100-HLG - Display - ofx_linear: ACEScg - ofx_log: ACEScct - ofx_raw: Raw - ofx_sdr: Rec.1886 Rec.709 - Display scene_linear: ACEScg texture_paint: sRGB - Texture diff --git a/scripts/genColour b/scripts/genColour index 4eb28c6a..d302c787 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -5,7 +5,7 @@ # Extract information from an OCIO config to C header. # Example invocation: -# OCIO=include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio scripts/genColour > include/ofxColourspaceList.h +# OCIO=include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio scripts/genColour > include/ofxColourspaceList.h import sys import PyOpenColorIO as OCIO @@ -38,14 +38,14 @@ footer = ''' role_docs = { 'ofx_sdr': 'Any display-referred SDR video such as Rec. 709.', 'ofx_hdr': 'Any display-referred HDR video such as Rec. 2020 HLG or PQ.', - 'ofx_log': 'Any colourspace with a log transfer function.', + 'ofx_log': 'Any scene-referred colourspace with a log transfer function.', 'ofx_linear': 'Any scene-referred linear colourspace.', 'ofx_raw': 'Image values should not be treated as colour, e.g. motion vectors or masks.', 'aces_interchange': 'Guaranteed to be ACES2065-1.', 'cie_xyz_d65_interchange': 'CIE XYZ colorimetry with the neutral axis at D65.', 'color_picking': 'The colourspace to use for colour pickers, typically a display colourspace.', 'color_timing': 'A colourspace suitable for colour grading, typically a log colourspace.', - 'compositing_log': 'Any colourspace with a log transfer function.', + 'compositing_log': 'Any scene-referred colourspace with a log transfer function.', 'data': 'Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace.', 'matte_paint': 'A colourspace suitable for matte painting.', 'scene_linear': 'Any scene-referred linear colourspace.', @@ -117,14 +117,25 @@ core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', 'lin_rec709_srgb', 'g18_rec709_tx', 'g22_ap1_tx', 'g22_rec709_tx', 'g24_rec709_tx', 'srgb_encoded_ap1_tx', 'srg_encoded_p3d65_tx', 'srgb_tx', 'Raw', - 'rec1886_rec2020_display', 'rec2100_hlg_display', 'rec2100_pq_display'] + 'rec1886_rec2020_display', 'rec2100_hlg_display', 'rec2100_pq_display', + 'st2084_p3d65_display', 'p3d65_display'] # This should be the OpenFX OCIO config created by genOCIOConfig ofx_config = OCIO.GetCurrentConfig() +# Add OFX-specific basic colourspaces here rather than in genOCIOConfig +# to avoid creating an expectation that these mappings should always be used. +# The assigned colourspaces are chosen simply to generate the correct +# attributes in the header. +ofx_config.setRole('ofx_sdr', 'rec1886_rec709_display') +ofx_config.setRole('ofx_hdr', 'rec2100_hlg_display') +ofx_config.setRole('ofx_log', 'ACEScct') +ofx_config.setRole('ofx_linear', 'ACEScg') +ofx_config.setRole('ofx_raw', 'raw') + print(Template(header).substitute(config_name=ofx_config.getName())) -print('\n// Basic Colourspaces') +print('\n// Basic Colourspaces\n// These colourspaces are generic names for any colourspace with the correct attributes.') for basic_role in [role for role in ofx_config.getRoles() if role[0] in basic_roles]: print_basic_colourspace(basic_role) diff --git a/scripts/genOCIOConfig b/scripts/genOCIOConfig index 012f32a4..84fa937e 100755 --- a/scripts/genOCIOConfig +++ b/scripts/genOCIOConfig @@ -5,7 +5,7 @@ # Create an OCIO config equivalant to OpenFX Native colour management # Example invocation: -# scripts/genOCIOConfig > include/openfx-studio-config-v2.1.0_aces-v1.3_ocio-v2.3.ocio +# scripts/genOCIOConfig > include/openfx-native-1.5.ocio import PyOpenColorIO as OCIO @@ -15,19 +15,10 @@ ofx_config = OCIO.Config.CreateFromBuiltinConfig('studio-config-v2.1.0_aces-v1.3 srgb_tx = ofx_config.getColorSpace('srgb_tx') srgb_tx.setEncoding('sdr-video') -# Add OFX-specific roles for use as "basic colourspaces". -# Suitable colourspaces are defined for OCIO compatibility, but a plug-in/host operating -# in basic mode might not be using these exact colourspaces. -ofx_config.setRole('ofx_sdr', 'rec1886_rec709_display') -ofx_config.setRole('ofx_hdr', 'rec2100_hlg_display') -ofx_config.setRole('ofx_log', 'ACEScct') -ofx_config.setRole('ofx_linear', 'ACEScg') -ofx_config.setRole('ofx_raw', 'raw') - # Make all colourspaces active, future OCIO configs will also do this ofx_config.setInactiveColorSpaces('') -ofx_config.setName(f'openfx-{ofx_config.getName()}') +ofx_config.setName(f'openfx-native-v1.5_aces-v1.3_ocio-v2.3') ofx_config.setDescription(f'OpenFX 1.5 Native Mode Config\nBased on: {ofx_config.getDescription()}') ofx_config.validate() # will throw if there's an error From 9f0533bbf7a959af4678cc15641469d418085a85 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Thu, 11 Jul 2024 16:48:52 +0100 Subject: [PATCH 22/34] Support versioning native styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although the API should remain stable, colourspaces will change over time, and it’s likely hosts and plug-ins will support multiple versions of the spec for backwards compatibility. To address this, new properties have been introduced to allow negotiation of the config to use for native mode. This is somewhat similar to the use of built-in configs in OCIO. Now that the native mode config negotiation is handled separately, the OCIO config property is reserved for use only in the OCIO style. Hosts are now responsible for selecting the colour management style and config, and must set these in image effect properties. Anticipating support for multiple versions, ofxColourspaceList.h has been renamed to a versioned name and is referred to as “the config header”. For now, it could be used as a drop-in replacement for ofxColourspaceList.h, but as soon as a second version is added, developers will need a strategy to manage these. Additionally, the basic colourspaces have been renamed to include whether they are scene or display referred, and a descriptive label has been added. Signed-off-by: John-Paul Smith --- ... => ofx-native-v1.5_aces-v1.3_ocio-v2.3.h} | 88 +++++++------- ... ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio} | 2 +- include/ofxColour.h | 109 ++++++++++-------- scripts/genColour | 43 ++++--- scripts/genOCIOConfig | 2 +- 5 files changed, 138 insertions(+), 106 deletions(-) rename include/{ofxColourspaceList.h => ofx-native-v1.5_aces-v1.3_ocio-v2.3.h} (94%) rename include/{openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio => ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio} (99%) diff --git a/include/ofxColourspaceList.h b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h similarity index 94% rename from include/ofxColourspaceList.h rename to include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h index 014fee8e..c4cb01d6 100644 --- a/include/ofxColourspaceList.h +++ b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.h @@ -1,5 +1,5 @@ -#ifndef _ofxColourspaceList_h_ -#define _ofxColourspaceList_h_ +#ifndef _ofx_native_v1_5_aces_v1_3_ocio_v2_3_h_ +#define _ofx_native_v1_5_aces_v1_3_ocio_v2_3_h_ // Copyright OpenFX and contributors to the OpenFX project. // SPDX-License-Identifier: BSD-3-Clause @@ -10,67 +10,69 @@ extern "C" { /** @file ofxColourspaceList.h Contains the list of supported colourspaces. -This file was auto-generated by scripts/genColour from openfx-native-v1.5_aces-v1.3_ocio-v2.3. +This file was auto-generated by scripts/genColour from ofx-native-v1.5_aces-v1.3_ocio-v2.3. */ +// For use with kOfxImageEffectPropColourManagementAvailableConfigs +#define kOfxConfigIdentifier "ofx-native-v1.5_aces-v1.3_ocio-v2.3" // Basic Colourspaces // These colourspaces are generic names for any colourspace with the correct attributes. -/** @brief ofx_hdr -Any display-referred HDR video such as Rec. 2020 HLG or PQ. +/** @brief ofx_display_hdr +Any display-referred HDR video such as Rec. 2100 HLG or PQ. */ -#define kOfxColourspaceOfxHdr "ofx_hdr" -#define kOfxColourspaceOfxHdrLabel "ofx_hdr" -#define kOfxColourspaceOfxHdrEncoding "hdr-video" -#define kOfxColourspaceOfxHdrIsData false -#define kOfxColourspaceOfxHdrIsBasic true -#define kOfxColourspaceOfxHdrIsCore true -#define kOfxColourspaceOfxHdrIsDisplay true - -/** @brief ofx_linear -Any scene-referred linear colourspace. -*/ -#define kOfxColourspaceOfxLinear "ofx_linear" -#define kOfxColourspaceOfxLinearLabel "ofx_linear" -#define kOfxColourspaceOfxLinearEncoding "scene-linear" -#define kOfxColourspaceOfxLinearIsData false -#define kOfxColourspaceOfxLinearIsBasic true -#define kOfxColourspaceOfxLinearIsCore true -#define kOfxColourspaceOfxLinearIsDisplay false - -/** @brief ofx_log -Any scene-referred colourspace with a log transfer function. +#define kOfxColourspaceOfxDisplayHdr "ofx_display_hdr" +#define kOfxColourspaceOfxDisplayHdrLabel "OFX generic display HDR" +#define kOfxColourspaceOfxDisplayHdrEncoding "hdr-video" +#define kOfxColourspaceOfxDisplayHdrIsData false +#define kOfxColourspaceOfxDisplayHdrIsBasic true +#define kOfxColourspaceOfxDisplayHdrIsCore true +#define kOfxColourspaceOfxDisplayHdrIsDisplay true + +/** @brief ofx_display_sdr +Any display-referred SDR video such as Rec. 709. */ -#define kOfxColourspaceOfxLog "ofx_log" -#define kOfxColourspaceOfxLogLabel "ofx_log" -#define kOfxColourspaceOfxLogEncoding "log" -#define kOfxColourspaceOfxLogIsData false -#define kOfxColourspaceOfxLogIsBasic true -#define kOfxColourspaceOfxLogIsCore true -#define kOfxColourspaceOfxLogIsDisplay false +#define kOfxColourspaceOfxDisplaySdr "ofx_display_sdr" +#define kOfxColourspaceOfxDisplaySdrLabel "OFX generic display SDR" +#define kOfxColourspaceOfxDisplaySdrEncoding "sdr-video" +#define kOfxColourspaceOfxDisplaySdrIsData false +#define kOfxColourspaceOfxDisplaySdrIsBasic true +#define kOfxColourspaceOfxDisplaySdrIsCore true +#define kOfxColourspaceOfxDisplaySdrIsDisplay true /** @brief ofx_raw Image values should not be treated as colour, e.g. motion vectors or masks. */ #define kOfxColourspaceOfxRaw "ofx_raw" -#define kOfxColourspaceOfxRawLabel "ofx_raw" +#define kOfxColourspaceOfxRawLabel "OFX generic raw" #define kOfxColourspaceOfxRawEncoding "" #define kOfxColourspaceOfxRawIsData true #define kOfxColourspaceOfxRawIsBasic true #define kOfxColourspaceOfxRawIsCore true #define kOfxColourspaceOfxRawIsDisplay false -/** @brief ofx_sdr -Any display-referred SDR video such as Rec. 709. +/** @brief ofx_scene_linear +Any scene-referred linear colourspace. +*/ +#define kOfxColourspaceOfxSceneLinear "ofx_scene_linear" +#define kOfxColourspaceOfxSceneLinearLabel "OFX generic scene linear" +#define kOfxColourspaceOfxSceneLinearEncoding "scene-linear" +#define kOfxColourspaceOfxSceneLinearIsData false +#define kOfxColourspaceOfxSceneLinearIsBasic true +#define kOfxColourspaceOfxSceneLinearIsCore true +#define kOfxColourspaceOfxSceneLinearIsDisplay false + +/** @brief ofx_scene_log +Any scene-referred colourspace with a log transfer function. */ -#define kOfxColourspaceOfxSdr "ofx_sdr" -#define kOfxColourspaceOfxSdrLabel "ofx_sdr" -#define kOfxColourspaceOfxSdrEncoding "sdr-video" -#define kOfxColourspaceOfxSdrIsData false -#define kOfxColourspaceOfxSdrIsBasic true -#define kOfxColourspaceOfxSdrIsCore true -#define kOfxColourspaceOfxSdrIsDisplay true +#define kOfxColourspaceOfxSceneLog "ofx_scene_log" +#define kOfxColourspaceOfxSceneLogLabel "OFX generic scene log" +#define kOfxColourspaceOfxSceneLogEncoding "log" +#define kOfxColourspaceOfxSceneLogIsData false +#define kOfxColourspaceOfxSceneLogIsBasic true +#define kOfxColourspaceOfxSceneLogIsCore true +#define kOfxColourspaceOfxSceneLogIsDisplay false // Core Colourspaces diff --git a/include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio similarity index 99% rename from include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio rename to include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio index dece8ee7..d071cf66 100644 --- a/include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio +++ b/include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio @@ -5,7 +5,7 @@ environment: search_path: "" strictparsing: true luma: [0.2126, 0.7152, 0.0722] -name: openfx-native-v1.5_aces-v1.3_ocio-v2.3 +name: ofx-native-v1.5_aces-v1.3_ocio-v2.3 description: | OpenFX 1.5 Native Mode Config Based on: Academy Color Encoding System - Studio Config [COLORSPACES v2.1.0] [ACES v1.3] [OCIO v2.3] diff --git a/include/ofxColour.h b/include/ofxColour.h index 594757f6..96b78885 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -15,13 +15,13 @@ Contains the API for colourspace data exchange. /** @brief What style of colour management does the host or plug-in offer? - Type - string X 1 - - Property Set - host descriptor (read only), plugin descriptor (read/write) + - Property Set - host descriptor (read only), plugin descriptor (read/write), image effect instance (read only) - Default - kOfxImageEffectPropColourManagementStyleNone - Valid Values - This must be one of - ::kOfxImageEffectPropColourManagementNone - no colour management - - ::kOfxImageEffectPropColourManagementBasic - only basic colourspaces from ofxColourspaceList.h may be used - - ::kOfxImageEffectPropColourManagementCore - only core colourspaces from ofxColourspaceList.h may be used - - ::kOfxImageEffectPropColourManagementFull - any colourspace from ofxColourspaceList.h may be used + - ::kOfxImageEffectPropColourManagementBasic - only basic colourspaces from the config header may be used + - ::kOfxImageEffectPropColourManagementCore - only core colourspaces from the config header may be used + - ::kOfxImageEffectPropColourManagementFull - any colourspace from the config header may be used - ::kOfxImageEffectPropColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library) Hosts should set this property if they will provide colourspace information @@ -32,17 +32,19 @@ Collectively, the full, core and basic styles are referred to as native colour management. OCIO is used as the reference for the colour management API, but is not required to implement the native styles. -The colourspace strings used in the native styles are from -openfx-native-1.5.ocio, which is based on the OCIO ACES Studio built-in -config, studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes -in ofxColourspaceList.h. Additionally, there is a scheme for cross-referencing -between clips, and a set of "basic colourspaces", which are designed to be -generic names for a family of colourspaces. When a basic colourspace is used, -this means the host is free to choose any colourspace with the same encoding -and reference space (scene vs display). +The colourspace strings used in the native styles are from ofx-native-1.5.ocio, +which is based on the OCIO ACES Studio built-in config, +studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes in +openfx-native-v1.5_aces-v1.3_ocio-v2.3.h (referred to as the config header). +Additionally, there is a scheme for cross-referencing between clips, and a set +of "basic colourspaces", which are designed to be generic names for a family of +colourspaces. When a basic colourspace is used, this means the host is free to +choose any colourspace with the same encoding and reference space (scene vs +display). The assumption is that OCIO > Full > Core > Basic, so the highest style -supported by both host and plug-in will be chosen. +supported by both host and plug-in should usually be chosen by the host. +The chosen style must be set using this property on an image effect instance. */ #define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" @@ -57,6 +59,33 @@ supported by both host and plug-in will be chosen. /* String used to indicate that OCIO colour management is available. */ #define kOfxImageEffectPropColourManagementOCIO "OfxImageEffectPropColourManagementOCIO" +/** @brief What native mode configs are supported? + + - Type - string X N + - Property Set - host descriptor (read only), plugin descriptor (read/write) + - Valid Values - A list of config identifiers. The only currently supported + value is ofx-native-v1.5_aces-v1.3_ocio-v2.3. + +While the API for colour management is expected to be stable, the set of +colourspaces will evolve over time. This property must be set by both plug-ins +and hosts specifying the list of native mode configs that are available on each +side. +*/ +#define kOfxImageEffectPropColourManagementAvailableConfigs "OfxImageEffectPropColourManagementAvailableConfigs" + +/** @brief The native colour management config to be used for this instance + + - Type - string X 1 + - Property Set - image effect instance (read only) + - Valid Values - any string provided by the plug-in in + kOfxImageEffectPropColourManagementAvailableConfigs + +If kOfxImageEffectPropColourManagementStyle for the instance is a native style, +the host must set this property to indicate the native colour management config +the plug-in should be used to look up colourspace strings. +*/ +#define kOfxImageEffectPropColourManagementConfig "OfxImageEffectPropColourManagementConfig" + /** @brief The path to the OCIO config used for this instance - Type - string X 1 @@ -66,20 +95,6 @@ supported by both host and plug-in will be chosen. A host must set this property on any effect instances where it has negotiated OCIO colour management (kOfxImageEffectPropColourManagementOCIO). Use of URIs for built-in configs, such as ocio://default is permitted. - -When the core or full styles are in use, a host must set this property to -point to an OCIO config which defines all the colourspaces required for that -style, which will allow a plug-in that uses OCIO to work directly with native -styles. The included config, openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio, is -suitable, but hosts might provide a different config which is compatible. If -hosts choose to use their own config, its definitions for native colourspaces -must exactly match those found in openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio. - -As basic colourspaces are not defined in the OpenFX native config, hosts may -set this property as they wish when using the basic style. If hosts do provide -a config, an OCIO-based plug-in may attempt to use it to look up mappings for -basic colourspaces, but leaving those undefined must not be considered an -error. */ #define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig" @@ -103,9 +118,9 @@ kOfxImageClipPropPreferredColourspace where reasonable. Cross-referencing between clips is possible by setting this property to "OfxColourspace_". For example a plug-in may set this property on its output clip to "OfxColourspace_Source", telling the host that the colourspace -of the output matches the input. In the basic style, plug-ins are recommended -to use cross-referencing for their output clip unless kOfxColourspaceRaw is -required. +of the output matches the "Source" input clip. In the basic style, plug-ins +are recommended to use cross-referencing for their output clip unless +kOfxColourspaceRaw is required. If a clip sets OfxImageClipPropIsMask or it only supports OfxImageComponentAlpha, colour management is disabled and this property @@ -118,9 +133,9 @@ must be unset. - Type - string X N - Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write) - Valid Values - colourspace that is permitted under the style in use. - For Basic, any colourspace from ofxColourspaceList.h where IsBasic is true. - For Core, any colourspace from ofxColourspaceList.h where IsCore is true. - For Full, any colourspace from ofxColourspaceList.h. + For Basic, any colourspace from the config header where IsBasic is true. + For Core, any colourspace from the config header where IsCore is true. + For Full, any colourspace from the config header. For OCIO, any string acceptable to Config::getColorSpace(). Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences @@ -156,11 +171,9 @@ plug-in is capable of adapting to any input colourspace, it should not set this preference. Cross-referencing between clips is possible by setting this property to -"OfxColourspace_". For example a plug-in may set this property on a -second input clip to "OfxColourspace_Source" to tell the host it would like -both input clips to be in the same colourspace. A host might set the same -thing on the plug-in's output clip to request that the plug-in outputs the -same colourspace as the input. +"OfxColourspace_". For example, a plug-in in a transition context may set +this property on its "SourceTo" clip to "OfxColourspace_SourceFrom", telling +the host it would like both input clips to be in the same colourspace. If a plug-in has inputs which expect motion vectors, depth values or other non-colour channels, it should set the preferred colourspace to @@ -174,7 +187,7 @@ the request and set kOfxImageClipPropColourspace to kOfxColourspaceRaw. - Type - string X 1 - Property Set - image effect instance (read only) - - Valid Values - any colourspace from ofxColourspaceList.h + - Valid Values - any colourspace from the config header Used with native colour management styles, this property is relevant for plug-ins which have their own viewport in a custom window. Plug-ins should @@ -215,20 +228,24 @@ If not defined, the default rules for choosing a view will be followed. This action allows a host to ask an effect, given a list of preferred colourspaces, what colourspace will be used for its output clip. This should be called after first gathering the plug-ins preferred input colourspaces - via OfxImageEffectActionGetClipPreferences. The host must set - kOfxImageClipPropColourspace on the output clip to the chosen colourspace, - or the default value of OfxColourspace_Source. + via OfxImageEffectActionGetClipPreferences. + + Cross-references to input clip colourspaces are permitted, for example in a + filter context, the host might request "OfxColourspace_Source". @param handle handle to the instance, cast to an \ref OfxImageEffectHandle @param inArgs has the property - - \ref kOfxImageClipPropPreferredColourspaces the list of preferred colourspaces + - \ref kOfxImageClipPropPreferredColourspaces the host's list of preferred colourspaces @param outArgs has the property - - \ref kOfxImageClipPropColourspace the colourspace selected by the plug-in + - \ref kOfxImageClipPropColourspace the colourspace selected by the plug-in, + which may be a cross-reference to an input clip. @returns - - \ref kOfxStatOK, the action was trapped and the colourspace was set in the outArgs property set - - \ref kOfxStatReplyDefault, the action was not trapped and the host should use the default value of OfxColourspace_Source + - \ref kOfxStatOK, the action was trapped and the colourspace was set in + the outArgs property set + - \ref kOfxStatReplyDefault, the action was not trapped and the host + should use the colourspace of the first input clip - \ref kOfxStatErrMemory, in which case the action may be called again after a memory purge - \ref kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message - \ref kOfxStatErrFatal diff --git a/scripts/genColour b/scripts/genColour index d302c787..dab251ac 100755 --- a/scripts/genColour +++ b/scripts/genColour @@ -5,14 +5,14 @@ # Extract information from an OCIO config to C header. # Example invocation: -# OCIO=include/openfx-native-v1.5_aces-v1.3_ocio-v2.3.ocio scripts/genColour > include/ofxColourspaceList.h +# OCIO=include/ofx-native-v1.5_aces-v1.3_ocio-v2.3.ocio scripts/genColour > include/ofxColourspaceList.h import sys import PyOpenColorIO as OCIO from string import Template -header = '''#ifndef _ofxColourspaceList_h_ -#define _ofxColourspaceList_h_ +header = '''#ifndef _${config_name_us}_h_ +#define _${config_name_us}_h_ // Copyright OpenFX and contributors to the OpenFX project. // SPDX-License-Identifier: BSD-3-Clause @@ -25,6 +25,9 @@ extern "C" { Contains the list of supported colourspaces. This file was auto-generated by scripts/genColour from $config_name. */ + +// For use with kOfxImageEffectPropColourManagementAvailableConfigs +#define kOfxConfigIdentifier "$config_name" ''' footer = ''' @@ -36,10 +39,10 @@ footer = ''' ''' role_docs = { - 'ofx_sdr': 'Any display-referred SDR video such as Rec. 709.', - 'ofx_hdr': 'Any display-referred HDR video such as Rec. 2020 HLG or PQ.', - 'ofx_log': 'Any scene-referred colourspace with a log transfer function.', - 'ofx_linear': 'Any scene-referred linear colourspace.', + 'ofx_display_sdr': 'Any display-referred SDR video such as Rec. 709.', + 'ofx_display_hdr': 'Any display-referred HDR video such as Rec. 2100 HLG or PQ.', + 'ofx_scene_log': 'Any scene-referred colourspace with a log transfer function.', + 'ofx_scene_linear': 'Any scene-referred linear colourspace.', 'ofx_raw': 'Image values should not be treated as colour, e.g. motion vectors or masks.', 'aces_interchange': 'Guaranteed to be ACES2065-1.', 'cie_xyz_d65_interchange': 'CIE XYZ colorimetry with the neutral axis at D65.', @@ -52,6 +55,14 @@ role_docs = { 'texture_paint': 'A colourspace suitable for texture painting, typically sRGB.' } +basic_colourspace_labels = { + 'ofx_display_sdr': 'OFX generic display SDR', + 'ofx_display_hdr': 'OFX generic display HDR', + 'ofx_scene_log': 'OFX generic scene log', + 'ofx_scene_linear': 'OFX generic scene linear', + 'ofx_raw': 'OFX generic raw' +} + chars_to_delete = str.maketrans('', '', ' -.()') def camel_name(name): return ' '.join([word[0].upper() + word[1:] for word in name.replace(' ', '_').split('_')]).translate(chars_to_delete) @@ -83,7 +94,7 @@ def print_basic_colourspace(role): spc = ofx_config.getColorSpace(role[1]) print(f'\n/** @brief {role_name}\n{role_docs[role_name]}\n*/') print_name(role_name) - print_metadata(role_name, role_name, spc.getReferenceSpaceType(), spc.getEncoding(), spc.isData(), True, True) + print_metadata(role_name, basic_colourspace_labels[role_name], spc.getReferenceSpaceType(), spc.getEncoding(), spc.isData(), True, True) def print_role(role): role_name = role[0] @@ -108,7 +119,7 @@ def print_colourspace(spc, is_core): print_metadata(name, label, spc.getReferenceSpaceType(), spc.getEncoding(), spc.isData(), False, is_core) # OFX-specific set of basic roles -basic_roles = ['ofx_raw', 'ofx_linear', 'ofx_sdr', 'ofx_log', 'ofx_hdr'] +basic_roles = ['ofx_raw', 'ofx_scene_linear', 'ofx_display_sdr', 'ofx_scene_log', 'ofx_display_hdr'] # OFX-specific set of core colourspaces core_spaces = ['srgb_display', 'displayp3_display', 'rec1886_rec709_display', @@ -127,15 +138,17 @@ ofx_config = OCIO.GetCurrentConfig() # to avoid creating an expectation that these mappings should always be used. # The assigned colourspaces are chosen simply to generate the correct # attributes in the header. -ofx_config.setRole('ofx_sdr', 'rec1886_rec709_display') -ofx_config.setRole('ofx_hdr', 'rec2100_hlg_display') -ofx_config.setRole('ofx_log', 'ACEScct') -ofx_config.setRole('ofx_linear', 'ACEScg') +ofx_config.setRole('ofx_display_sdr', 'rec1886_rec709_display') +ofx_config.setRole('ofx_display_hdr', 'rec2100_hlg_display') +ofx_config.setRole('ofx_scene_log', 'ACEScct') +ofx_config.setRole('ofx_scene_linear', 'ACEScg') ofx_config.setRole('ofx_raw', 'raw') -print(Template(header).substitute(config_name=ofx_config.getName())) +config_name = ofx_config.getName() +print(Template(header).substitute(config_name=config_name, + config_name_us=config_name.replace('-', '_').replace('.', '_'))) -print('\n// Basic Colourspaces\n// These colourspaces are generic names for any colourspace with the correct attributes.') +print('// Basic Colourspaces\n// These colourspaces are generic names for any colourspace with the correct attributes.') for basic_role in [role for role in ofx_config.getRoles() if role[0] in basic_roles]: print_basic_colourspace(basic_role) diff --git a/scripts/genOCIOConfig b/scripts/genOCIOConfig index 84fa937e..16eb831a 100755 --- a/scripts/genOCIOConfig +++ b/scripts/genOCIOConfig @@ -18,7 +18,7 @@ srgb_tx.setEncoding('sdr-video') # Make all colourspaces active, future OCIO configs will also do this ofx_config.setInactiveColorSpaces('') -ofx_config.setName(f'openfx-native-v1.5_aces-v1.3_ocio-v2.3') +ofx_config.setName(f'ofx-native-v1.5_aces-v1.3_ocio-v2.3') ofx_config.setDescription(f'OpenFX 1.5 Native Mode Config\nBased on: {ofx_config.getDescription()}') ofx_config.validate() # will throw if there's an error From b3caf78ee78cf2432db7ade9c4f54fd5814cfc41 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 12 Jul 2024 08:27:48 +0100 Subject: [PATCH 23/34] Allow use of basic colourspaces in OCIO mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makse sense to allow the use of basic colourspaces in OCIO mode, but in order to allow that, it’s necessary for negotiate the native-mode config even in OCIO mode, to allow for future changes to the set of basic colourspaces. Also some minor doc improvements. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index 96b78885..cd80ee27 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -35,7 +35,7 @@ API, but is not required to implement the native styles. The colourspace strings used in the native styles are from ofx-native-1.5.ocio, which is based on the OCIO ACES Studio built-in config, studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes in -openfx-native-v1.5_aces-v1.3_ocio-v2.3.h (referred to as the config header). +ofx-native-v1.5_aces-v1.3_ocio-v2.3.h (referred to as the config header). Additionally, there is a scheme for cross-referencing between clips, and a set of "basic colourspaces", which are designed to be generic names for a family of colourspaces. When a basic colourspace is used, this means the host is free to @@ -44,7 +44,8 @@ display). The assumption is that OCIO > Full > Core > Basic, so the highest style supported by both host and plug-in should usually be chosen by the host. -The chosen style must be set using this property on an image effect instance. +The chosen style must be set by the host using this property on an image +effect instance. */ #define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle" @@ -80,9 +81,9 @@ side. - Valid Values - any string provided by the plug-in in kOfxImageEffectPropColourManagementAvailableConfigs -If kOfxImageEffectPropColourManagementStyle for the instance is a native style, -the host must set this property to indicate the native colour management config -the plug-in should be used to look up colourspace strings. +The host must set this property to indicate the native colour management config +the plug-in should be used to look up colourspace strings. It is important to +set this even in OCIO mode, to define the basic colourspaces. */ #define kOfxImageEffectPropColourManagementConfig "OfxImageEffectPropColourManagementConfig" @@ -136,7 +137,7 @@ must be unset. For Basic, any colourspace from the config header where IsBasic is true. For Core, any colourspace from the config header where IsCore is true. For Full, any colourspace from the config header. - For OCIO, any string acceptable to Config::getColorSpace(). + For OCIO, any string acceptable to Config::getColorSpace(), or a basic colourspace. Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences to request images in a colourspace which is convenient for them. The @@ -146,7 +147,7 @@ prefer more esoteric colourspaces, they are encouraged to also include basic colourspacesas a fallback. For example a colour grading plug-in which supports a specific camera and expects a log colourspace might list: -"arri_logc4", "arri_logc3_ei800", "ACEScct", "ofx_log" +"arri_logc4", "arri_logc3_ei800", "ACEScct", "ofx_scene_log" The host is free to choose any colourspace from this list, but should favour the first mutually agreeable colourspace, and set kOfxImageClipPropColourspace @@ -159,16 +160,20 @@ In the event that the host cannot supply images in a requested colourspace, it may supply images in any valid colourspace. Plug-ins must check kOfxImageClipPropColourspace to see if their request was satisfied. -Hosts may set this on an output clip, which could be helpful in a generator -context, and plug-ins should follow the same logic as hosts when deciding -which colourspace to use. +In both native and OCIO modes, it is recommended to include basic colourspaces +in this list, because this gives the host more flexibility to avoid unnecessary +colourspace conversions. + +Hosts can invoke kOfxImageEffectActionGetOutputColourspace to set this on an +output clip, which could be helpful in a generator context, and plug-ins should +follow the same logic as hosts when deciding which colourspace to use. It might be much less costly for a host to perform a conversion than a plug-in, so in the example of a plug-in which performs all internal processing in scene linear, it is sensible for the plug-in to universally -assert that preference and the host to honour it if possible. However, if a -plug-in is capable of adapting to any input colourspace, it should not set -this preference. +assert that preference by preferring kOfxColourspaceOfxSceneLinear, and for +the host to honour it if possible. However, if a plug-in is capable of +adapting to any input colourspace, it should not set this preference. Cross-referencing between clips is possible by setting this property to "OfxColourspace_". For example, a plug-in in a transition context may set From be3de0e4048f08d13b215d3766f851dab4fa4eae Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 12 Jul 2024 08:31:20 +0100 Subject: [PATCH 24/34] Minor doc fix Signed-off-by: John-Paul Smith --- include/ofxColour.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index cd80ee27..6eacf32a 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -32,8 +32,8 @@ Collectively, the full, core and basic styles are referred to as native colour management. OCIO is used as the reference for the colour management API, but is not required to implement the native styles. -The colourspace strings used in the native styles are from ofx-native-1.5.ocio, -which is based on the OCIO ACES Studio built-in config, +The colourspace strings used in the native styles are from an OFX-specific +OCIO config which is currently based on the OCIO ACES Studio built-in config, studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes in ofx-native-v1.5_aces-v1.3_ocio-v2.3.h (referred to as the config header). Additionally, there is a scheme for cross-referencing between clips, and a set From 9a7eec41aa2ee776238b8ff256e0e36860e2cf37 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Fri, 12 Jul 2024 08:49:17 +0100 Subject: [PATCH 25/34] Doc clarifications for OCIO mode Clarifying the use of basic colourspaces. Signed-off-by: John-Paul Smith --- include/ofxColour.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/ofxColour.h b/include/ofxColour.h index 6eacf32a..c4cc7d70 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -103,7 +103,8 @@ Use of URIs for built-in configs, such as ocio://default is permitted. - Type - string X 1 - Property Set - clip instance (read/write) - - Valid Values - colourspace that is permitted under the style in use + - Valid Values - colourspace that is permitted under the style in use. + For OCIO, any string acceptable to Config::getColorSpace() Hosts should set this property to the colourspace of the input clip. Typically it will be set to the working colourspace of the host but could be any valid @@ -116,6 +117,11 @@ kOfxColourspaceRaw, Both host and plug-in should use the value of kOfxImageClipPropPreferredColourspace where reasonable. +In OCIO mode, a basic colourspace may have been requested via +kOfxImageClipPropPreferredColourspaces, but the actual colourspace used should +be reported in this property. If an OCIO host has added the basic colourspaces +to its config as roles or aliases, they would be permitted here. + Cross-referencing between clips is possible by setting this property to "OfxColourspace_". For example a plug-in may set this property on its output clip to "OfxColourspace_Source", telling the host that the colourspace From 3316c2e7d0b7ba5f2810d18b401923c196ba527e Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 30 Apr 2024 08:33:36 -0400 Subject: [PATCH 26/34] Add Colourspace example Signed-off-by: Gary Oberbrunner --- CMakeLists.txt | 5 +- Examples/CMakeLists.txt | 3 + Examples/ColorSpace/Info.plist | 20 + Examples/ColorSpace/colorspace.cpp | 1085 ++++++++++++++++++++++++++++ conanfile.py | 6 +- include/ofxColour.h | 2 +- 6 files changed, 1118 insertions(+), 3 deletions(-) create mode 100644 Examples/ColorSpace/Info.plist create mode 100644 Examples/ColorSpace/colorspace.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b0862260..9769abd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,9 +11,10 @@ else() LANGUAGES CXX) # no CUDA endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_STATIC_LIBRARY_PREFIX "lib") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) add_definitions(-D_HAS_AUTO_PTR_ETC) if(APPLE) set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64") @@ -62,6 +63,8 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_BINARY_DIR}) # Conan packages find_package(EXPAT) find_package(opengl_system REQUIRED) +find_package(cimg REQUIRED) +find_package(spdlog REQUIRED) # Macros include(OpenFX) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 50707a84..623f7915 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -3,6 +3,7 @@ set(OFX_SUPPORT_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Support/include") set(PLUGINS Basic ChoiceParams + ColorSpace Custom DepthConverter Invert @@ -27,3 +28,5 @@ endforeach() target_link_libraries(example-OpenGL PRIVATE opengl::opengl) target_link_libraries(example-Custom PRIVATE opengl::opengl) +target_link_libraries(example-ColorSpace PRIVATE cimg::cimg) +target_link_libraries(example-ColorSpace PRIVATE spdlog::spdlog_header_only) diff --git a/Examples/ColorSpace/Info.plist b/Examples/ColorSpace/Info.plist new file mode 100644 index 00000000..21152b3e --- /dev/null +++ b/Examples/ColorSpace/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + basic.ofx + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 0.0.1d1 + CSResourcesFileMapped + + + diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColorSpace/colorspace.cpp new file mode 100644 index 00000000..1e5992a2 --- /dev/null +++ b/Examples/ColorSpace/colorspace.cpp @@ -0,0 +1,1085 @@ +// Copyright OpenFX and contributors to the OpenFX project. +// SPDX-License-Identifier: BSD-3-Clause + + +/* + Plugin example demonstrating colourspace handling + */ +#include +#include +#include +#include +#include +#include +#include "spdlog/spdlog.h" +#include "ofxImageEffect.h" +#include "ofxMemory.h" +#include "ofxMultiThread.h" +#include "ofxColour.h" +#include "ofxColourspaceList.h" + +#include "../include/ofxUtilities.H" // example support utils + +#if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ +# define EXPORT __attribute__((visibility("default"))) +#elif defined _WIN32 +# define EXPORT OfxExport +#else +# error Not building on your operating system quite yet +#endif + +const char *errMsg(int err) { + switch (err) { + case kOfxStatOK: return "OK"; + case kOfxStatFailed : return "Failed"; + case kOfxStatErrFatal: return "ErrFatal"; + case kOfxStatErrUnknown: return "ErrUnknown"; + case kOfxStatErrMissingHostFeature: return "ErrMissingHostFeature"; + case kOfxStatErrUnsupported: return "ErrUnsupported"; + case kOfxStatErrExists : return "ErrExists "; + case kOfxStatErrFormat: return "ErrFormat"; + case kOfxStatErrMemory : return "ErrMemory"; + case kOfxStatErrBadHandle: return "ErrBadHandle"; + case kOfxStatErrBadIndex: return "ErrBadIndex"; + case kOfxStatErrValue: return "ErrValue"; + case kOfxStatReplyYes: return "ReplyYes"; + case kOfxStatReplyNo: return "ReplyNo"; + case kOfxStatReplyDefault: return "ReplyDefault"; + default: return "Unknown!?"; + } +} + +// pointers to various bits of the host +OfxHost *gHost; +OfxImageEffectSuiteV1 *gEffectHost = 0; +OfxPropertySuiteV1 *gPropHost = 0; +OfxParameterSuiteV1 *gParamHost = 0; +OfxMemorySuiteV1 *gMemoryHost = 0; +OfxMultiThreadSuiteV1 *gThreadHost = 0; +OfxMessageSuiteV1 *gMessageSuite = 0; +OfxInteractSuiteV1 *gInteractHost = 0; + +// some flags about the host's behaviour +int gHostSupportsMultipleBitDepths = false; +std::string gHostColourManagementStyle; + +// private instance data type +struct MyInstanceData { + bool isGeneralEffect; + + // handles to the clips we deal with + OfxImageClipHandle sourceClip; + OfxImageClipHandle maskClip; + OfxImageClipHandle outputClip; + + // handles to a our parameters + OfxParamHandle scaleParam; + OfxParamHandle perComponentScaleParam; + OfxParamHandle scaleRParam; + OfxParamHandle scaleGParam; + OfxParamHandle scaleBParam; + OfxParamHandle scaleAParam; +}; + +/* mandatory function to set up the host structures */ + + +// Convenience wrapper to get private data +static MyInstanceData * +getMyInstanceData( OfxImageEffectHandle effect) +{ + // get the property handle for the plugin + OfxPropertySetHandle effectProps; + gEffectHost->getPropertySet(effect, &effectProps); + + // get my data pointer out of that + MyInstanceData *myData = 0; + gPropHost->propGetPointer(effectProps, kOfxPropInstanceData, 0, + (void **) &myData); + return myData; +} + +// Convenience wrapper to set the enabledness of a parameter +static inline void +setParamEnabledness( OfxImageEffectHandle effect, + const char *paramName, + int enabledState) +{ + // fetch the parameter set for this effect + OfxParamSetHandle paramSet; + gEffectHost->getParamSet(effect, ¶mSet); + + // fetch the parameter property handle + OfxParamHandle param; OfxPropertySetHandle paramProps; + gParamHost->paramGetHandle(paramSet, paramName, ¶m, ¶mProps); + + // and set its enabledness + gPropHost->propSetInt(paramProps, kOfxParamPropEnabled, 0, enabledState); +} + +// function that sets the enabledness of the percomponent scale parameters +// depending on the value of the +// This function is called when the 'scaleComponents' value is changed +// or when the input clip has been changed +static void +setPerComponentScaleEnabledness( OfxImageEffectHandle effect) +{ + // get my instance data + MyInstanceData *myData = getMyInstanceData(effect); + + // get the value of the percomponent scale param + int perComponentScale; + gParamHost->paramGetValue(myData->perComponentScaleParam, &perComponentScale); + + if(ofxuIsClipConnected(effect, kOfxImageEffectSimpleSourceClipName)) { + OfxPropertySetHandle props; gEffectHost->clipGetPropertySet(myData->sourceClip, &props); + + // get the input clip format + char *pixelType; + gPropHost->propGetString(props, kOfxImageEffectPropComponents, 0, &pixelType); + + // only enable the scales if the input is an RGBA input + perComponentScale = perComponentScale && !(strcmp(pixelType, kOfxImageComponentAlpha) == 0); + } + + // set the enabled/disabled state of the parameter + setParamEnabledness(effect, "scaleR", perComponentScale); + setParamEnabledness(effect, "scaleG", perComponentScale); + setParamEnabledness(effect, "scaleB", perComponentScale); + setParamEnabledness(effect, "scaleA", perComponentScale); +} + +/** @brief Called at load */ +static OfxStatus +onLoad(void) +{ + return kOfxStatOK; +} + +/** @brief Called before unload */ +static OfxStatus +onUnLoad(void) +{ + return kOfxStatOK; +} + +// instance construction +static OfxStatus +createInstance( OfxImageEffectHandle effect) +{ + // get a pointer to the effect properties + OfxPropertySetHandle effectProps; + gEffectHost->getPropertySet(effect, &effectProps); + + // get a pointer to the effect's parameter set + OfxParamSetHandle paramSet; + gEffectHost->getParamSet(effect, ¶mSet); + + // make my private instance data + MyInstanceData *myData = new MyInstanceData; + char *context = 0; + + // is this instance a general effect ? + gPropHost->propGetString(effectProps, kOfxImageEffectPropContext, 0, &context); + myData->isGeneralEffect = context && (strcmp(context, kOfxImageEffectContextGeneral) == 0); + + // cache param handles + gParamHost->paramGetHandle(paramSet, "scaleComponents", &myData->perComponentScaleParam, 0); + gParamHost->paramGetHandle(paramSet, "scale", &myData->scaleParam, 0); + gParamHost->paramGetHandle(paramSet, "scaleR", &myData->scaleRParam, 0); + gParamHost->paramGetHandle(paramSet, "scaleG", &myData->scaleGParam, 0); + gParamHost->paramGetHandle(paramSet, "scaleB", &myData->scaleBParam, 0); + gParamHost->paramGetHandle(paramSet, "scaleA", &myData->scaleAParam, 0); + + // cache clip handles + gEffectHost->clipGetHandle(effect, kOfxImageEffectSimpleSourceClipName, &myData->sourceClip, 0); + gEffectHost->clipGetHandle(effect, kOfxImageEffectOutputClipName, &myData->outputClip, 0); + + if(myData->isGeneralEffect) { + gEffectHost->clipGetHandle(effect, "Mask", &myData->maskClip, 0); + } + else + myData->maskClip = 0; + + // set my private instance data + gPropHost->propSetPointer(effectProps, kOfxPropInstanceData, 0, (void *) myData); + + // As the parameters values have already been loaded, set + // the enabledness of the per component scale values + setPerComponentScaleEnabledness(effect); + + return kOfxStatOK; +} + +// instance destruction +static OfxStatus +destroyInstance( OfxImageEffectHandle effect) +{ + // get my instance data + MyInstanceData *myData = getMyInstanceData(effect); + + // and delete it + if(myData) + delete myData; + return kOfxStatOK; +} + +// tells the host what region we are capable of filling +OfxStatus +getSpatialRoD( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs) +{ + // retrieve any instance data associated with this effect + MyInstanceData *myData = getMyInstanceData(effect); + + OfxTime time; + gPropHost->propGetDouble(inArgs, kOfxPropTime, 0, &time); + + // my RoD is the same as my input's + OfxRectD rod; + gEffectHost->clipGetRegionOfDefinition(myData->sourceClip, time, &rod); + + // note that the RoD is _not_ dependent on the Mask clip + + // set the rod in the out args + gPropHost->propSetDoubleN(outArgs, kOfxImageEffectPropRegionOfDefinition, 4, &rod.x1); + + return kOfxStatOK; +} + +// tells the host how much of the input we need to fill the given window +OfxStatus +getSpatialRoI( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs) +{ + // get the RoI the effect is interested in from inArgs + OfxRectD roi; + gPropHost->propGetDoubleN(inArgs, kOfxImageEffectPropRegionOfInterest, 4, &roi.x1); + + // the input needed is the same as the output, so set that on the source clip + gPropHost->propSetDoubleN(outArgs, "OfxImageClipPropRoI_Source", 4, &roi.x1); + + // retrieve any instance data associated with this effect + MyInstanceData *myData = getMyInstanceData(effect); + + // if a general effect, we need to know the mask as well + if(myData->isGeneralEffect && ofxuIsClipConnected(effect, "Mask")) { + gPropHost->propSetDoubleN(outArgs, "OfxImageClipPropRoI_Mask", 4, &roi.x1); + } + return kOfxStatOK; +} + +// Tells the host how many frames we can fill. Only called in the general context. +// This shows the default behaviour; shown for illustrative purposes. +OfxStatus +getTemporalDomain( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs*/, OfxPropertySetHandle outArgs) +{ + MyInstanceData *myData = getMyInstanceData(effect); + + double sourceRange[2]; + + // get the frame range of the source clip + OfxPropertySetHandle props; gEffectHost->clipGetPropertySet(myData->sourceClip, &props); + gPropHost->propGetDoubleN(props, kOfxImageEffectPropFrameRange, 2, sourceRange); + + // set it on the out args + gPropHost->propSetDoubleN(outArgs, kOfxImageEffectPropFrameRange, 2, sourceRange); + + return kOfxStatOK; +} + + +// Set our clip preferences +static OfxStatus +getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs*/, OfxPropertySetHandle outArgs) +{ + // retrieve any instance data associated with this effect + MyInstanceData *myData = getMyInstanceData(effect); + + // get the component type and bit depth of our main input + int bitDepth; + bool isRGBA; + ofxuClipGetFormat(myData->sourceClip, bitDepth, isRGBA, true); // get the unmapped clip component + + // get the strings used to label the various bit depths + const char *bitDepthStr = bitDepth == 8 ? kOfxBitDepthByte : (bitDepth == 16 ? kOfxBitDepthShort : kOfxBitDepthFloat); + const char *componentStr = isRGBA ? kOfxImageComponentRGBA : kOfxImageComponentAlpha; + + // set out output to be the same same as the input, component and bitdepth + gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Output", 0, componentStr); + if(gHostSupportsMultipleBitDepths) + gPropHost->propSetString(outArgs, "OfxImageClipPropDepth_Output", 0, bitDepthStr); + + // if a general effect, we may have a mask input, check that for types + if(myData->isGeneralEffect) { + if(ofxuIsClipConnected(effect, "Mask")) { + // set the mask input to be a single channel image of the same bitdepth as the source + gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Mask", 0, kOfxImageComponentAlpha); + if(gHostSupportsMultipleBitDepths) + gPropHost->propSetString(outArgs, "OfxImageClipPropDepth_Mask", 0, bitDepthStr); + } + } + + // Colour management -- preferred colour spaces, in order (most preferred first) +#define PREFER_COLOURSPACES +#ifdef PREFER_COLOURSPACES + if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { + spdlog::info("Specifying preferred colourspaces since host style={}", gHostColourManagementStyle); + const char* colourSpaces[] = { + kOfxColourspaceACEScg, + kOfxColourspaceLinRec2020, + kOfxColourspaceRoleSceneLinear}; + for (int i = 0; i < std::size(colourSpaces); i++) { + spdlog::info("Specifying preferred colourspace {} = {}", i, colourSpaces[i]); + gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces, + i, colourSpaces[i]); + } + } else { + spdlog::info("Host does not support colour management (this example won't be very interesting)"); + } +#endif + + return kOfxStatOK; +} + +// are the settings of the effect performing an identity operation +static OfxStatus +isIdentity( OfxImageEffectHandle effect, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle outArgs) +{ + return kOfxStatReplyDefault; // this example is never identity; always render +} + +//////////////////////////////////////////////////////////////////////////////// +// function called when the instance has been changed by anything +static OfxStatus +instanceChanged( OfxImageEffectHandle effect, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle /*outArgs*/) +{ + // see why it changed + char *changeReason; + gPropHost->propGetString(inArgs, kOfxPropChangeReason, 0, &changeReason); + + // we are only interested in user edits + if(strcmp(changeReason, kOfxChangeUserEdited) != 0) return kOfxStatReplyDefault; + + // fetch the type of the object that changed + char *typeChanged; + gPropHost->propGetString(inArgs, kOfxPropType, 0, &typeChanged); + + // was it a clip or a param? + bool isClip = strcmp(typeChanged, kOfxTypeClip) == 0; + bool isParam = strcmp(typeChanged, kOfxTypeParameter) == 0; + + // get the name of the thing that changed + char *objChanged; + gPropHost->propGetString(inArgs, kOfxPropName, 0, &objChanged); + + // Did the source clip change or the 'scaleComponents' change? In which case enable/disable individual component scale parameters + if((isClip && strcmp(objChanged, kOfxImageEffectSimpleSourceClipName) == 0) || + (isParam && strcmp(objChanged, "scaleComponents") == 0)) { + setPerComponentScaleEnabledness(effect); + return kOfxStatOK; + } + + // don't trap any others + return kOfxStatReplyDefault; +} + +//////////////////////////////////////////////////////////////////////////////// +// rendering routines +template inline T +Clamp(T v, int min, int max) +{ + if(v < T(min)) return T(min); + if(v > T(max)) return T(max); + return v; +} + +// look up a pixel in the image, does bounds checking to see if it is in the image rectangle +template inline PIX * +pixelAddress(PIX *img, OfxRectI rect, int x, int y, int bytesPerLine) +{ + if(x < rect.x1 || x >= rect.x2 || y < rect.y1 || y >= rect.y2 || !img) + return 0; + PIX *pix = (PIX *) (((char *) img) + (y - rect.y1) * bytesPerLine); + pix += x - rect.x1; + return pix; +} + +//////////////////////////////////////////////////////////////////////////////// +// base class to process images with +class Processor { + protected : + OfxImageEffectHandle instance; + float rScale, gScale, bScale, aScale; + void *srcV, *dstV, *maskV; + OfxRectI srcRect, dstRect, maskRect; + int srcBytesPerLine, dstBytesPerLine, maskBytesPerLine; + OfxRectI window; + + public : + Processor(OfxImageEffectHandle inst, + float rScal, float gScal, float bScal, float aScal, + void *src, OfxRectI sRect, int sBytesPerLine, + void *dst, OfxRectI dRect, int dBytesPerLine, + void *mask, OfxRectI mRect, int mBytesPerLine, + OfxRectI win) + : instance(inst) + , rScale(rScal) + , gScale(gScal) + , bScale(bScal) + , aScale(aScal) + , srcV(src) + , dstV(dst) + , maskV(mask) + , srcRect(sRect) + , dstRect(dRect) + , maskRect(mRect) + , srcBytesPerLine(sBytesPerLine) + , dstBytesPerLine(dBytesPerLine) + , maskBytesPerLine(mBytesPerLine) + , window(win) + {} + + static void multiThreadProcessing(unsigned int threadId, unsigned int nThreads, void *arg); + virtual void doProcessing(OfxRectI window) = 0; + void process(void); +}; + + +// function call once for each thread by the host +void +Processor::multiThreadProcessing(unsigned int threadId, unsigned int nThreads, void *arg) +{ + Processor *proc = (Processor *) arg; + + // slice the y range into the number of threads it has + unsigned int dy = proc->window.y2 - proc->window.y1; + + unsigned int y1 = proc->window.y1 + threadId * dy/nThreads; + unsigned int y2 = proc->window.y1 + std::min((threadId + 1) * dy/nThreads, dy); + + OfxRectI win = proc->window; + win.y1 = y1; win.y2 = y2; + + // and render that thread on each + proc->doProcessing(win); +} + +// function to kick off rendering across multiple CPUs +void +Processor::process(void) +{ + unsigned int nThreads; + gThreadHost->multiThreadNumCPUs(&nThreads); + gThreadHost->multiThread(multiThreadProcessing, nThreads, (void *) this); +} + +// template to do the RGBA processing +template +class ProcessRGBA : public Processor{ +public : + ProcessRGBA(OfxImageEffectHandle instance, + float rScale, float gScale, float bScale, float aScale, + void *srcV, OfxRectI srcRect, int srcBytesPerLine, + void *dstV, OfxRectI dstRect, int dstBytesPerLine, + void *maskV, OfxRectI maskRect, int maskBytesPerLine, + OfxRectI window) + : Processor(instance, + rScale, gScale, bScale, aScale, + srcV, srcRect, srcBytesPerLine, + dstV, dstRect, dstBytesPerLine, + maskV, maskRect, maskBytesPerLine, + window) + { + } + + void doProcessing(OfxRectI procWindow) + { + PIX *src = (PIX *) srcV; + PIX *dst = (PIX *) dstV; + MASK *mask = (MASK *) maskV; + + for(int y = procWindow.y1; y < procWindow.y2; y++) { + if(gEffectHost->abort(instance)) break; + + PIX *dstPix = pixelAddress(dst, dstRect, procWindow.x1, y, dstBytesPerLine); + + for(int x = procWindow.x1; x < procWindow.x2; x++) { + + PIX *srcPix = pixelAddress(src, srcRect, x, y, srcBytesPerLine); + + + // do any pixel masking? + float maskV = 1.0f; + if(mask) { + MASK *maskPix = pixelAddress(mask, maskRect, x, y, maskBytesPerLine); + if(maskPix) { + maskV = float(*maskPix)/float(max); + } + else + maskV = 0.0f; + maskPix++; + } + + // figure the scale values per component + float sR = 1.0 + (rScale - 1.0) * maskV; + float sG = 1.0 + (gScale - 1.0) * maskV; + float sB = 1.0 + (bScale - 1.0) * maskV; + float sA = 1.0 + (aScale - 1.0) * maskV; + + if(srcPix) { + // switch will be compiled out + if(isFloat) { + dstPix->r = srcPix->r * sR; + dstPix->g = srcPix->g * sG; + dstPix->b = srcPix->b * sB; + dstPix->a = srcPix->a * sA; + } + else { + dstPix->r = Clamp(int(srcPix->r * sR), 0, max); + dstPix->g = Clamp(int(srcPix->g * sG), 0, max); + dstPix->b = Clamp(int(srcPix->b * sB), 0, max); + dstPix->a = Clamp(int(srcPix->a * sA), 0, max); + } + srcPix++; + } + else { + dstPix->r = dstPix->g = dstPix->b = dstPix->a= 0; + } + dstPix++; + } + } + } +}; + +// template to do the Alpha processing +template +class ProcessAlpha : public Processor { +public : + ProcessAlpha( OfxImageEffectHandle instance, + float scale, + void *srcV, OfxRectI srcRect, int srcBytesPerLine, + void *dstV, OfxRectI dstRect, int dstBytesPerLine, + void *maskV, OfxRectI maskRect, int maskBytesPerLine, + OfxRectI window) + : Processor(instance, + scale, scale, scale, scale, + srcV, srcRect, srcBytesPerLine, + dstV, dstRect, dstBytesPerLine, + maskV, maskRect, maskBytesPerLine, + window) + { + } + + void doProcessing(OfxRectI procWindow) + { + PIX *src = (PIX *) srcV; + PIX *dst = (PIX *) dstV; + MASK *mask = (MASK *) maskV; + + for(int y = procWindow.y1; y < procWindow.y2; y++) { + if(gEffectHost->abort(instance)) break; + + PIX *dstPix = pixelAddress(dst, dstRect, procWindow.x1, y, dstBytesPerLine); + + for(int x = procWindow.x1; x < procWindow.x2; x++) { + + PIX *srcPix = pixelAddress(src, srcRect, x, y, srcBytesPerLine); + + // do any pixel masking? + float maskV = 1.0f; + if(mask) { + MASK *maskPix = pixelAddress(mask, maskRect, x, y, maskBytesPerLine); + if(maskPix) { + maskV = float(*maskPix)/float(max); + } + } + + // figure the scale values per component + float theScale = 1.0 + (rScale - 1.0) * maskV; + + if(srcPix) { + // switch will be compiled out + if(isFloat) { + *dstPix = *srcPix * theScale; + } + else { + *dstPix = Clamp(int(*srcPix * theScale), 0, max); + } + srcPix++; + } + else { + *dstPix = 0; + } + dstPix++; + } + } + } +}; + +// the process code that the host sees +static OfxStatus render( OfxImageEffectHandle instance, + OfxPropertySetHandle inArgs, + OfxPropertySetHandle /*outArgs*/) +{ + // get the render window and the time from the inArgs + OfxTime time; + OfxRectI renderWindow; + OfxStatus status = kOfxStatOK; + + gPropHost->propGetDouble(inArgs, kOfxPropTime, 0, &time); + gPropHost->propGetIntN(inArgs, kOfxImageEffectPropRenderWindow, 4, &renderWindow.x1); + + // retrieve any instance data associated with this effect + MyInstanceData *myData = getMyInstanceData(instance); + + // property handles and members of each image + // in reality, we would put this in a struct as the C++ support layer does + OfxPropertySetHandle sourceImg = NULL, outputImg = NULL, maskImg = NULL; + int srcRowBytes, srcBitDepth, dstRowBytes, dstBitDepth, maskRowBytes = 0, maskBitDepth; + bool srcIsAlpha, dstIsAlpha, maskIsAlpha = false; + OfxRectI dstRect, srcRect, maskRect = {0, 0, 0, 0}; + void *src, *dst, *mask = NULL; + + std::string inputColourspace; + { + OfxPropertySetHandle clipProps; + gEffectHost->clipGetPropertySet(myData->sourceClip, &clipProps); + char *tmpStr = NULL; + OfxStatus status = gPropHost->propGetString(clipProps, kOfxImageClipPropColourspace, 0, &tmpStr); + if (status == kOfxStatOK) { + inputColourspace = tmpStr; + spdlog::info("Input clip colourspace = {}", inputColourspace); + } else { + inputColourspace = "unknown"; + spdlog::info("Can't get input clip's colourspace; propGetString returned {}", errMsg(status)); + } + } + + try { + // get the source image + sourceImg = ofxuGetImage(myData->sourceClip, time, srcRowBytes, srcBitDepth, srcIsAlpha, srcRect, src); + if(sourceImg == NULL) throw OfxuNoImageException(); + + // get the output image + outputImg = ofxuGetImage(myData->outputClip, time, dstRowBytes, dstBitDepth, dstIsAlpha, dstRect, dst); + if(outputImg == NULL) throw OfxuNoImageException(); + + if(myData->isGeneralEffect) { + // is the mask connected? + if(ofxuIsClipConnected(instance, "Mask")) { + maskImg = ofxuGetImage(myData->maskClip, time, maskRowBytes, maskBitDepth, maskIsAlpha, maskRect, mask); + + if(maskImg != NULL) { + // and see that it is a single component + if(!maskIsAlpha || maskBitDepth != srcBitDepth) { + throw OfxuStatusException(kOfxStatErrImageFormat); + } + } + } + } + + // see if they have the same depths and bytes and all + if(srcBitDepth != dstBitDepth || srcIsAlpha != dstIsAlpha) { + throw OfxuStatusException(kOfxStatErrImageFormat); + } + + // are we component scaling + int scaleComponents; + gParamHost->paramGetValueAtTime(myData->perComponentScaleParam, time, &scaleComponents); + + // get the scale parameters + double scale, rScale = 1, gScale = 1, bScale = 1, aScale = 1; + gParamHost->paramGetValueAtTime(myData->scaleParam, time, &scale); + + if(scaleComponents) { + gParamHost->paramGetValueAtTime(myData->scaleRParam, time, &rScale); + gParamHost->paramGetValueAtTime(myData->scaleGParam, time, &gScale); + gParamHost->paramGetValueAtTime(myData->scaleBParam, time, &bScale); + gParamHost->paramGetValueAtTime(myData->scaleAParam, time, &aScale); + } + rScale *= scale; gScale *= scale; bScale *= scale; aScale *= scale; + + // do the rendering + if(!dstIsAlpha) { + switch(dstBitDepth) { + case 8 : { + ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + } + break; + + case 16 : { + ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + } + break; + + case 32 : { + ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + break; + } + } + } + else { + switch(dstBitDepth) { + case 8 : { + ProcessAlpha fred(instance, scale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + } + break; + + case 16 : { + ProcessAlpha fred(instance, scale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + } + break; + + case 32 : { + ProcessAlpha fred(instance, scale, + src, srcRect, srcRowBytes, + dst, dstRect, dstRowBytes, + mask, maskRect, maskRowBytes, + renderWindow); + fred.process(); + } + break; + } + } + } + catch(OfxuNoImageException &ex) { + // if we were interrupted, the failed fetch is fine, just return kOfxStatOK + // otherwise, something weird happened + if(!gEffectHost->abort(instance)) { + status = kOfxStatFailed; + } + } + catch(OfxuStatusException &ex) { + status = ex.status(); + } + + // release the data pointers + if(maskImg) + gEffectHost->clipReleaseImage(maskImg); + if(sourceImg) + gEffectHost->clipReleaseImage(sourceImg); + if(outputImg) + gEffectHost->clipReleaseImage(outputImg); + + return status; +} + +// convenience function to define scaling parameter +static void +defineScaleParam( OfxParamSetHandle effectParams, + const char *name, + const char *label, + const char *scriptName, + const char *hint, + const char *parent) +{ + OfxPropertySetHandle props; + OfxStatus stat; + stat = gParamHost->paramDefine(effectParams, kOfxParamTypeDouble, name, &props); + if (stat != kOfxStatOK) { + throw OfxuStatusException(stat); + } + // say we are a scaling parameter + gPropHost->propSetString(props, kOfxParamPropDoubleType, 0, kOfxParamDoubleTypeScale); + gPropHost->propSetDouble(props, kOfxParamPropDefault, 0, 1.0); + gPropHost->propSetDouble(props, kOfxParamPropMin, 0, 0.0); + gPropHost->propSetDouble(props, kOfxParamPropDisplayMin, 0, 0.0); + gPropHost->propSetDouble(props, kOfxParamPropDisplayMax, 0, 100.0); + gPropHost->propSetString(props, kOfxParamPropHint, 0, hint); + gPropHost->propSetString(props, kOfxParamPropScriptName, 0, scriptName); + gPropHost->propSetString(props, kOfxPropLabel, 0, label); + if(parent) + gPropHost->propSetString(props, kOfxParamPropParent, 0, parent); +} + +// describe the plugin in context +static OfxStatus +describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) +{ + // get the context from the inArgs handle + char *context; + gPropHost->propGetString(inArgs, kOfxImageEffectPropContext, 0, &context); + bool isGeneralContext = strcmp(context, kOfxImageEffectContextGeneral) == 0; + + OfxPropertySetHandle props; + // define the single output clip in both contexts + gEffectHost->clipDefine(effect, kOfxImageEffectOutputClipName, &props); + + // set the component types we can handle on out output + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 1, kOfxImageComponentAlpha); + + // define the single source clip in both contexts + gEffectHost->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &props); + + // set the component types we can handle on our main input + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 1, kOfxImageComponentAlpha); + + if(isGeneralContext) { + // define a second input that is a mask, alpha only and is optional + gEffectHost->clipDefine(effect, "Mask", &props); + gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentAlpha); + gPropHost->propSetInt(props, kOfxImageClipPropOptional, 0, 1); + } + + //////////////////////////////////////////////////////////////////////////////// + // define the parameters for this context + // fetch the parameter set from the effect + OfxParamSetHandle paramSet; + gEffectHost->getParamSet(effect, ¶mSet); + + // overall scale param + defineScaleParam(paramSet, "scale", "scale", "scale", "Scales all component in the image", 0); + + // boolean param to enable/disable per component scaling + gParamHost->paramDefine(paramSet, kOfxParamTypeBoolean, "scaleComponents", &props); + gPropHost->propSetInt(props, kOfxParamPropDefault, 0, 0); + gPropHost->propSetString(props, kOfxParamPropHint, 0, "Enables scales on individual components"); + gPropHost->propSetString(props, kOfxParamPropScriptName, 0, "scaleComponents"); + gPropHost->propSetString(props, kOfxPropLabel, 0, "Scale Individual Components"); + + // grouping parameter for the by component params + gParamHost->paramDefine(paramSet, kOfxParamTypeGroup, "componentScales", &props); + gPropHost->propSetString(props, kOfxParamPropHint, 0, "Scales on the individual component"); + gPropHost->propSetString(props, kOfxPropLabel, 0, "Components"); + + // rgb and a scale params + defineScaleParam(paramSet, "scaleR", "red", "scaleR", + "Scales the red component of the image", "componentScales"); + defineScaleParam(paramSet, "scaleG", "green", "scaleG", + "Scales the green component of the image", "componentScales"); + defineScaleParam(paramSet, "scaleB", "blue", "scaleB", + "Scales the blue component of the image", "componentScales"); + defineScaleParam(paramSet, "scaleA", "alpha", "scaleA", + "Scales the alpha component of the image", "componentScales"); + + + // make a page of controls and add my parameters to it + gParamHost->paramDefine(paramSet, kOfxParamTypePage, "Main", &props); + gPropHost->propSetString(props, kOfxParamPropPageChild, 0, "scale"); + gPropHost->propSetString(props, kOfxParamPropPageChild, 1, "scaleComponents"); + gPropHost->propSetString(props, kOfxParamPropPageChild, 2, "scaleR"); + gPropHost->propSetString(props, kOfxParamPropPageChild, 3, "scaleG"); + gPropHost->propSetString(props, kOfxParamPropPageChild, 4, "scaleB"); + gPropHost->propSetString(props, kOfxParamPropPageChild, 5, "scaleA"); + + + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// the plugin's description routine +static OfxStatus +describe(OfxImageEffectHandle effect) +{ + // first fetch the host APIs, this cannot be done before this call + OfxStatus stat; + if((stat = ofxuFetchHostSuites()) != kOfxStatOK) + return stat; + + // record a few host features + gPropHost->propGetInt(gHost->host, kOfxImageEffectPropSupportsMultipleClipDepths, 0, &gHostSupportsMultipleBitDepths); + char *tmpStr = NULL; + stat = gPropHost->propGetString( + gHost->host, kOfxImageEffectPropColourManagementStyle, 0, &tmpStr); + if (stat == kOfxStatOK) { + gHostColourManagementStyle = tmpStr; + spdlog::info("describe: host says its colour management style is '{}'", gHostColourManagementStyle); + } else { + spdlog::info("describe: host does not support colour management (err={})", errMsg(stat)); + gHostColourManagementStyle = kOfxImageEffectPropColourManagementNone; + } + + // get the property handle for the plugin + OfxPropertySetHandle effectProps; + gEffectHost->getPropertySet(effect, &effectProps); + + // We can render both fields in a fielded images in one hit if there is no animation + // So set the flag that allows us to do this + gPropHost->propSetInt(effectProps, kOfxImageEffectPluginPropFieldRenderTwiceAlways, 0, 0); + + // say we can support multiple pixel depths and let the clip preferences action deal with it all. + gPropHost->propSetInt(effectProps, kOfxImageEffectPropSupportsMultipleClipDepths, 0, 1); + + // set the bit depths the plugin can handle + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedPixelDepths, 0, kOfxBitDepthByte); + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedPixelDepths, 1, kOfxBitDepthShort); + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedPixelDepths, 2, kOfxBitDepthFloat); + + // set some labels and the group it belongs to + gPropHost->propSetString(effectProps, kOfxPropLabel, 0, "OFX Colourspace Example"); + gPropHost->propSetString(effectProps, kOfxImageEffectPluginPropGrouping, 0, "OFX Example"); + + // define the contexts we can be used in + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 0, kOfxImageEffectContextFilter); + gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 1, kOfxImageEffectContextGeneral); + + if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { + // host supports colour management, either OCIO or Native. + // OCIO implies native, so here we can assume it supports native. + // Tell it we support native. + stat = gPropHost->propSetString(effectProps, + kOfxImageEffectPropColourManagementStyle, 0, + kOfxImageEffectPropColourManagementNative); + if (stat != kOfxStatOK) { + spdlog::error("setting kOfxImageEffectPropColourManagementStyle prop: stat={}", errMsg(stat)); + } + } + + return kOfxStatOK; +} + +//////////////////////////////////////////////////////////////////////////////// +// The main function +static OfxStatus +pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs) +{ + OfxStatus stat = kOfxStatOK; + + spdlog::info(">>> pluginMain({})", action); + try { + // cast to appropriate type + OfxImageEffectHandle effect = (OfxImageEffectHandle) handle; + + if(strcmp(action, kOfxActionDescribe) == 0) { + stat = describe(effect); + } + else if(strcmp(action, kOfxImageEffectActionDescribeInContext) == 0) { + stat = describeInContext(effect, inArgs); + } + else if(strcmp(action, kOfxActionLoad) == 0) { + stat = onLoad(); + } + else if(strcmp(action, kOfxActionUnload) == 0) { + stat = onUnLoad(); + } + else if(strcmp(action, kOfxActionCreateInstance) == 0) { + stat = createInstance(effect); + } + else if(strcmp(action, kOfxActionDestroyInstance) == 0) { + stat = destroyInstance(effect); + } + else if(strcmp(action, kOfxImageEffectActionIsIdentity) == 0) { + stat = isIdentity(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxImageEffectActionRender) == 0) { + stat = render(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxImageEffectActionGetRegionOfDefinition) == 0) { + stat = getSpatialRoD(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxImageEffectActionGetRegionsOfInterest) == 0) { + stat = getSpatialRoI(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxImageEffectActionGetClipPreferences) == 0) { + stat = getClipPreferences(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxActionInstanceChanged) == 0) { + stat = instanceChanged(effect, inArgs, outArgs); + } + else if(strcmp(action, kOfxImageEffectActionGetTimeDomain) == 0) { + stat = getTemporalDomain(effect, inArgs, outArgs); + } + } catch (std::bad_alloc) { + // catch memory + spdlog::error("Caught OFX Plugin Memory error"); + stat = kOfxStatErrMemory; + } catch ( const std::exception& e ) { + // standard exceptions + spdlog::error("Caught OFX Plugin error {}", e.what()); + stat = kOfxStatErrUnknown; + } catch (int err) { + spdlog::error("Caught misc error {}", err); + stat = err; + } catch ( ... ) { + // everything else + spdlog::error("Caught unknown OFX plugin error"); + stat = kOfxStatErrUnknown; + } + // other actions to take the default value + + + spdlog::info("<<< pluginMain({}) = {}", action, errMsg(stat)); + return stat; +} + +// function to set the host structure +static void +setHostFunc(OfxHost *hostStruct) +{ + gHost = hostStruct; +} + +//////////////////////////////////////////////////////////////////////////////// +// the plugin struct +static OfxPlugin colourspacePlugin = +{ + kOfxImageEffectPluginApi, + 1, + "io.aswf.openfx.example.ColourspacePlugin", + 1, + 0, + setHostFunc, + pluginMain +}; + +// the two mandated functions +EXPORT OfxPlugin * +OfxGetPlugin(int nth) +{ + if(nth == 0) + return &colourspacePlugin; + return 0; +} + +EXPORT int +OfxGetNumberOfPlugins(void) +{ + return 1; +} + +// Called first after loading. This is optional for plugins. +EXPORT OfxStatus +OfxSetHost() +{ + return kOfxStatOK; +} + +struct SharedLibResource { + SharedLibResource() { + spdlog::set_level(spdlog::level::trace); + spdlog::trace("shlib/dll loaded"); + } + ~SharedLibResource() { + } +}; +static SharedLibResource _sharedLibResource; diff --git a/conanfile.py b/conanfile.py index 20bc70d7..45a46de5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -29,7 +29,9 @@ class openfx(ConanFile): options = {"use_opencl": [True, False]} default_options = { "expat/*:shared": True, - "use_opencl": False + "use_opencl": False, + "spdlog/*:header_only": True, + "fmt/*:header_only": True } def requirements(self): @@ -38,6 +40,8 @@ def requirements(self): self.requires("opencl-headers/2023.12.14") self.requires("opengl/system") # for OpenGL examples self.requires("expat/2.4.8") # for HostSupport + self.requires("cimg/3.3.2") # to draw text into images + self.requires("spdlog/1.13.0") # for logging def layout(self): cmake_layout(self) diff --git a/include/ofxColour.h b/include/ofxColour.h index c4cc7d70..1f8bd648 100644 --- a/include/ofxColour.h +++ b/include/ofxColour.h @@ -106,7 +106,7 @@ Use of URIs for built-in configs, such as ocio://default is permitted. - Valid Values - colourspace that is permitted under the style in use. For OCIO, any string acceptable to Config::getColorSpace() -Hosts should set this property to the colourspace of the input clip. Typically +Hosts should set this property to the colourspace of the input clip. Typically it will be set to the working colourspace of the host but could be any valid colourspace. From 7f5598f2f23cc5dbfca97b2e11029d0b5d39260c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Tue, 7 May 2024 10:17:42 -0400 Subject: [PATCH 27/34] WIP: colorspace example updates Signed-off-by: Gary Oberbrunner --- Examples/ColorSpace/colorspace.cpp | 486 +++-------------------------- 1 file changed, 52 insertions(+), 434 deletions(-) diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColorSpace/colorspace.cpp index 1e5992a2..e69e2b2b 100644 --- a/Examples/ColorSpace/colorspace.cpp +++ b/Examples/ColorSpace/colorspace.cpp @@ -12,6 +12,8 @@ #include #include #include "spdlog/spdlog.h" +#define cimg_display 0 // no X11 +#include "CImg.h" #include "ofxImageEffect.h" #include "ofxMemory.h" #include "ofxMultiThread.h" @@ -69,7 +71,6 @@ struct MyInstanceData { // handles to the clips we deal with OfxImageClipHandle sourceClip; - OfxImageClipHandle maskClip; OfxImageClipHandle outputClip; // handles to a our parameters @@ -195,12 +196,6 @@ createInstance( OfxImageEffectHandle effect) gEffectHost->clipGetHandle(effect, kOfxImageEffectSimpleSourceClipName, &myData->sourceClip, 0); gEffectHost->clipGetHandle(effect, kOfxImageEffectOutputClipName, &myData->outputClip, 0); - if(myData->isGeneralEffect) { - gEffectHost->clipGetHandle(effect, "Mask", &myData->maskClip, 0); - } - else - myData->maskClip = 0; - // set my private instance data gPropHost->propSetPointer(effectProps, kOfxPropInstanceData, 0, (void *) myData); @@ -238,8 +233,6 @@ getSpatialRoD( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs, OfxP OfxRectD rod; gEffectHost->clipGetRegionOfDefinition(myData->sourceClip, time, &rod); - // note that the RoD is _not_ dependent on the Mask clip - // set the rod in the out args gPropHost->propSetDoubleN(outArgs, kOfxImageEffectPropRegionOfDefinition, 4, &rod.x1); @@ -260,10 +253,6 @@ getSpatialRoI( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs, OfxP // retrieve any instance data associated with this effect MyInstanceData *myData = getMyInstanceData(effect); - // if a general effect, we need to know the mask as well - if(myData->isGeneralEffect && ofxuIsClipConnected(effect, "Mask")) { - gPropHost->propSetDoubleN(outArgs, "OfxImageClipPropRoI_Mask", 4, &roi.x1); - } return kOfxStatOK; } @@ -308,16 +297,6 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs if(gHostSupportsMultipleBitDepths) gPropHost->propSetString(outArgs, "OfxImageClipPropDepth_Output", 0, bitDepthStr); - // if a general effect, we may have a mask input, check that for types - if(myData->isGeneralEffect) { - if(ofxuIsClipConnected(effect, "Mask")) { - // set the mask input to be a single channel image of the same bitdepth as the source - gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Mask", 0, kOfxImageComponentAlpha); - if(gHostSupportsMultipleBitDepths) - gPropHost->propSetString(outArgs, "OfxImageClipPropDepth_Mask", 0, bitDepthStr); - } - } - // Colour management -- preferred colour spaces, in order (most preferred first) #define PREFER_COLOURSPACES #ifdef PREFER_COLOURSPACES @@ -386,238 +365,20 @@ instanceChanged( OfxImageEffectHandle effect, return kOfxStatReplyDefault; } -//////////////////////////////////////////////////////////////////////////////// -// rendering routines -template inline T -Clamp(T v, int min, int max) -{ - if(v < T(min)) return T(min); - if(v > T(max)) return T(max); - return v; -} - -// look up a pixel in the image, does bounds checking to see if it is in the image rectangle -template inline PIX * -pixelAddress(PIX *img, OfxRectI rect, int x, int y, int bytesPerLine) -{ - if(x < rect.x1 || x >= rect.x2 || y < rect.y1 || y >= rect.y2 || !img) - return 0; - PIX *pix = (PIX *) (((char *) img) + (y - rect.y1) * bytesPerLine); - pix += x - rect.x1; - return pix; -} - -//////////////////////////////////////////////////////////////////////////////// -// base class to process images with -class Processor { - protected : - OfxImageEffectHandle instance; - float rScale, gScale, bScale, aScale; - void *srcV, *dstV, *maskV; - OfxRectI srcRect, dstRect, maskRect; - int srcBytesPerLine, dstBytesPerLine, maskBytesPerLine; - OfxRectI window; - - public : - Processor(OfxImageEffectHandle inst, - float rScal, float gScal, float bScal, float aScal, - void *src, OfxRectI sRect, int sBytesPerLine, - void *dst, OfxRectI dRect, int dBytesPerLine, - void *mask, OfxRectI mRect, int mBytesPerLine, - OfxRectI win) - : instance(inst) - , rScale(rScal) - , gScale(gScal) - , bScale(bScal) - , aScale(aScal) - , srcV(src) - , dstV(dst) - , maskV(mask) - , srcRect(sRect) - , dstRect(dRect) - , maskRect(mRect) - , srcBytesPerLine(sBytesPerLine) - , dstBytesPerLine(dBytesPerLine) - , maskBytesPerLine(mBytesPerLine) - , window(win) - {} - - static void multiThreadProcessing(unsigned int threadId, unsigned int nThreads, void *arg); - virtual void doProcessing(OfxRectI window) = 0; - void process(void); -}; - - -// function call once for each thread by the host -void -Processor::multiThreadProcessing(unsigned int threadId, unsigned int nThreads, void *arg) -{ - Processor *proc = (Processor *) arg; - // slice the y range into the number of threads it has - unsigned int dy = proc->window.y2 - proc->window.y1; - - unsigned int y1 = proc->window.y1 + threadId * dy/nThreads; - unsigned int y2 = proc->window.y1 + std::min((threadId + 1) * dy/nThreads, dy); - - OfxRectI win = proc->window; - win.y1 = y1; win.y2 = y2; - - // and render that thread on each - proc->doProcessing(win); -} - -// function to kick off rendering across multiple CPUs -void -Processor::process(void) -{ - unsigned int nThreads; - gThreadHost->multiThreadNumCPUs(&nThreads); - gThreadHost->multiThread(multiThreadProcessing, nThreads, (void *) this); -} - -// template to do the RGBA processing -template -class ProcessRGBA : public Processor{ -public : - ProcessRGBA(OfxImageEffectHandle instance, - float rScale, float gScale, float bScale, float aScale, - void *srcV, OfxRectI srcRect, int srcBytesPerLine, - void *dstV, OfxRectI dstRect, int dstBytesPerLine, - void *maskV, OfxRectI maskRect, int maskBytesPerLine, - OfxRectI window) - : Processor(instance, - rScale, gScale, bScale, aScale, - srcV, srcRect, srcBytesPerLine, - dstV, dstRect, dstBytesPerLine, - maskV, maskRect, maskBytesPerLine, - window) - { - } - - void doProcessing(OfxRectI procWindow) - { - PIX *src = (PIX *) srcV; - PIX *dst = (PIX *) dstV; - MASK *mask = (MASK *) maskV; - - for(int y = procWindow.y1; y < procWindow.y2; y++) { - if(gEffectHost->abort(instance)) break; - - PIX *dstPix = pixelAddress(dst, dstRect, procWindow.x1, y, dstBytesPerLine); - - for(int x = procWindow.x1; x < procWindow.x2; x++) { - - PIX *srcPix = pixelAddress(src, srcRect, x, y, srcBytesPerLine); - - - // do any pixel masking? - float maskV = 1.0f; - if(mask) { - MASK *maskPix = pixelAddress(mask, maskRect, x, y, maskBytesPerLine); - if(maskPix) { - maskV = float(*maskPix)/float(max); - } - else - maskV = 0.0f; - maskPix++; - } - - // figure the scale values per component - float sR = 1.0 + (rScale - 1.0) * maskV; - float sG = 1.0 + (gScale - 1.0) * maskV; - float sB = 1.0 + (bScale - 1.0) * maskV; - float sA = 1.0 + (aScale - 1.0) * maskV; - - if(srcPix) { - // switch will be compiled out - if(isFloat) { - dstPix->r = srcPix->r * sR; - dstPix->g = srcPix->g * sG; - dstPix->b = srcPix->b * sB; - dstPix->a = srcPix->a * sA; - } - else { - dstPix->r = Clamp(int(srcPix->r * sR), 0, max); - dstPix->g = Clamp(int(srcPix->g * sG), 0, max); - dstPix->b = Clamp(int(srcPix->b * sB), 0, max); - dstPix->a = Clamp(int(srcPix->a * sA), 0, max); - } - srcPix++; - } - else { - dstPix->r = dstPix->g = dstPix->b = dstPix->a= 0; - } - dstPix++; - } +static std::string getClipColourspace(const OfxImageClipHandle clip) { + OfxPropertySetHandle clipProps; + gEffectHost->clipGetPropertySet(clip, &clipProps); + char *tmpStr = NULL; + OfxStatus status = gPropHost->propGetString(clipProps, kOfxImageClipPropColourspace, 0, &tmpStr); + if (status == kOfxStatOK) { + return std::string(tmpStr); + } else { + spdlog::info("Can't get clip's colourspace; propGetString returned {}", errMsg(status)); + return std::string("unspecified"); } - } -}; -// template to do the Alpha processing -template -class ProcessAlpha : public Processor { -public : - ProcessAlpha( OfxImageEffectHandle instance, - float scale, - void *srcV, OfxRectI srcRect, int srcBytesPerLine, - void *dstV, OfxRectI dstRect, int dstBytesPerLine, - void *maskV, OfxRectI maskRect, int maskBytesPerLine, - OfxRectI window) - : Processor(instance, - scale, scale, scale, scale, - srcV, srcRect, srcBytesPerLine, - dstV, dstRect, dstBytesPerLine, - maskV, maskRect, maskBytesPerLine, - window) - { - } - - void doProcessing(OfxRectI procWindow) - { - PIX *src = (PIX *) srcV; - PIX *dst = (PIX *) dstV; - MASK *mask = (MASK *) maskV; - - for(int y = procWindow.y1; y < procWindow.y2; y++) { - if(gEffectHost->abort(instance)) break; - - PIX *dstPix = pixelAddress(dst, dstRect, procWindow.x1, y, dstBytesPerLine); - - for(int x = procWindow.x1; x < procWindow.x2; x++) { - - PIX *srcPix = pixelAddress(src, srcRect, x, y, srcBytesPerLine); - - // do any pixel masking? - float maskV = 1.0f; - if(mask) { - MASK *maskPix = pixelAddress(mask, maskRect, x, y, maskBytesPerLine); - if(maskPix) { - maskV = float(*maskPix)/float(max); - } - } - - // figure the scale values per component - float theScale = 1.0 + (rScale - 1.0) * maskV; - - if(srcPix) { - // switch will be compiled out - if(isFloat) { - *dstPix = *srcPix * theScale; - } - else { - *dstPix = Clamp(int(*srcPix * theScale), 0, max); - } - srcPix++; - } - else { - *dstPix = 0; - } - dstPix++; - } - } - } -}; +} // the process code that the host sees static OfxStatus render( OfxImageEffectHandle instance, @@ -643,20 +404,10 @@ static OfxStatus render( OfxImageEffectHandle instance, OfxRectI dstRect, srcRect, maskRect = {0, 0, 0, 0}; void *src, *dst, *mask = NULL; - std::string inputColourspace; - { - OfxPropertySetHandle clipProps; - gEffectHost->clipGetPropertySet(myData->sourceClip, &clipProps); - char *tmpStr = NULL; - OfxStatus status = gPropHost->propGetString(clipProps, kOfxImageClipPropColourspace, 0, &tmpStr); - if (status == kOfxStatOK) { - inputColourspace = tmpStr; - spdlog::info("Input clip colourspace = {}", inputColourspace); - } else { - inputColourspace = "unknown"; - spdlog::info("Can't get input clip's colourspace; propGetString returned {}", errMsg(status)); - } - } + std::string inputColourspace = getClipColourspace(myData->sourceClip); + spdlog::info("source clip colourspace = {}", inputColourspace); + std::string outputColourspace = getClipColourspace(myData->outputClip); + spdlog::info("output clip colourspace = {}", outputColourspace); try { // get the source image @@ -667,107 +418,48 @@ static OfxStatus render( OfxImageEffectHandle instance, outputImg = ofxuGetImage(myData->outputClip, time, dstRowBytes, dstBitDepth, dstIsAlpha, dstRect, dst); if(outputImg == NULL) throw OfxuNoImageException(); - if(myData->isGeneralEffect) { - // is the mask connected? - if(ofxuIsClipConnected(instance, "Mask")) { - maskImg = ofxuGetImage(myData->maskClip, time, maskRowBytes, maskBitDepth, maskIsAlpha, maskRect, mask); - - if(maskImg != NULL) { - // and see that it is a single component - if(!maskIsAlpha || maskBitDepth != srcBitDepth) { - throw OfxuStatusException(kOfxStatErrImageFormat); - } - } - } - } - // see if they have the same depths and bytes and all - if(srcBitDepth != dstBitDepth || srcIsAlpha != dstIsAlpha) { + if(srcBitDepth != dstBitDepth || srcIsAlpha != dstIsAlpha || srcRowBytes != dstRowBytes) { throw OfxuStatusException(kOfxStatErrImageFormat); } - // are we component scaling - int scaleComponents; - gParamHost->paramGetValueAtTime(myData->perComponentScaleParam, time, &scaleComponents); - - // get the scale parameters - double scale, rScale = 1, gScale = 1, bScale = 1, aScale = 1; - gParamHost->paramGetValueAtTime(myData->scaleParam, time, &scale); + int xdim = srcRect.x2 - srcRect.x1; + int ydim = srcRect.y2 - srcRect.y1; + // do the rendering - if(scaleComponents) { - gParamHost->paramGetValueAtTime(myData->scaleRParam, time, &rScale); - gParamHost->paramGetValueAtTime(myData->scaleGParam, time, &gScale); - gParamHost->paramGetValueAtTime(myData->scaleBParam, time, &bScale); - gParamHost->paramGetValueAtTime(myData->scaleAParam, time, &aScale); + int nchannels = 4; + int font_height = 128; + spdlog::info("Rendering {}x{} image @{},{}, depth={}", xdim, ydim, srcRect.x1, srcRect.y1, dstBitDepth); + switch(dstBitDepth) { + case 8 : { + using T = unsigned char; + auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); + T fg[] = {255, 255, 0, 255}; + T bg[] = {0, 0, 0, 0}; + img.draw_text(100, 100, "Test (byte)!", fg, bg, 1.0, font_height); + memcpy(dst, src, srcRowBytes * ydim * nchannels); } - rScale *= scale; gScale *= scale; bScale *= scale; aScale *= scale; - - // do the rendering - if(!dstIsAlpha) { - switch(dstBitDepth) { - case 8 : { - ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - } - break; - - case 16 : { - ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - } - break; - - case 32 : { - ProcessRGBA fred(instance, rScale, gScale, bScale, aScale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - break; - } - } + break; + case 16 : { + using T = unsigned short; + auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); + T fg[] = {65535, 65535, 0, 65535}; + T bg[] = {0, 0, 0, 0}; + img.draw_text(100, 100, "Test (short)!", fg, bg, 1.0, font_height); + memcpy(dst, src, srcRowBytes * ydim * nchannels); + } + break; + case 32 : { + using T = float; + auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); + T fg[] = {1.0, 0.0, 1.0, 1.0}; + T bg[] = {0, 0, 0, 0}; + img.mirror('y'); + img.draw_text(100, 100, "Test (float)!", fg, bg, 1.0, font_height); + img.mirror('y'); + memcpy(dst, src, srcRowBytes * ydim * nchannels); } - else { - switch(dstBitDepth) { - case 8 : { - ProcessAlpha fred(instance, scale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - } - break; - - case 16 : { - ProcessAlpha fred(instance, scale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - } - break; - - case 32 : { - ProcessAlpha fred(instance, scale, - src, srcRect, srcRowBytes, - dst, dstRect, dstRowBytes, - mask, maskRect, maskRowBytes, - renderWindow); - fred.process(); - } - break; - } + break; } } catch(OfxuNoImageException &ex) { @@ -782,8 +474,6 @@ static OfxStatus render( OfxImageEffectHandle instance, } // release the data pointers - if(maskImg) - gEffectHost->clipReleaseImage(maskImg); if(sourceImg) gEffectHost->clipReleaseImage(sourceImg); if(outputImg) @@ -792,33 +482,6 @@ static OfxStatus render( OfxImageEffectHandle instance, return status; } -// convenience function to define scaling parameter -static void -defineScaleParam( OfxParamSetHandle effectParams, - const char *name, - const char *label, - const char *scriptName, - const char *hint, - const char *parent) -{ - OfxPropertySetHandle props; - OfxStatus stat; - stat = gParamHost->paramDefine(effectParams, kOfxParamTypeDouble, name, &props); - if (stat != kOfxStatOK) { - throw OfxuStatusException(stat); - } - // say we are a scaling parameter - gPropHost->propSetString(props, kOfxParamPropDoubleType, 0, kOfxParamDoubleTypeScale); - gPropHost->propSetDouble(props, kOfxParamPropDefault, 0, 1.0); - gPropHost->propSetDouble(props, kOfxParamPropMin, 0, 0.0); - gPropHost->propSetDouble(props, kOfxParamPropDisplayMin, 0, 0.0); - gPropHost->propSetDouble(props, kOfxParamPropDisplayMax, 0, 100.0); - gPropHost->propSetString(props, kOfxParamPropHint, 0, hint); - gPropHost->propSetString(props, kOfxParamPropScriptName, 0, scriptName); - gPropHost->propSetString(props, kOfxPropLabel, 0, label); - if(parent) - gPropHost->propSetString(props, kOfxParamPropParent, 0, parent); -} // describe the plugin in context static OfxStatus @@ -835,21 +498,12 @@ describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) // set the component types we can handle on out output gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); - gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 1, kOfxImageComponentAlpha); // define the single source clip in both contexts gEffectHost->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &props); // set the component types we can handle on our main input gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); - gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 1, kOfxImageComponentAlpha); - - if(isGeneralContext) { - // define a second input that is a mask, alpha only and is optional - gEffectHost->clipDefine(effect, "Mask", &props); - gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentAlpha); - gPropHost->propSetInt(props, kOfxImageClipPropOptional, 0, 1); - } //////////////////////////////////////////////////////////////////////////////// // define the parameters for this context @@ -857,42 +511,6 @@ describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) OfxParamSetHandle paramSet; gEffectHost->getParamSet(effect, ¶mSet); - // overall scale param - defineScaleParam(paramSet, "scale", "scale", "scale", "Scales all component in the image", 0); - - // boolean param to enable/disable per component scaling - gParamHost->paramDefine(paramSet, kOfxParamTypeBoolean, "scaleComponents", &props); - gPropHost->propSetInt(props, kOfxParamPropDefault, 0, 0); - gPropHost->propSetString(props, kOfxParamPropHint, 0, "Enables scales on individual components"); - gPropHost->propSetString(props, kOfxParamPropScriptName, 0, "scaleComponents"); - gPropHost->propSetString(props, kOfxPropLabel, 0, "Scale Individual Components"); - - // grouping parameter for the by component params - gParamHost->paramDefine(paramSet, kOfxParamTypeGroup, "componentScales", &props); - gPropHost->propSetString(props, kOfxParamPropHint, 0, "Scales on the individual component"); - gPropHost->propSetString(props, kOfxPropLabel, 0, "Components"); - - // rgb and a scale params - defineScaleParam(paramSet, "scaleR", "red", "scaleR", - "Scales the red component of the image", "componentScales"); - defineScaleParam(paramSet, "scaleG", "green", "scaleG", - "Scales the green component of the image", "componentScales"); - defineScaleParam(paramSet, "scaleB", "blue", "scaleB", - "Scales the blue component of the image", "componentScales"); - defineScaleParam(paramSet, "scaleA", "alpha", "scaleA", - "Scales the alpha component of the image", "componentScales"); - - - // make a page of controls and add my parameters to it - gParamHost->paramDefine(paramSet, kOfxParamTypePage, "Main", &props); - gPropHost->propSetString(props, kOfxParamPropPageChild, 0, "scale"); - gPropHost->propSetString(props, kOfxParamPropPageChild, 1, "scaleComponents"); - gPropHost->propSetString(props, kOfxParamPropPageChild, 2, "scaleR"); - gPropHost->propSetString(props, kOfxParamPropPageChild, 3, "scaleG"); - gPropHost->propSetString(props, kOfxParamPropPageChild, 4, "scaleB"); - gPropHost->propSetString(props, kOfxParamPropPageChild, 5, "scaleA"); - - return kOfxStatOK; } From 396fe610993d81aa884ba44255f7b534536770b7 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 9 May 2024 14:20:05 -0400 Subject: [PATCH 28/34] WIP: colourspace example now draws text with image info & colourspaces Signed-off-by: Gary Oberbrunner --- Examples/ColorSpace/colorspace.cpp | 165 +++++++++++++++++++++++------ 1 file changed, 133 insertions(+), 32 deletions(-) diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColorSpace/colorspace.cpp index e69e2b2b..b41cdad9 100644 --- a/Examples/ColorSpace/colorspace.cpp +++ b/Examples/ColorSpace/colorspace.cpp @@ -82,6 +82,116 @@ struct MyInstanceData { OfxParamHandle scaleAParam; }; +template +static constexpr T lerp(T a, T b, float amount) { + return a + amount * (b - a); +} + +#define COMP_WHITE_OVER(a, b, bg_opacity) \ + do { \ + (a) = lerp((a) * (1.0f - (bg_opacity)), white, (b)); \ +} while (0) + +/** + * Draw a string of text at the given position in the image + */ +static void drawText(const std::string &message, int x, int y, + unsigned int font_height, + void *image, int xdim, + int ydim, int bits, int nchannels, int rowbytes) { + auto txt_img = cimg_library::CImg(); + float fg[] = {1.0f}; + float bg[] = {0}; + // this will create an image just big enough to hold the text + txt_img.draw_text(0, 0, message.c_str(), fg, bg, 1.0, font_height); + int txt_width = txt_img.width(); + int txt_height = txt_img.height(); + bool invert = true; // CImg is top-down, opposite of OpenFX (bottom up) + if (rowbytes < 0) // unless the image has negative rowbytes + invert = false; + // iy here is image y, ty is text-image y; same for x + switch (bits) { + case 8: { + using T = unsigned char; + float white = 255.0f; + float color_scale = 1.0f/256.0f; + float bg_opacity = 0.2f; + for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { + T *row = (T *)((unsigned char *)image + iy * rowbytes); + float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { + switch (nchannels) { + case 1: // Alpha only + row[ix*4] = std::max(row[ix*4], (T)(txt_row[tx] * color_scale)); + case 3: // RGB + COMP_WHITE_OVER(row[ix*3], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+2], txt_row[tx], bg_opacity); + case 4: // RGBA + COMP_WHITE_OVER(row[ix*4], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+2], txt_row[tx], bg_opacity); + // alpha + row[ix*4+3] = std::max(row[ix*4+3], (T)(txt_row[tx] * color_scale)); + } + } + } + } break; + case 16: { + using T = unsigned short; + float white = 65535.0f; + float color_scale = 1.0f/65536.0f; + float bg_opacity = 0.2f; + for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { + T *row = (T *)((unsigned char *)image + iy * rowbytes); + float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { + switch (nchannels) { + case 1: // Alpha only + row[ix*4] = std::max(row[ix*4], (T)(txt_row[tx] * color_scale)); + case 3: // RGB + COMP_WHITE_OVER(row[ix*3], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+2], txt_row[tx], bg_opacity); + case 4: // RGBA + COMP_WHITE_OVER(row[ix*4], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+2], txt_row[tx], bg_opacity); + // alpha + row[ix*4+3] = std::max(row[ix*4+3], (T)(txt_row[tx] * color_scale)); + } + } + } + } break; + case 32: { + float white = 1.0f; + float bg_opacity = 0.2f; + for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { + float *row = (float *)((unsigned char *)image + iy * rowbytes); + float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { + switch (nchannels) { + case 1: // Alpha only + row[ix*4] = std::max(row[ix*4], txt_row[tx]); + case 3: // RGB + COMP_WHITE_OVER(row[ix*3], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*3+2], txt_row[tx], bg_opacity); + case 4: // RGBA + COMP_WHITE_OVER(row[ix*4], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+1], txt_row[tx], bg_opacity); + COMP_WHITE_OVER(row[ix*4+2], txt_row[tx], bg_opacity); + // alpha + row[ix*4+3] = std::max(row[ix*4+3], txt_row[tx]); + } + } + } break; + } + } +} + + + /* mandatory function to set up the host structures */ @@ -393,6 +503,13 @@ static OfxStatus render( OfxImageEffectHandle instance, gPropHost->propGetDouble(inArgs, kOfxPropTime, 0, &time); gPropHost->propGetIntN(inArgs, kOfxImageEffectPropRenderWindow, 4, &renderWindow.x1); + double renderScale[2]; + OfxStatus st = gPropHost->propGetDoubleN(inArgs, kOfxImageEffectPropRenderScale, 2, + renderScale); + if (st != kOfxStatOK) { + spdlog::warn("Can't get render scale! {}", errMsg(st)); + renderScale[0] = renderScale[1] = 1.0f; + } // retrieve any instance data associated with this effect MyInstanceData *myData = getMyInstanceData(instance); @@ -428,39 +545,23 @@ static OfxStatus render( OfxImageEffectHandle instance, // do the rendering int nchannels = 4; - int font_height = 128; + int font_height = 50 * renderScale[0]; spdlog::info("Rendering {}x{} image @{},{}, depth={}", xdim, ydim, srcRect.x1, srcRect.y1, dstBitDepth); - switch(dstBitDepth) { - case 8 : { - using T = unsigned char; - auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); - T fg[] = {255, 255, 0, 255}; - T bg[] = {0, 0, 0, 0}; - img.draw_text(100, 100, "Test (byte)!", fg, bg, 1.0, font_height); - memcpy(dst, src, srcRowBytes * ydim * nchannels); - } - break; - case 16 : { - using T = unsigned short; - auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); - T fg[] = {65535, 65535, 0, 65535}; - T bg[] = {0, 0, 0, 0}; - img.draw_text(100, 100, "Test (short)!", fg, bg, 1.0, font_height); - memcpy(dst, src, srcRowBytes * ydim * nchannels); - } - break; - case 32 : { - using T = float; - auto img = cimg_library::CImg((const T *)src, xdim, ydim, 1, nchannels, true); - T fg[] = {1.0, 0.0, 1.0, 1.0}; - T bg[] = {0, 0, 0, 0}; - img.mirror('y'); - img.draw_text(100, 100, "Test (float)!", fg, bg, 1.0, font_height); - img.mirror('y'); - memcpy(dst, src, srcRowBytes * ydim * nchannels); - } - break; - } + + // Just copy from source to dest, and draw some text + if (srcRowBytes < 0 && dstRowBytes < 0) + memcpy((char *)dst + dstRowBytes * (ydim-1), (char*)src + srcRowBytes * (ydim-1), srcRowBytes * ydim); + else + memcpy(dst, src, srcRowBytes * ydim); + int ystart = ydim - 100; + drawText(fmt::format("Image: {}x{}, depth={}, scale={:.2f}x{:.2f}", xdim, ydim, dstBitDepth, renderScale[0], renderScale[1]), + 100, ystart, font_height, dst, xdim, ydim, dstBitDepth, nchannels, dstRowBytes); + ystart -= font_height; + drawText(fmt::format("input colourspace: {}", inputColourspace), + 100, ystart, font_height, dst, xdim, ydim, dstBitDepth, nchannels, dstRowBytes); + ystart -= font_height; + drawText(fmt::format("output colourspace: {}", outputColourspace), + 100, ystart, font_height, dst, xdim, ydim, dstBitDepth, nchannels, dstRowBytes); } catch(OfxuNoImageException &ex) { // if we were interrupted, the failed fetch is fine, just return kOfxStatOK From edce85db2ef02b9152c2a5ff3982af7fec0e268a Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 9 May 2024 15:23:04 -0400 Subject: [PATCH 29/34] Add params to set preferred colourspaces Also remove a bunch of old unused code from the example I copied this from. Signed-off-by: Gary Oberbrunner --- Examples/ColorSpace/colorspace.cpp | 145 ++++++++++++++++------------- 1 file changed, 79 insertions(+), 66 deletions(-) diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColorSpace/colorspace.cpp index b41cdad9..d4149fc6 100644 --- a/Examples/ColorSpace/colorspace.cpp +++ b/Examples/ColorSpace/colorspace.cpp @@ -6,6 +6,7 @@ Plugin example demonstrating colourspace handling */ #include +#include #include #include #include @@ -73,13 +74,9 @@ struct MyInstanceData { OfxImageClipHandle sourceClip; OfxImageClipHandle outputClip; - // handles to a our parameters - OfxParamHandle scaleParam; - OfxParamHandle perComponentScaleParam; - OfxParamHandle scaleRParam; - OfxParamHandle scaleGParam; - OfxParamHandle scaleBParam; - OfxParamHandle scaleAParam; + // handles to our parameters + OfxParamHandle inputSpaceParam; + OfxParamHandle outputSpaceParam; }; template @@ -228,38 +225,6 @@ setParamEnabledness( OfxImageEffectHandle effect, gPropHost->propSetInt(paramProps, kOfxParamPropEnabled, 0, enabledState); } -// function that sets the enabledness of the percomponent scale parameters -// depending on the value of the -// This function is called when the 'scaleComponents' value is changed -// or when the input clip has been changed -static void -setPerComponentScaleEnabledness( OfxImageEffectHandle effect) -{ - // get my instance data - MyInstanceData *myData = getMyInstanceData(effect); - - // get the value of the percomponent scale param - int perComponentScale; - gParamHost->paramGetValue(myData->perComponentScaleParam, &perComponentScale); - - if(ofxuIsClipConnected(effect, kOfxImageEffectSimpleSourceClipName)) { - OfxPropertySetHandle props; gEffectHost->clipGetPropertySet(myData->sourceClip, &props); - - // get the input clip format - char *pixelType; - gPropHost->propGetString(props, kOfxImageEffectPropComponents, 0, &pixelType); - - // only enable the scales if the input is an RGBA input - perComponentScale = perComponentScale && !(strcmp(pixelType, kOfxImageComponentAlpha) == 0); - } - - // set the enabled/disabled state of the parameter - setParamEnabledness(effect, "scaleR", perComponentScale); - setParamEnabledness(effect, "scaleG", perComponentScale); - setParamEnabledness(effect, "scaleB", perComponentScale); - setParamEnabledness(effect, "scaleA", perComponentScale); -} - /** @brief Called at load */ static OfxStatus onLoad(void) @@ -295,12 +260,8 @@ createInstance( OfxImageEffectHandle effect) myData->isGeneralEffect = context && (strcmp(context, kOfxImageEffectContextGeneral) == 0); // cache param handles - gParamHost->paramGetHandle(paramSet, "scaleComponents", &myData->perComponentScaleParam, 0); - gParamHost->paramGetHandle(paramSet, "scale", &myData->scaleParam, 0); - gParamHost->paramGetHandle(paramSet, "scaleR", &myData->scaleRParam, 0); - gParamHost->paramGetHandle(paramSet, "scaleG", &myData->scaleGParam, 0); - gParamHost->paramGetHandle(paramSet, "scaleB", &myData->scaleBParam, 0); - gParamHost->paramGetHandle(paramSet, "scaleA", &myData->scaleAParam, 0); + gParamHost->paramGetHandle(paramSet, "input_colourspace", &myData->inputSpaceParam, 0); + gParamHost->paramGetHandle(paramSet, "output_colourspace", &myData->outputSpaceParam, 0); // cache clip handles gEffectHost->clipGetHandle(effect, kOfxImageEffectSimpleSourceClipName, &myData->sourceClip, 0); @@ -309,10 +270,6 @@ createInstance( OfxImageEffectHandle effect) // set my private instance data gPropHost->propSetPointer(effectProps, kOfxPropInstanceData, 0, (void *) myData); - // As the parameters values have already been loaded, set - // the enabledness of the per component scale values - setPerComponentScaleEnabledness(effect); - return kOfxStatOK; } @@ -402,6 +359,40 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs const char *bitDepthStr = bitDepth == 8 ? kOfxBitDepthByte : (bitDepth == 16 ? kOfxBitDepthShort : kOfxBitDepthFloat); const char *componentStr = isRGBA ? kOfxImageComponentRGBA : kOfxImageComponentAlpha; + std::string preferredInputSpace; + std::string preferredOutputSpace; + int preferredInputSpaceIndex; + int preferredOutputSpaceIndex; + gParamHost->paramGetValue(myData->inputSpaceParam, &preferredInputSpaceIndex); + gParamHost->paramGetValue(myData->outputSpaceParam, &preferredOutputSpaceIndex); + + switch (preferredInputSpaceIndex) { + case 0: + preferredInputSpace = kOfxColourspaceRoleSceneLinear; + break; + case 1: + preferredInputSpace = kOfxColourspaceRaw; + break; + case 2: + preferredInputSpace = kOfxColourspaceRoleColorTiming; + break; + } + + switch (preferredOutputSpaceIndex) { + case 0: + preferredOutputSpace = kOfxColourspaceACEScg; + break; + case 1: + preferredOutputSpace = kOfxColourspaceLinRec2020; + break; + case 2: + preferredOutputSpace = kOfxColourspaceSrgbTx; + break; + case 3: + preferredOutputSpace = kOfxColourspaceACEScct; + break; + } + // set out output to be the same same as the input, component and bitdepth gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Output", 0, componentStr); if(gHostSupportsMultipleBitDepths) @@ -413,7 +404,7 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { spdlog::info("Specifying preferred colourspaces since host style={}", gHostColourManagementStyle); const char* colourSpaces[] = { - kOfxColourspaceACEScg, + preferredInputSpace.c_str(), kOfxColourspaceLinRec2020, kOfxColourspaceRoleSceneLinear}; for (int i = 0; i < std::size(colourSpaces); i++) { @@ -421,6 +412,10 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces, i, colourSpaces[i]); } + + if (!preferredOutputSpace.empty()) + gPropHost->propSetString(outArgs, "kOfxImageClipPropPreferredColourspaces_Output", 0, preferredOutputSpace.c_str()); + } else { spdlog::info("Host does not support colour management (this example won't be very interesting)"); } @@ -464,13 +459,6 @@ instanceChanged( OfxImageEffectHandle effect, char *objChanged; gPropHost->propGetString(inArgs, kOfxPropName, 0, &objChanged); - // Did the source clip change or the 'scaleComponents' change? In which case enable/disable individual component scale parameters - if((isClip && strcmp(objChanged, kOfxImageEffectSimpleSourceClipName) == 0) || - (isParam && strcmp(objChanged, "scaleComponents") == 0)) { - setPerComponentScaleEnabledness(effect); - return kOfxStatOK; - } - // don't trap any others return kOfxStatReplyDefault; } @@ -490,7 +478,6 @@ static std::string getClipColourspace(const OfxImageClipHandle clip) { } -// the process code that the host sees static OfxStatus render( OfxImageEffectHandle instance, OfxPropertySetHandle inArgs, OfxPropertySetHandle /*outArgs*/) @@ -593,25 +580,46 @@ describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) gPropHost->propGetString(inArgs, kOfxImageEffectPropContext, 0, &context); bool isGeneralContext = strcmp(context, kOfxImageEffectContextGeneral) == 0; - OfxPropertySetHandle props; + OfxPropertySetHandle clipProps; // define the single output clip in both contexts - gEffectHost->clipDefine(effect, kOfxImageEffectOutputClipName, &props); + gEffectHost->clipDefine(effect, kOfxImageEffectOutputClipName, &clipProps); // set the component types we can handle on out output - gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + gPropHost->propSetString(clipProps, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); // define the single source clip in both contexts - gEffectHost->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &props); + gEffectHost->clipDefine(effect, kOfxImageEffectSimpleSourceClipName, &clipProps); // set the component types we can handle on our main input - gPropHost->propSetString(props, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); + gPropHost->propSetString(clipProps, kOfxImageEffectPropSupportedComponents, 0, kOfxImageComponentRGBA); //////////////////////////////////////////////////////////////////////////////// // define the parameters for this context - // fetch the parameter set from the effect + OfxPropertySetHandle props; OfxParamSetHandle paramSet; gEffectHost->getParamSet(effect, ¶mSet); + gParamHost->paramDefine(paramSet, kOfxParamTypeChoice, "input_colourspace", &props); + gPropHost->propSetInt(props, kOfxParamPropDefault, 0, 0); + gPropHost->propSetString(props, kOfxPropLabel, 0, "Preferred Input Colourspace"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 0, "Scene Linear"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 1, "Raw"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 2, "Log (Color Timing role)"); + + gParamHost->paramDefine(paramSet, kOfxParamTypeChoice, "output_colourspace", &props); + gPropHost->propSetInt(props, kOfxParamPropDefault, 0, 0); + gPropHost->propSetString(props, kOfxPropLabel, 0, "Output Colourspace"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 0, "ACEScg (scene linear)"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 1, "Rec2020 (linear)"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 2, "SRGB"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 3, "ACEScct (Log)"); + + // These params affect clip preferences + OfxPropertySetHandle effectProps; + gEffectHost->getPropertySet(effect, &effectProps); + gPropHost->propSetString(effectProps, kOfxImageEffectPropClipPreferencesSlaveParam, 0, "input_colourspace"); + gPropHost->propSetString(effectProps, kOfxImageEffectPropClipPreferencesSlaveParam, 1, "output_colourspace"); + return kOfxStatOK; } @@ -677,6 +685,9 @@ describe(OfxImageEffectHandle effect) return kOfxStatOK; } +// Make these actions "silent", i.e. not logged. They can be super verbose. +std::set silentActions = {"uk.co.thefoundry.FnOfxImageEffectActionGetTransform"}; + //////////////////////////////////////////////////////////////////////////////// // The main function static OfxStatus @@ -684,7 +695,8 @@ pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, { OfxStatus stat = kOfxStatOK; - spdlog::info(">>> pluginMain({})", action); + if (silentActions.find(action) == silentActions.end()) + spdlog::info(">>> pluginMain({})", action); try { // cast to appropriate type OfxImageEffectHandle effect = (OfxImageEffectHandle) handle; @@ -747,7 +759,8 @@ pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, // other actions to take the default value - spdlog::info("<<< pluginMain({}) = {}", action, errMsg(stat)); + if (silentActions.find(action) == silentActions.end()) + spdlog::info("<<< pluginMain({}) = {}", action, errMsg(stat)); return stat; } From 9a9748c2d5a64901bda2e558ea3f1dde1a9d445c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 16 May 2024 11:57:18 -0400 Subject: [PATCH 30/34] Update colorspace example: fixes from Phil Barrett - Fix negative rowbytes - Add unspecified preferred input space - Set input preferred space correctly Signed-off-by: Gary Oberbrunner --- Examples/ColorSpace/colorspace.cpp | 46 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColorSpace/colorspace.cpp index d4149fc6..4424dcc4 100644 --- a/Examples/ColorSpace/colorspace.cpp +++ b/Examples/ColorSpace/colorspace.cpp @@ -103,9 +103,7 @@ static void drawText(const std::string &message, int x, int y, txt_img.draw_text(0, 0, message.c_str(), fg, bg, 1.0, font_height); int txt_width = txt_img.width(); int txt_height = txt_img.height(); - bool invert = true; // CImg is top-down, opposite of OpenFX (bottom up) - if (rowbytes < 0) // unless the image has negative rowbytes - invert = false; + // CImg is top-down, opposite of OpenFX (bottom up) // iy here is image y, ty is text-image y; same for x switch (bits) { case 8: { @@ -115,7 +113,7 @@ static void drawText(const std::string &message, int x, int y, float bg_opacity = 0.2f; for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { T *row = (T *)((unsigned char *)image + iy * rowbytes); - float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + float *txt_row = txt_img.data(0, txt_height - 1 - ty); for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { switch (nchannels) { case 1: // Alpha only @@ -141,7 +139,7 @@ static void drawText(const std::string &message, int x, int y, float bg_opacity = 0.2f; for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { T *row = (T *)((unsigned char *)image + iy * rowbytes); - float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + float *txt_row = txt_img.data(0, txt_height - 1 - ty); for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { switch (nchannels) { case 1: // Alpha only @@ -165,7 +163,7 @@ static void drawText(const std::string &message, int x, int y, float bg_opacity = 0.2f; for (int iy = y, ty = 0; iy < ydim && ty < txt_height; iy++, ty++) { float *row = (float *)((unsigned char *)image + iy * rowbytes); - float *txt_row = txt_img.data(0, invert ? txt_height - 1 - ty : ty); + float *txt_row = txt_img.data(0, txt_height - 1 - ty); for (int ix = x, tx = 0; ix < xdim && tx < txt_width; ix++, tx++) { switch (nchannels) { case 1: // Alpha only @@ -376,7 +374,10 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs case 2: preferredInputSpace = kOfxColourspaceRoleColorTiming; break; - } + case 3: + preferredInputSpace = {}; + break; + } switch (preferredOutputSpaceIndex) { case 0: @@ -393,7 +394,7 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs break; } - // set out output to be the same same as the input, component and bitdepth + // set our output to be the same same as the input, component and bitdepth gPropHost->propSetString(outArgs, "OfxImageClipPropComponents_Output", 0, componentStr); if(gHostSupportsMultipleBitDepths) gPropHost->propSetString(outArgs, "OfxImageClipPropDepth_Output", 0, bitDepthStr); @@ -403,18 +404,20 @@ getClipPreferences( OfxImageEffectHandle effect, OfxPropertySetHandle /*inArgs #ifdef PREFER_COLOURSPACES if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { spdlog::info("Specifying preferred colourspaces since host style={}", gHostColourManagementStyle); - const char* colourSpaces[] = { - preferredInputSpace.c_str(), - kOfxColourspaceLinRec2020, - kOfxColourspaceRoleSceneLinear}; - for (int i = 0; i < std::size(colourSpaces); i++) { - spdlog::info("Specifying preferred colourspace {} = {}", i, colourSpaces[i]); - gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces, - i, colourSpaces[i]); + if(!preferredInputSpace.empty()) { + const char* colourSpaces[] = { + preferredInputSpace.c_str(), + kOfxColourspaceLinRec2020, + kOfxColourspaceRoleSceneLinear}; + for (size_t i = 0; i < std::size(colourSpaces); i++) { + spdlog::info("Specifying preferred colourspace {} = {}", i, colourSpaces[i]); + gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces "_Source", + i, colourSpaces[i]); + } } if (!preferredOutputSpace.empty()) - gPropHost->propSetString(outArgs, "kOfxImageClipPropPreferredColourspaces_Output", 0, preferredOutputSpace.c_str()); + gPropHost->propSetString(outArgs, kOfxImageClipPropPreferredColourspaces "_Output", 0, preferredOutputSpace.c_str()); } else { spdlog::info("Host does not support colour management (this example won't be very interesting)"); @@ -537,7 +540,7 @@ static OfxStatus render( OfxImageEffectHandle instance, // Just copy from source to dest, and draw some text if (srcRowBytes < 0 && dstRowBytes < 0) - memcpy((char *)dst + dstRowBytes * (ydim-1), (char*)src + srcRowBytes * (ydim-1), srcRowBytes * ydim); + memcpy((char *)dst + dstRowBytes * (ydim-1), (char*)src + srcRowBytes * (ydim-1), -srcRowBytes * ydim); else memcpy(dst, src, srcRowBytes * ydim); int ystart = ydim - 100; @@ -605,6 +608,7 @@ describeInContext( OfxImageEffectHandle effect, OfxPropertySetHandle inArgs) gPropHost->propSetString(props, kOfxParamPropChoiceOption, 0, "Scene Linear"); gPropHost->propSetString(props, kOfxParamPropChoiceOption, 1, "Raw"); gPropHost->propSetString(props, kOfxParamPropChoiceOption, 2, "Log (Color Timing role)"); + gPropHost->propSetString(props, kOfxParamPropChoiceOption, 3, "Unspecified (accepts anything)"); gParamHost->paramDefine(paramSet, kOfxParamTypeChoice, "output_colourspace", &props); gPropHost->propSetInt(props, kOfxParamPropDefault, 0, 0); @@ -739,8 +743,8 @@ pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, } else if(strcmp(action, kOfxImageEffectActionGetTimeDomain) == 0) { stat = getTemporalDomain(effect, inArgs, outArgs); - } - } catch (std::bad_alloc) { + } + } catch (const std::bad_alloc&) { // catch memory spdlog::error("Caught OFX Plugin Memory error"); stat = kOfxStatErrMemory; @@ -749,7 +753,7 @@ pluginMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, spdlog::error("Caught OFX Plugin error {}", e.what()); stat = kOfxStatErrUnknown; } catch (int err) { - spdlog::error("Caught misc error {}", err); + spdlog::error("Caught misc error {}", err); stat = err; } catch ( ... ) { // everything else From c3ecca0927e7632e330e6b2818daae90eb99c1c6 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 16 May 2024 12:02:00 -0400 Subject: [PATCH 31/34] Rename ColorSpace to ColourSpace for consistency - Example dir name - Example source file name Signed-off-by: Gary Oberbrunner --- Examples/CMakeLists.txt | 6 +++--- Examples/{ColorSpace => ColourSpace}/Info.plist | 0 .../colorspace.cpp => ColourSpace/colourspace.cpp} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename Examples/{ColorSpace => ColourSpace}/Info.plist (100%) rename Examples/{ColorSpace/colorspace.cpp => ColourSpace/colourspace.cpp} (100%) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 623f7915..e6790fcc 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -3,7 +3,7 @@ set(OFX_SUPPORT_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Support/include") set(PLUGINS Basic ChoiceParams - ColorSpace + ColourSpace Custom DepthConverter Invert @@ -28,5 +28,5 @@ endforeach() target_link_libraries(example-OpenGL PRIVATE opengl::opengl) target_link_libraries(example-Custom PRIVATE opengl::opengl) -target_link_libraries(example-ColorSpace PRIVATE cimg::cimg) -target_link_libraries(example-ColorSpace PRIVATE spdlog::spdlog_header_only) +target_link_libraries(example-ColourSpace PRIVATE cimg::cimg) +target_link_libraries(example-ColourSpace PRIVATE spdlog::spdlog_header_only) diff --git a/Examples/ColorSpace/Info.plist b/Examples/ColourSpace/Info.plist similarity index 100% rename from Examples/ColorSpace/Info.plist rename to Examples/ColourSpace/Info.plist diff --git a/Examples/ColorSpace/colorspace.cpp b/Examples/ColourSpace/colourspace.cpp similarity index 100% rename from Examples/ColorSpace/colorspace.cpp rename to Examples/ColourSpace/colourspace.cpp From e23ef6fab867a1ccb0394dfeb443ad554791f4fa Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 16 May 2024 12:05:01 -0400 Subject: [PATCH 32/34] Fix a couple of Info.plist CFBundleExecutable strings Signed-off-by: Gary Oberbrunner --- Examples/ColourSpace/Info.plist | 2 +- Support/Plugins/ChoiceParams/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/ColourSpace/Info.plist b/Examples/ColourSpace/Info.plist index 21152b3e..dd0485fb 100644 --- a/Examples/ColourSpace/Info.plist +++ b/Examples/ColourSpace/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion English CFBundleExecutable - basic.ofx + colourspace.ofx CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/Support/Plugins/ChoiceParams/Info.plist b/Support/Plugins/ChoiceParams/Info.plist index 21152b3e..750eda64 100644 --- a/Support/Plugins/ChoiceParams/Info.plist +++ b/Support/Plugins/ChoiceParams/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion English CFBundleExecutable - basic.ofx + choiceparams.ofx CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType From 6e95184e5af97c80c83cd7b17362159c190c1487 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 16 May 2024 12:13:42 -0400 Subject: [PATCH 33/34] Add Emacs .dir-locals.el to set our C/C++ indentation standard Signed-off-by: Gary Oberbrunner --- .dir-locals.el | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000..4fa9120b --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,6 @@ +;;; Directory Local Variables -*- no-byte-compile: t -*- +;;; For more information see (info "(emacs) Directory Variables") + +;; for C and C++, we use 2 space offset, no tabs +((prog-mode . ((c-basic-offset . 2) + (indent-tabs-mode . nil))) From 63d32277c2a191e43f9699e2c3dca334b22d9eea Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Fri, 12 Jul 2024 12:17:35 -0400 Subject: [PATCH 34/34] Update to latest spec Signed-off-by: Gary Oberbrunner --- Examples/ColourSpace/colourspace.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Examples/ColourSpace/colourspace.cpp b/Examples/ColourSpace/colourspace.cpp index 4424dcc4..57354e48 100644 --- a/Examples/ColourSpace/colourspace.cpp +++ b/Examples/ColourSpace/colourspace.cpp @@ -19,7 +19,7 @@ #include "ofxMemory.h" #include "ofxMultiThread.h" #include "ofxColour.h" -#include "ofxColourspaceList.h" +#include "ofx-native-v1.5_aces-v1.3_ocio-v2.3.h" #include "../include/ofxUtilities.H" // example support utils @@ -675,12 +675,12 @@ describe(OfxImageEffectHandle effect) gPropHost->propSetString(effectProps, kOfxImageEffectPropSupportedContexts, 1, kOfxImageEffectContextGeneral); if (gHostColourManagementStyle != kOfxImageEffectPropColourManagementNone) { - // host supports colour management, either OCIO or Native. - // OCIO implies native, so here we can assume it supports native. - // Tell it we support native. + // host supports colour management, either OCIO or Core (or others; see the spec). + // OCIO implies core, so here we can assume it supports Core. + // Tell it we support Core. stat = gPropHost->propSetString(effectProps, kOfxImageEffectPropColourManagementStyle, 0, - kOfxImageEffectPropColourManagementNative); + kOfxImageEffectPropColourManagementCore); if (stat != kOfxStatOK) { spdlog::error("setting kOfxImageEffectPropColourManagementStyle prop: stat={}", errMsg(stat)); }