Convert Dolby Vision profile 7 to 8.1 on devices without a profile 7 decoder (#2017)
## Description **On Amlogic boxes (S905X4 and similar) Dolby Vision Profile 7 does not play as Dolby Vision.** The server transcodes it, or, with "Direct play Dolby Vision Profile 7" switched on by hand, the decoder answers `NoSupport` and fallback ends in HDR10. Devices with a native Profile 7 decoder, such as the Shield, are not affected and nothing changes for them. This PR converts Profile 7 to 8.1 on the fly. It has two halves and one decision. The preference `convertDolbyVisionProfile7` is proto field 6 in the experimental settings, off by default. In `WholphinRenderersFactory` the filter comes first in the list, followed by the HDR10+ masking from #1876. **What this PR does not do.** The enhancement layer is dropped; that is the price of the conversion, which is why devices with a native Profile 7 decoder are left alone. `BlockAdditional` (an enhancement layer outside the stream) is not read — like the rest of Wholphin today — so such a file stays HDR10, as it is now. ### Related issues Closes #244 Builds on #1876 (the `BitstreamFilter` list). Related to #1540. @fanni42 asked for exactly this on an S905X4 in #1876. ### Testing **Hardware** — a debug build of this branch, Homatics box (Amlogic S905X4, Android 14) + LG BX, Jellyfin 12.1.0, a Profile 7 FEL remux with the enhancement layer in band, played from the start for 39 seconds. Only the new preference was switched on; manual "Direct play Dolby Vision Profile 7" was **off**: * `DolbyVisionProfile7FilterTest` (14) — a fake rewriter on a direct buffer: offset ≠ 0, position/limit untouched, every "bytes stay as they were" branch, three-byte start codes, `UnsatisfiedLinkError` tried once; * `DolbyVisionProfile7ExtractorsFactoryTest` (5, mockk) — only the video track is rewritten; * `DolbyVisionProfile7ConversionTest` (6) — codec strings, DRM, `dvh1`. CI in my fork ran on this branch plus a debug signing commit: `pre-commit`, `testDefaultDebugUnitTest` and `assembleDefaultDebug` are all green. The hardware measurement above is that build. ## Screenshots The only UI change is one toggle in the experimental settings. ## AI or LLM usage The code was written with Claude (Claude Code): the filter, the extractor wrapper, the condition and the tests. I reviewed every line and can explain it. It was tested with the unit tests and the hardware measurement above. This description was written by me in Russian and translated into English with the same assistant. --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Damontecres <damontecres@gmail.com>
This commit is contained in:
parent
6d029086e9
commit
2f7804fd5e
15 changed files with 1038 additions and 14 deletions
|
|
@ -503,6 +503,8 @@
|
|||
<string name="force_dovi_profile_7_summary">Ignores device compatibility checks</string>
|
||||
<string name="prefer_dovi_over_hdr10_plus">Prefer Dolby Vision over HDR10+</string>
|
||||
<string name="prefer_dovi_over_hdr10_plus_summary">Removes HDR10+ metadata from Dolby Vision videos, for TVs that otherwise play them as HDR10+</string>
|
||||
<string name="convert_dovi_profile_7">Convert Dolby Vision Profile 7 to 8.1</string>
|
||||
<string name="convert_dovi_profile_7_summary">Rewrites dual-layer Profile 7 into single-layer Profile 8.1 before the decoder and direct plays it, for devices whose decoder lists Profile 8 but not Profile 7</string>
|
||||
|
||||
<string name="discover">Discover</string>
|
||||
<string name="request">Request</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue