-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for variable length extension metadata blocks #106
Conversation
@saindriches I added your changes, just need to actually test it and fix stuff. |
Feels a bit odd that the primaries are over 15 bits, since the documentation uses values based on 50 000 max. |
37abee9
to
d64b845
Compare
Looks like there's no way to validate L10.
|
It's able to verify L10 with an XML metadata, it checks target displays used by L8 and compare correspond L10 with XML data, and will raise an error if values don't match. Use
It will also raise an error if L8 and L10 trims do not correspond (that means any |
Support parsing L8/L9 from metadata XML A predefined list of primaries is added for parsing primary_index of L9/L10. Co-authored-by: Rainbaby <rainbaby@outlook.jp> Co-authored-by: quietvoid <39477805+quietvoid@users.noreply.github.com>
And add a test
primary_index | ||
} else { | ||
// FIXME: Why are the target primaries offset by the preset source primaries? | ||
primary_index + level9::PREDEFINED_COLORSPACE_PRIMARIES.len() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand why this is.
Probably going to have to experiment with different primary values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyways, this is starting to get pretty big so I'd rather merge before fixing more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late, L10 should only use the PREDEFINED_COLORSPACE_PRIMARIES
, while the PREDEFINED_REALDEVICE_PRIMARIES
part is only for L9 from my test. That means L9 may have a source_primary_index: 18
but L10 doesn’t.
If a target display uses primaries from the real devices list, then verifier do not recognize a target_primary_index
derived from that list as predefined, we should use 255 in that moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to play around with both primary/source index values.
If there's an issue with the current implementation, can create a new issue.
Implements fixes for #104, #105
L8, L9, and L10 metadata blocks can have variable lengths, to avoid serializing unnecessary metadata.
That's useful in the case of allowing preset mastering display primaries, as well as being able to support custom primaries.