Commit graph

8 commits

Author SHA1 Message Date
SergeiAK
2f7804fd5e
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>
2026-10-28 15:16:42 -04:00
Damontecres
f74306a12c
Fix subtitle outline width not applying in release builds (#1687)
## Description
Fix applying the subtitle outline width in ExoPlayer for release builds

The outline width field isn't public, so reflection is used to bypass
and modify it. Since proguard/r8 renames all of the classes and fields,
this meant the field was no longer found. The fix is to have proguard
preserve the necessary field names.

### Related issues
Fixes #1681

### Testing
Emulator w/ release build

## Screenshots
N/a

## AI or LLM usage
None
2026-07-11 13:21:41 -04:00
Damontecres
00338c5c11
Fix MPV minify crash (#1636)
## Description
Fixes a crash when trying to play content via MPV on release builds.

After #1365, the package name for `MPVLib` changed, so the existing
proguard rule no longer applied. This meant the native code could no
longer find the right class.

### Related issues
Fixes #1633
https://github.com/damontecres/wholphin-extensions/pull/9 fixes this
upstream

### Testing
Tested release builds on emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-27 14:29:46 -04:00
Damontecres
625cdcb4a3
Fix proguard for guava cache (#1445)
## Description
r8 optimizations seemingly cause guava's LocalCache to throw an
AssertationError when evicting an entry. This PR adds a broad keep rule
for the cache package.

The crash is reproducible on a release build with a TV Season that has
25+ episodes with people in them and scrolling through the episodes. It
will crash when focusing on the ~25th episode.

### Related issues
Related to #1437 

### Testing
Emulator & nvidia shield

## Screenshots
N/A

## AI or LLM usage
None
2026-05-23 21:21:51 -04:00
Damontecres
bfb49b80be
Enable minify optimizations for release builds (#1437)
## Description
Enables minify & resource shrinking for release builds. This should
improve overall performance a bit. It also decreases the apk size by
~15%.

Also updates AGP

### Related issues
N/A

### Testing
Emulator, but needs more testing before a final release

## Screenshots
N/A

## AI or LLM usage
None
2026-05-23 14:08:38 -04:00
damontecres
e2db5ab4f3
Enable minify/proguard (#29) 2025-10-17 19:44:36 -04:00
damontecres
d1441db422
Set update URL (#8)
Set the default update URL. Also testing PR workflow.
2025-10-15 17:17:16 -04:00
Damontecres
2d02ff4cbe
Initial app creation 2025-09-20 16:36:38 -04:00