I will now concentrate on a second additional feature request for CTL. (the first one was adding TransformID
).
As the CTL specifications seem to be “frozen” for some reason, it’s not possible to add official elements to it, therefore the previous one mentioned above was added as a pre-formatted comment line at the beginning of .ctl
files.
The comment-line reports XML syntax within, despite CTL grammar is more like that of C language. Therefore for now, I will attain to this syntax.
I think it might be very beneficial to the adoption of Academy-provided (“original”) CTLs, if there is a mechanism to validate them apart from checking their TransformID
or CTL filename against ACES naming convention, as specified in S-2014-002
. This way, at least for ACES Product Partners that internally implement those transforms, this is an additional tool to easily check whether the CTL is the original one and does not need to provide LUTs representing them.
I suggest adding a <aces:TransformDigest>
XML element, enclosed within a C+±style comment-line for now, following <ACEStransformID>
element and containing the canonical string representation of a SHA-1 digest (lowercase hexadecimal characters). The digest is computed following this algorithm.
- The CTL is added the following, fixed, commented-line (as either first non-empty line or as the line immediately following the
TransformID
commented-line):
// <aces:TransformHash>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</aces:TransformHash>
(there’s a 40-times repetition ofX
character and a whitespace 0x20 character between the comment tag '//
'and opening XML tag). - The SHA-1 of the CTL file (with the above line added) is computed now, and its lower-case, 40-characters representation replaces the content of the
TransformHash
element; for example:
// <aces:TransformHash>e5f08d98bf18385e2f26b904cad23c734d530ffb</aces:TransformHash>
The validation procedure consists in searching for a TransformHash
element, replacing the 40-character digest with a 40-character string of X
's and then computng the SHA-1 on such altered message.
It’s important to note that, among Academy-provided CTLs, there are also the IDTs and ODTs provided by camera as well as by monitor manufacturers in the Logo program. The above digests can be used, on larger color-management applications with ten-thousands of color recorded transformations, as a possible database index to them.
At a later stage, when the CTL format will likely be updated, I think it makes sens to have it a uniform C-style syntax, therefore I think TransformID and TransformHash metadata can be provided, off-comments, at the beginning of CTL files, like:
TransformID "InvODT.Academy.P3DCI_48nits.a1.0.1";
TransformHash "e5f08d98bf18385e2f26b904cad23c734d530ffb"
;