Repository navigation
feat(dv): dolbyVisionHandling = .baseLayerOnly, the base layer of a Dolby Vision source - #529
Conversation
…olby Vision source A host option that presents the HDR10 / HLG base layer of a Dolby Vision source and leaves the Dolby Vision out of the container on every display: plain hvc1 / av01 sample entry, dvcC stripped, no SUPPLEMENTAL-CODECS, no Profile 7 conversion, HDR10 / HLG display criteria instead of dvh1, and `videoFormat` reading the base layer's format while `sourceVideoFormat` / `sourceDVProfile` keep naming what the file carries. The case it exists for is a record the bitstream contradicts. The reported title (a 4K remux of 1917) carries a container record claiming Profile 5, compatibility 0, over a VUI that declares BT.2020 YCbCr PQ and an RPU with disable_residual_flag = 0, an EL resampling filter and NLQ, fields only a Profile 7 RPU has; the mapping is the identity and the base layer carries its own HDR10 static metadata. Served as dvh1.05 AVPlayer reads YCbCr as IPT and the picture is green / violet; every player that ignores the record shows the HDR10 base. Nothing in the container says which half is lying, so the choice is the host's, per title. Admitted for HEVC Profile 7 / 8.1 / 8.4 and AV1 Profile 10.1 / 10.4, whose record names the base layer, and for a Profile 5 / AV1 10.0 record whose VUI names one (a genuine Profile 5 leaves matrix and transfer unspecified, IPT-PQ-c2 having no VUI code point); a Profile 5 with an unspecified VUI keeps its route and the engine says so. The default route now logs the contradiction (`DV Profile 5 record over a BT.2020 YCbCr VUI`) so a host knows to offer the option. A tuning field (correctable through reloadAtCurrentPosition(applying:)); it wins over forceDolbyVisionOnNonDVDisplay, and under it a Profile 5 record the VUI contradicts no longer refuses the software path (superuser404notfound#176). aetherctl serve | validate | segverify | play --dv-base-layer and play --reload-applying dolby-vision=baseLayerOnly drive it. Covered by DolbyVisionBaseLayerTests; docs/api.md, docs/formats.md and docs/cli.md carry the option. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfD2fjFfjRQgh12aQRxbqf
|
Merged as d45ce3f. Thank you, this is a thorough piece of work: the predicate, the four call sites reading one answer, the log on the default route so a host knows to offer the option, and the docs all landed as written. Verified here against Dolby's browser test kit before merging, since the mislabelled title itself is not reproducible on this end. Default route byte-identical on P5, P8.1 and P8.4. With the option, P8.1 serves One follow-up pushed on top (9e4dba9, comment only): the doc comment on The follow-up in your last paragraph is the right shape. A Profile 5 RPU that carries a residual or an NLQ is a contradiction the file states on its own, and converting that class to 8.1 is a better answer than dropping the Dolby Vision. Worth its own issue when the fixture exists. |
…y Vision record (#532) A Profile 5 record over a BT.2020 YCbCr HDR VUI has its first RPU read and is served as what the RPU says: real Dolby Vision through the routes that already existed, rather than the green / violet IPT misread. Follow-up to #529, raised there by @skrew. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VDKAJrLjLXVsCvJVNdJEPw
|
The follow-up from your last paragraph is built and on main: #532. A Profile 5 record over a BT.2020 YCbCr VUI now has its first RPU read, and a source whose RPU reads 7 or 8 is served as that profile, so the class gets real Dolby Vision through the routes that already existed rather than the base layer this PR falls back to. Your option keeps precedence, since a host asking for the base layer is answering a question the engine did not ask. Measured on Dolby's Profile 8.1 signal relabelled to Profile 5 by two bytes. The Profile 7 arm is unit-tested only, because the reported title is not available here, so a run on your 1917 remux once this is released would be the one thing still missing. Details and the log line to look for are on #532. |
Summary
Adds LoadOptions.dolbyVisionHandling (.automatic / .baseLayerOnly): a host option that presents the HDR10 / HLG base layer of a Dolby Vision source and leaves the Dolby Vision out of the container, on every display. The route a host offers as "Dolby Vision: off (HDR10)", for a title whose Dolby Vision is wrong and whose base layer is right.
The reported title is a 4K remux of 1917 whose container record claims Profile 5, compatibility 0 over a bitstream whose VUI declares BT.2020 YCbCr PQ (color_primaries=9 color_trc=16 color_space=9) and whose RPU carries disable_residual_flag=0, el_spatial_resampling_filter_flag=1 and NLQ (linear_dz), fields only a Profile 7 RPU has, with an identity mapping and HDR10 static metadata on the base layer. libavcodec warns Profile 5 RPUs should not use NLQ on it. Served as dvh1.05, as the record asks, AVPlayer reads YCbCr as IPT and the picture is green / violet on tvOS; every player that ignores the record shows the HDR10 base. Nothing in the container says which half is lying, so the choice is the host's, per title.
What changed
Test plan
Not measured: a genuine Profile 5 with the option (it keeps its route by construction, covered by the unit test only), AV1 Dolby Vision with the option (no hardware-AV1 box at hand), the HLG branch (8.4) on a panel.
Checklist
A follow-up worth discussing separately: the contradiction is detectable without a false positive from the RPU itself (a Profile 5 RPU cannot carry a residual / NLQ), and the right automatic answer for that class is not the base layer but the existing P7 → 8.1 conversion, i.e. real Dolby Vision. That needs the first RPU parsed at probe time and a fixture, so it is left out of this PR.