Skip to content
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

Adding parsing for 'J2KExtendedCapabilities' stored in the MXF header's 'JPEG2000SubDescriptor'. #382

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

danielhdz13-netflix
Copy link
Contributor

No description provided.

… be used for InterchangeObject inheritors. Passed in byteProvider directly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A 50MB file isn't ideal, to have committed to the git repo. Do we have easy access to a much smaller HT J2K MXF? Or the ability to craft one ourselves?

We already have a couple of larger files in the test resources. So it isn't a big deal if we can't make this smaller. But its always good to try, when we can. The types of files covered by this might mean it is simply not possible to make a "small" test file though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - just replaced it with a ~4MB file.

else if (field.getType() == J2KExtendedCapabilities.class) {
J2KExtendedCapabilities j2KExtendedCapabilities = new J2KExtendedCapabilities(byteProvider);
field.set(object, j2KExtendedCapabilities);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it does feel very clean to recognize this as a top-level type. But I can't immediately think of a cleaner way to handle this within the current code. We are also already doing something similar for JPEG2000PictureComponentBO a little further down. So this is probably okay.

We can consider this as something to clean up in a future refactoring, if we make improvements to the way we recognize MXF properties.

public final class J2KExtendedCapabilities {

@MXFProperty(size=4) protected final Integer pCap = null;
@MXFProperty(size=0, depends=true) protected final CompoundDataTypes.MXFCollections.MXFCollection<Short> cCapi = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets change this to cCap, as the 'i' in the spec document is just used to indicate index.

Copy link
Contributor

@davidt-netflix davidt-netflix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. 👍
I'm not an expert on HT J2K, but I don't see any obvious problems. Feel free to merge whenever you are happy with things.

@danielhdz13-netflix danielhdz13-netflix marked this pull request as ready for review September 30, 2024 17:41
@danielhdz13-netflix danielhdz13-netflix merged commit 0ebf06a into master Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants