## 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>
27 lines
866 B
Prolog
27 lines
866 B
Prolog
-keepattributes SourceFile,LineNumberTable
|
|
|
|
-keep class com.github.damontecres.wholphin.mpv.MPVLib { *; }
|
|
|
|
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
|
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
|
|
<fields>;
|
|
<methods>;
|
|
}
|
|
-dontwarn com.google.protobuf.**
|
|
|
|
# TODO investigate using smaller scope
|
|
-keep class com.google.common.cache.** { *; }
|
|
|
|
# Media3SubtitleOverride uses reflection to access/modify these fields
|
|
-keep class androidx.media3.ui.SubtitleView {
|
|
private androidx.media3.ui.SubtitleView$Output output;
|
|
}
|
|
-keep class androidx.media3.ui.CanvasSubtitleOutput {
|
|
private final java.util.List painters;
|
|
}
|
|
-keep class androidx.media3.ui.SubtitlePainter {
|
|
private final float outlineWidth;
|
|
}
|
|
|
|
# Keep external/native functions
|
|
-keep class com.suyashbelekar.exoplayerhdrutils.libdovi.LibDovi { *; }
|