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

HEVC: add missing parsing of some multilayer SPS elements #2092

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

jamrial
Copy link
Contributor

@jamrial jamrial commented Jul 7, 2024

I have a few multiview samples generated by either iPhone or Apple's authoring tools, and for all of them i get the following:

Conformance errors                       : 1
 HEVC                                    : Yes
  General compliance                     : Bitstream parsing ran out of data to read before the end of the syntax was reached, most probably the bitstream is malformed  (offset 0xDEADBEEF)
Codec configuration box                  : hvcC+lhvC

In both cases, the offset reported is the start of whatever box follows the lhvC one, so it was clear there were LHEVCDecoderConfigurationRecord parsing related issues.

Looking into it i found one problem parsing SPS when nuh_layer_id > 0 and one when MultiLayerExtSpsFlag is true (nuh_layer_id > 0 && sps_ext_or_max_sub_layers_minus1 == 7), both of which i'm fixing in this PR, as the LHEVCDecoderConfigurationRecord itself seems to be ok.
Only the latter is enough to fix parsing the samples i have, but i'm including the other as well to ensure correct parsing for all files. You can check the syntax i'm fixing in section F.7.3.2.2.1 of ITU-T H.265

@jamrial jamrial force-pushed the sps_multilayer branch 3 times, most recently from 0fdaf8f to 17ffc67 Compare July 7, 2024 22:35
@JeromeMartinez
Copy link
Member

Thank you for the patch.

I have a few multiview samples generated by either iPhone or Apple's authoring tools

Can you share one?
The files I received don't show this issue.

@jamrial
Copy link
Contributor Author

jamrial commented Jul 8, 2024

@JeromeMartinez JeromeMartinez merged commit 88f3ea4 into MediaArea:master Jul 12, 2024
9 checks passed
@JeromeMartinez
Copy link
Member

Thank you!

@jamrial jamrial deleted the sps_multilayer branch July 12, 2024 12:50
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