Repository navigation
fix(routing): exempt DV Profile 5 from the VT capability probe gate (#176) - #182
Merged
Merged
Conversation
…176) The #2 second-stage gate probes VideoToolbox with a plain-HEVC format description built from the raw hvcC. For DV Profile 5 that probe is not representative of the native route (dvh1 + dvcC, decoded by Apple's DV decoder) and rejects it with -12906/-4 even on Apple Silicon, wrongly routing P5 to the software path. There libavcodec decodes the IPT-PQ-c2 signal as YCbCr, producing the reported green/purple cast. P5 has no compatible base layer, so software is never a correct fallback for it. HEVC streams whose DOVI config says profile 5 now bypass the gate and stay native unconditionally; the probe closure is not even invoked. P7 / P8.x keep the gate since their base layer is standard Main10 that the software path decodes with correct color. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw
This was referenced Jul 21, 2026
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 #176.
Problem
A DV Profile 5 HEVC MKV on an M4 Mac mini played through the software path with a green/purple color shift. The reporter's log shows the #2 second-stage gate misfiring:
Root cause
VTCapabilityProbe.canHardwareDecodebuilds a plain-HEVC format description from the raw hvcC and asks VT for a hardware session. For DV Profile 5 that is not representative of what the native route actually plays: the muxer emits dvh1 + dvcC and Apple's DV decoder handles it (device-verified in #98, including tonemapping on non-DV panels). VT rejects the bare P5 hvcC with -12906/-4 even on Apple Silicon, so the probe returns a false negative and the #2 fallback routes P5 to the SoftwarePlaybackHost.The software path then decodes the IPT-PQ-c2 base layer as YCbCr, which is exactly the green/purple cast from the screenshot (same symptom class as the pre-dvh1 era of #4). P5 has no HDR10/HLG/SDR-compatible base layer, so software is never a correct fallback for it, regardless of what VT says.
Fix
VideoRoutingPolicy.forcesSoftwareForUndecodableFormatnow takes the DOVI profile and a probe closure. HEVC + DV profile 5 bypasses the gate and stays native unconditionally; the closure form means the VT probe is not even invoked for P5. P7 / P8.x keep the gate since their base layer is standard Main10 that the software path decodes with correct color (and where the Intel / older Apple TV fallback of #2 remains valid).Verification
swift build -Xswiftc -strict-concurrency=completeclean.xcodebuildclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw