Skip to content

fix(playback): honor source color range fallback - #86

Closed
Quick104 wants to merge 1 commit into
mainfrom
codex/native-color-range
Closed

Quick104 wants to merge 1 commit into
mainfrom
codex/native-color-range

Conversation

@Quick104

Copy link
Copy Markdown
Contributor

Summary

  • decode color_range from catalog metadata and the additive playback-v3 source descriptor
  • carry the range through phone and TV playback media specs
  • map FFmpeg tv to Media3 limited range and pc to full range only when extractor color range is unspecified
  • compose the fallback with existing HLG and Dolby Vision corrections instead of replacing them

Why

Silo preserves direct-play bytes, but Media3 can receive an unspecified container range. The server-probed FFmpeg value supplies a safe fallback while explicit extractor metadata remains authoritative.

Testing

  • focused shared and android-shared unit tests for catalog/v3 serialization, session conversion, and limited/full/conflict/unknown mappings
  • :androidApp:compileDebugKotlinAndroid
  • :androidTvApp:compileDebugKotlinAndroid
  • autoreview clean

Coordination

Depends on Silo-Server/silo-server#447.

Part of Silo-Server/silo-server#446

AI use

Implemented with OpenAI Codex. The generated patch was reviewed, focused tests and both client compiles were run, and review findings were addressed before publication.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 39d60797-01da-4706-a7b2-87f7d97e2c41

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/native-color-range

Comment @coderabbitai help to get the list of available commands.

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with gpt-6.1-sol in T3 Code using the Codex provider.

val colorInfoOutput = ColorInfoTrackOutput(
output,
expectedDynamicRange,
expectedColorRange,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Bind the range fallback to the video track it describes

Every video TrackOutput receives the same expectedColorRange, but the server builds this hint from VideoTracks[0], and v3 supplies no selected video-stream identity. I reproduced this with a valid two-track H.264 MKV whose container range fields are absent: ffprobe reports tv for the first track and pc for the second; Media3 1.10.1 emits both ranges as unspecified, and the production factory with the server's tv hint rewrites both to limited range. If Media3 selects the second track, phone and TV pass the first track's range to MediaCodec, risking incorrect black/white levels. Apply the hint only when the video track is unambiguous, or carry a video-stream identity and match the hint to its TrackOutput. The coordinated Apple implementation already requires exactly one video track.

Quick104 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Silo's pull request guidance changed today (#490). A PR that changes what a user sees now needs before-and-after evidence in its Evidence section, and a PR with no visible change says Evidence: none, no user-visible change. This PR was opened before the rule existed, so it hasn't had a chance to meet it yet.

Missing here: Before-and-after frame captures of an affected file on phone or TV showing the corrected black and white levels.

The rules are in Show visible changes, and the PR template shows the Evidence section layout. This PR is already a draft, so I've left it that way. Please fill in the Evidence section before marking it ready for review.


Generated by Claude Code

@Quick104 Quick104 closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant