Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265
Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265cozdas wants to merge 6 commits intoAcademySoftwareFoundation:mainfrom
Conversation
…files. - Added "Id" element support per the spec. - Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version) - CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names. - Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field) - CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers. - Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements - ociomakeclf tool now takes "--generateid" switch to for inserting newly added "Id element" into the target clf file. TODO: - Description and Descriptor elements need to collect the language attribute. - non-default namespace attributes (e.g. xmlns:foo) needs to be collected as root level attributes. - Those two TODO items need some re-factoring in the data collection code. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
zachlewis
left a comment
There was a problem hiding this comment.
LGTM!
I may have missed this, but do we have tests for CLFs with more than one InputDescriptor / OutputDescriptor?
There was a problem hiding this comment.
Does this mean CTF Reference nodes do not support SMPTE-flavored CLF?
(I suppose I'm okay with this, since Reference nodes aren't publicly documented or explicitly supported)
There was a problem hiding this comment.
Yes, the smpte_all_metadata test in FileFormatCTF_tests.cpp checks multiple OutputDescriptors (line 1464).
References will support any loadable LUT format. The one the test uses happens to be pre-SMPTE, but I agree with you that it could give the wrong impression. We will update that to reference one of the other files.
Thanks for the quick review Zach!
…ELEMENT in python too. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
…ass to be able to collect richer metadata. - Now collecting the language attribute of the Description, input and output descriptor elements. - Also collecting the non-default xmlns attributes at the root level. - Updated the tests accordingly. - Replaced clf/pre-smpte_only/matrix_example.clf with clf/matrix_example_utf8.clf in some for some Reference tests. - Added format information to the ociomakeclf tool's help text. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
(we need to make Windows compiler settings as picky as other platforms) Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files. Addressing the issue #1993
Added "Id" element support per the spec.
Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)
CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.
Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)
CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.
Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements
ociomakeclf tool now takes "--generateid" switch for inserting newly added "Id element" into the target clf file.
Description, Input and Output Descriptor elements now collect the language attribute too.
non-default namespace attributes (e.g. xmlns:*) are now collected as root level attributes.
Some re-factoring in CLF xml parsing code was needed to be able to add extra attribute collection.
Added OCIO_CHECK_EQUAL_STR unit test macro to ease some pain with "char *" comparisons.