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

mini: implement HEVC reading #1351

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

bradh
Copy link
Contributor

@bradh bradh commented Oct 29, 2024

Adds support for HEVC to the existing AV1 mini box decoding.

This also completes most of the ItemPropertyBox reconstruction (less HDR since we don't support it yet). The work on pixi box is also outstanding. As part of the reconstruction, there are properties that may or may not be used. The CDAM describes using a FreeSpaceBox, which seems like an easier way to get the associations right.

@@ -412,6 +412,23 @@ class Box_ftyp : public Box
};


class Box_free : public Box
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to reuse the existing Box_other as the placeholder box instead of introducing a new Box_free class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my first attempt.

It didn't work out because some of the properties are marked essential (e.g. imir and irot, plus the codec might end up getting omitted if we support the JPEG case). We have a check for any Box_other instances that are marked as essential, since its something we should handle and can't. So a Box_free (which is a no-op) seemed better.

The other way to do this would be to use Box_other but to check each association against the properties first, and only make it if we need it.

Or we could do both the free (either as an explicit Box_free box, or as a Box_other with free parameter), and the check, which would exactly align with the CDAM description.

@farindk farindk merged commit 91bb186 into strukturag:master Nov 4, 2024
35 checks passed
@bradh bradh deleted the mini_heif_2024-10-29 branch November 4, 2024 19:35
@farindk
Copy link
Contributor

farindk commented Nov 4, 2024

I've moved the expansion of the boxes into the Box_mini class to keep HeifFile clean. Please do a double check that it still works.

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