Skip to content

support Dolby Vision in HLS/TS streams#3280

Open
CharmingCheung wants to merge 1 commit into
androidx:mainfrom
CharmingCheung:main
Open

support Dolby Vision in HLS/TS streams#3280
CharmingCheung wants to merge 1 commit into
androidx:mainfrom
CharmingCheung:main

Conversation

@CharmingCheung

Copy link
Copy Markdown

Route HEVC-based Dolby Vision elementary streams in MPEG-TS to the Dolby Vision decoder instead of decoding the HEVC base layer as plain HEVC, which produced a green/magenta tint for non-cross-compatible profiles (e.g. profile 5).

  • TsExtractor: detect the "DOVI" registration descriptor and the 0xB0 Dolby Vision video descriptor in the PMT, parsing profile/level via DolbyVisionConfig and carrying it through EsInfo.
  • DefaultTsPayloadReaderFactory: pass the DV config to H265Reader.
  • H265Reader: when DV is signalled, emit a video/dolby-vision Format with the dvhe codec string; for profile 5 (proprietary IPT-PQ base layer whose SPS omits colour signalling) synthesize BT.2020/PQ/limited colour info, leaving cross-compatible profiles to use their SPS VUI.
  • H265Reader/NalUnitUtil: keep Dolby Vision RPU (NAL type 62) and enhancement-layer (type 63) NAL units within the current access unit so the per-frame RPU metadata reaches the decoder instead of being dropped at the sample boundary.

Verified on a OnePlus 12 with DV profile 5 and profile 8.1 HLS streams: both select c2.qti.dv.decoder and render correctly.

Route HEVC-based Dolby Vision elementary streams in MPEG-TS to the
Dolby Vision decoder instead of decoding the HEVC base layer as plain
HEVC, which produced a green/magenta tint for non-cross-compatible
profiles (e.g. profile 5).

- TsExtractor: detect the "DOVI" registration descriptor and the 0xB0
  Dolby Vision video descriptor in the PMT, parsing profile/level via
  DolbyVisionConfig and carrying it through EsInfo.
- DefaultTsPayloadReaderFactory: pass the DV config to H265Reader.
- H265Reader: when DV is signalled, emit a video/dolby-vision Format
  with the dvhe codec string; for profile 5 (proprietary IPT-PQ base
  layer whose SPS omits colour signalling) synthesize BT.2020/PQ/limited
  colour info, leaving cross-compatible profiles to use their SPS VUI.
- H265Reader/NalUnitUtil: keep Dolby Vision RPU (NAL type 62) and
  enhancement-layer (type 63) NAL units within the current access unit
  so the per-frame RPU metadata reaches the decoder instead of being
  dropped at the sample boundary.

Verified on a OnePlus 12 with DV profile 5 and profile 8.1 HLS streams:
both select c2.qti.dv.decoder and render correctly.
@tianyif tianyif assigned rohitjoins and unassigned rohitjoins and tianyif Jun 19, 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.

3 participants