Repository navigation
feat(tv-settings): opt-in True Black Bars for grey HDR letterbox bars - #477
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
On some Android TV devices, such as the Onn 4K Pro, the letterbox bars of a Dolby Vision title narrower than 16:9 glow grey. The bar rows hold only the player's opaque black, and the device composites that black above reference black while Dolby Vision is on. Other devices do the opposite, and no platform signal tells them apart. Add an off-by-default, device-local True Black Bars toggle under Settings > Playback > Streaming. When it is on and the first frame has rendered, the player clears its area to transparent instead of painting it black, so the bars come from the output's own black. Reset Playback Overrides clears it, and it never syncs to the server. Refs #475 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The navigation fade draws the player into a layer, so clearing it there let the other screen show through the bars. Clear only after the first frame and once the transition has settled. Found in cross-provider review. Refs #475 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebc7411904
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .background(Color.Black) | ||
| .then( | ||
| if (clearBars) { | ||
| Modifier.drawBehind { drawRect(Color.Transparent, blendMode = BlendMode.Clear) } |
There was a problem hiding this comment.
Expose a transparent host surface before clearing the bars
When True Black Bars is enabled, this Clear draw still targets an opaque activity surface: Theme.SiloTv inherits the non-translucent Material theme and sets android:windowBackground to the fully opaque #FF141417. Android therefore discards the cleared alpha outside the SurfaceView's own transparent region, leaving black pixels in the app layer rather than exposing the output beneath it. On the affected HDR devices, the toggle consequently cannot change the compositing path that produces grey bars; the player must first provide a genuinely transparent window/surface region for the letterbox area.
Useful? React with 👍 / 👎.
ebc7411 to
389f3c5
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
On some Android TV devices, the letterbox bars of a Dolby Vision title whose picture is narrower than 16:9 glow dim grey instead of black. On an OLED they are clearly lighter than the bezel. The report came from an Onn 4K Pro (Android TV 14) on an LG OLED. HDR10 and SDR bars are black there, and the same files show black bars on an Nvidia Shield.
The TV player sizes the video surface to the picture, so the bar rows contain only the player's own opaque black. On that device the hardware composer puts the app layer above reference black while Dolby Vision is on. Bars that are part of the video stay black. Other players on the same box behave the same way.
Leaving the bars transparent fixes it on some devices but causes it on others. Kodi and NuvioTV report that transparent bars fix Sony TVs and some Amlogic boxes, while Fire TV devices (MediaTek MT8696 and the Amlogic Fire TV Cube 3) and the Google TV Streamer need opaque black. No SoC field or platform API separates the two groups, which is why Kodi and NuvioTV also ended up with a manual override.
Solution
Android TV only. tvOS draws its own letterbox and has no report of this, and the phone app doesn't send Dolby Vision over HDMI.
Closes #475
Validation
Tested with an R8 release build of the PR head against a disposable Silo dev deployment (silo-server main at c7621772d) on an Android TV emulator (API 36), using a 1920×816 movie and a 1920×800 series.
./gradlew testDebugUnitTest: pass (shared 1598, android-shared 1679, androidApp 803, androidTvApp 1199).:android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug :androidTvApp:lintVitalRelease: pass, with no new errors over the baselines.:androidTvApp:assembleDebug,:androidTvApp:assembleRelease: pass.Validation tasks: unknown; the validation board couldn't be read for this PR.
Evidence: https://evidence.siloserver.org/r/silo-android/issue-475/
Risks
Follow-ups
AI disclosure
🤖 Generated with Claude Code
Note
Add opt-in True Black Bars setting for TV player
TrueBlackBarsplayback setting, defaulting to false, with a toggle in the TV playback settings pane. The key is local-only and excluded from DeviceSettings (PlaybackSettingsKeys.kt).TvPlayerScreenkeeps its black root background until the first rendered frame, during navigation transitions, and while the setting is off. When enabled and navigation settles, it clears the root drawing withBlendMode.Clearso letterbox areas become transparent instead of grey HDR black.trueBlackBarsFlowandsetTrueBlackBarstoPlayerSettingsStorewith no-op defaults, implemented inAndroidPlayerSettingsStore; the stored value is also removed when profile playback preferences are cleared.PlayerSettingsStorethat do not override the new members report false and no-op.Macroscope summarized 389f3c5.