Repository navigation
fix(video): cap the declared HEVC level at 5.1 and derive DV CODECS from the hvcC (#674) - #677
Merged
Merged
Conversation
A Dolby Vision Profile 8.1 source whose hvcC states level 5.2 (156) had its master and reduced HDR master refused on Apple TV 4K with -11848 / CoreMedia -15517, falling back to the media playlist with the DV upgrade dropped. The stream was 1080p24; capping the declared level at L153 lets the DV master play. The DV branches of resolveCodecRoute also hardcoded hvc1.2.4.L<level>, dropping the constraint bytes the plain-HEVC branch has derived from the hvcC since AE#187. They now go through plainHEVCCodecs like that branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-up to the reporter's commit. The level cap sat only in the hvcC builder, so a source without a parseable hvcC still declared its codecpar level verbatim through the hvc1.2.4.L<level> fallback. The cap is now one named constant, maxDeclaredHEVCLevel, applied to both. Tests pin the reporter's hvcC (level 156 -> hvc1.2.4.L153.90), levels up to 5.1 declared as stated, and the DV Profile 8.1 route with and without an hvcC. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
Owner
Author
|
Thanks @gonkowonko, the diagnosis and the device-tested fix made this a quick one. Your commit went in as is, with a follow-up that applies the same cap to the fallback taken without a parseable hvcC and pins the case in tests. Shipped in 7.23.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the DV master refusal reported in #674.
A DV Profile 8.1 MKV whose hvcC states level 5.2 (156) on a 1080p24 picture had that level copied into the master's
CODECS. An Apple TV 4K refuses a 5.2 declaration with -11848 / CoreMedia -15517, on the DV master and the reduced HDR master alike, so the session ended on the media playlist with Dolby Vision dropped.L153) and routes the DV branches (P8.1, P8.4, P7) throughplainHEVCCodecs, so they carry the hvcC's constraint bytes like the plain HEVC route has since AE#187. Device-verified by the reporter: the DV master is accepted and the panel engages Dolby Vision.maxDeclaredHEVCLevel, and also applies to thehvc1.2.4.L<level>fallback taken without a parseable hvcC. AddsIssue674HEVCLevelCapTests.The init segment's hvcC keeps its stated level; only the manifest attribute changes. A stream that genuinely needs more than 5.1 would end on the media playlist either way, where nothing is declared.
swift test: XCTest 654 passed (1 skipped), swift-testing 3937 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS